Skip to content

Conversation

@Moelf
Copy link
Contributor

@Moelf Moelf commented Mar 6, 2025

fix #4549

related to #3004 and refactored a bit of code

barplot([1,2,3,1,2,3], [1,2,3,1,2,3], stack=[1,1,1,2,2,2], color=[1,1,1,2,2,2], gap=0; axis=(; yscale=log))

Before

Image

After

image

@github-project-automation github-project-automation bot moved this to Work in progress in PR review Mar 6, 2025
@asinghvi17 asinghvi17 moved this from Work in progress to Ready to review in PR review Mar 6, 2025
@Moelf
Copy link
Contributor Author

Moelf commented Mar 7, 2025

Do I need to provide reference plots? is there anything else I should do in the meantime?

@asinghvi17
Copy link
Member

A mention in the docstring about the source of the heuristic would be nice, but we (maintainers) have to update the reference images

@Moelf
Copy link
Contributor Author

Moelf commented Mar 8, 2025

@asinghvi17 #3004 (comment) we discussed that here, I can't find the exact code now, ROOT does something depends on if minimum is >1 or <1, but approximately /2 in both cases.

@Moelf
Copy link
Contributor Author

Moelf commented Mar 8, 2025

@Moelf
Copy link
Contributor Author

Moelf commented Mar 12, 2025

Bump

@SimonDanisch
Copy link
Member

Looks good to me! @jkrumbiegel, do you have any objections?

@jkrumbiegel
Copy link
Member

I don't know, it's kind of too arbitrary for me with these "smart" fillto values, I also didn't like the other log one. But I also don't use these kinds of stacked barplots so I don't really mind either.

@Moelf
Copy link
Contributor Author

Moelf commented Mar 12, 2025

it's kind of too arbitrary for me with these "smart" fillto values

I agree it's arbitrary but I think we also agree it shouldn't be empty, because then it's unusable.

A nonarbitrary choice is to fill down to eps(), but that in practice means users are now forced to set ylims!() for every single yscale=log plot, which I thought would be too annoying. Thus smart fillto is a midway solution.

@ffreyer
Copy link
Collaborator

ffreyer commented Apr 4, 2025

A nonarbitrary choice is to fill down to eps(), but that in practice means users are now forced to set ylims!() for every single yscale=log plot, which I thought would be too annoying. Thus smart fillto is a midway solution.

Since Axis relies on boundingbox() now and boundingbox() processes transformations you can have `-Inf`` in transformed data with sane limits by adding a method. If that's closer to the optimal solution I could update the pr for that.

@Moelf
Copy link
Contributor Author

Moelf commented Apr 4, 2025

does that mean user must set limits themselves? or you're saying you can implement this /2 heuristics there too?

@ffreyer
Copy link
Collaborator

ffreyer commented Apr 4, 2025

The latter. You can implement the heurisitic for boundingbox so that Axis uses it for limits while using something like eps() for the actual data.

@Moelf
Copy link
Contributor Author

Moelf commented Apr 4, 2025

in that case feel free to do that, and I very much appreciate it

@Moelf
Copy link
Contributor Author

Moelf commented Aug 10, 2025

still want this, looks like #4911 stalled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to review

Development

Successfully merging this pull request may close these issues.

stacked barplot contains gap when using yscale=log

5 participants