Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stacked barplot contains gap when using yscale=log #4549

Open
Moelf opened this issue Oct 30, 2024 · 5 comments
Open

stacked barplot contains gap when using yscale=log #4549

Moelf opened this issue Oct 30, 2024 · 5 comments
Labels
barplot bug (log) scale transformation related to `Transformation` objects

Comments

@Moelf
Copy link
Contributor

Moelf commented Oct 30, 2024

CairoMakie v0.12.15

linear scale

julia> 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)

Image

log scale

julia> 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))

Image

@Moelf Moelf added the bug label Oct 30, 2024
@Moelf
Copy link
Contributor Author

Moelf commented Oct 30, 2024

notice fillto= doesn't help:

julia> 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, fillto=eps(); axis=(; yscale=log))
┌ Warning: Ignore keyword fillto when keyword stack is provided
└ @ Makie ~/.julia/packages/Makie/XQfuO/src/basic_recipes/barplot.jl:299

@Moelf Moelf changed the title stacked barplot empty when using yscale=log stacked barplot contains gap when using yscale=log Oct 30, 2024
@aoanla
Copy link

aoanla commented Oct 30, 2024

It looks like, from further testing, that it's just the first set of bars (at stack level 1) that aren't drawn - if you add more stacks, everything else seems to be drawn correctly...

@Moelf
Copy link
Contributor Author

Moelf commented Oct 30, 2024

Yea because the bottom bars reach zero which is impossible in log scale so it got "canceled"

@oameye
Copy link

oameye commented Oct 30, 2024

Use pseudolog to avoid the infinity at zero?

@Moelf
Copy link
Contributor Author

Moelf commented Oct 31, 2024

that would look "weird" to HEP community, basically since we never display zero, we should fill to eps()

@ffreyer ffreyer added (log) scale transformation related to `Transformation` objects barplot labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
barplot bug (log) scale transformation related to `Transformation` objects
Projects
None yet
Development

No branches or pull requests

4 participants