-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
add smart fillto to enable logscale y-axis histogram barplot #3004
add smart fillto to enable logscale y-axis histogram barplot #3004
Conversation
Co-authored-by: Anshul Singhvi <[email protected]>
(should maybe also add a test?) |
Ideally, test + example in the barplot page. The test can be added here: |
Co-authored-by: Anshul Singhvi <[email protected]>
when you say example do you mean in the docs? I don't think we need that right? |
yes a docs example would be good because we want to explain every single attribute visually in the long run. And the visual effect of |
we could also think about a |
I would say drop zero is not needed because in both cases it should be invisible, that seems to be the only reasonable behavior |
how would a value of 0 be invisible in the log scale case? Or do you mean you would always drop zeros so no setting needed |
See the third example in op. I'm saying we always drop zero and it's already implemented, but maybe there's a better way to implement it |
the last commit makes barplot(
tbl.x, tbl.height,
dodge = tbl.grp,
color = tbl.grp,
bar_labels = :y,
axis = (xticks = (1:3, ["left", "middle", "right"]),
title = "Dodged bars horizontal with labels", xscale=log10), # <---------------------------
colormap = [:red, :green, :blue],
color_over_background=:red,
color_over_bar=:white,
flip_labels_at=0.85,
direction=:x,
); |
is this ready? I don't know what example I should add, |
this seems ready 👀 |
@jkrumbiegel wanted to do a final review before merging |
franklin error seems unrelated |
Hm, a new Franklin version was released just now: https://github.com/tlienart/Franklin.jl/releases/tag/v0.10.86 |
yeah I think so, this PR didn't touch the the slide grid markdown |
Looks like it Passed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some small changes to the test to exercise the x direction code, too. I think this is good to go now. I haven't tested out all combinations of switching back and forth in GLMakie, but it looked like we easily get limit errors that way which are not really related to the recipe, rather to the limit update code and when what value is updated. So not relevant here.
There should be a docs example added at some point, but before I spend time doing that in the current format, I'd rather wait until we switch the plotting functions to direct attribute docs like we have for Blocks. Shouldn't block this right now.
Fix #3000
This implements what's suggested on Slack, namely, detect if transformation is one of the dangerous logs (example of non-dangerous log is
Makie.pseudolog10
), if so, use the minimal non zero value divided by 2 as the "bottom" to avoid illegal transformation0 -> -Inf
when applying the log.Some examples that used to error but now works: