-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Categorical ticks and gridlines halfway between category labels #2601
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
Comments
Good point, ticks and gridlines halfway between the category labels is often better than aligned with the labels, as they are for numeric or date axes. Not always, for example label-aligned may be better for scatter/bubble plots. Also I'm not sure what the right behavior is when categories get too dense and we can't show them all... Striped rows is interesting, I see a few examples of it elsewhere, like here - it's not an effect I'd use myself, I think it makes interpreting the data harder. But we'd entertain a PR to add it 😄 |
Nice, I'd call that the same feature (just applied to the x axis instead of y) but that does seem like a more useful application of it. Note that if you zoom out in your example you can see the issue I was worried about, when categories get too dense and the stripes (and/or ticks/lines) get put in what's suddenly a weird place:
interesting, kind of a generalization of the idea of spikelines #1461 - perhaps this could fit into that framework. |
Basically here we just want a new |
Yep, a simple switch of some sort, at least for I think the desired behavior is unambiguous for
You could imagine combining period and timestamp data, or data of different period, on the same date axis; for example you have monthly sales data (period is a month) and you overlay it with daily weather data (period is a day, or precisely timestamped). For this reason it seems to me that for date axes, the right way to do this is very different from category axes:
I don't see a reason to extend this behavior to numeric axes; seems to me if someone wants behavior like this for numbers of some sort they can just display those numbers on a category axis. Can anyone think of a situation in which this wouldn't work? |
I think what you propose makes sense but for now I would just get a flag that works for categorical axes :) |
Hence my comment:
As I was thinking it through, I initially thought a different approach would be needed for dates, in which case for consistency we'd have wanted to change categories too. But in the end I believe ^^ (with whatever terminology we settle on) will work for both cases 🎉 |
When use categorical axis, the grid still drew in the middle of a category which you can find in here. By the way, the striped-rows style would be great for this situation(Yes, it is a table, but it can be used in plots right?).
The text was updated successfully, but these errors were encountered: