-
Notifications
You must be signed in to change notification settings - Fork 33
-
Notifications
You must be signed in to change notification settings - Fork 33
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
[question / feature request] Show only minor tick marks #110
Comments
Hi Sergio, Thanks for raising the issue. Indeed, it should be more flexible to set the lengths of ticks such that you have more control over this. However, I will probably never fix this in ggh4x and instead deprecate the minor tick functionality. As it happens, I'm trying to get minor ticks into ggplot2 itself: tidyverse/ggplot2#5287. In that PR, the minor tick length is still relative to the theme setting, but so is the major tick length, so you should be able to achieve what you're after here. If you'd really need that functionality right now, you're able to test that functionality using I'll close this issue here in ggh4x, as it won't be changed here. Best, |
Wow, great news about that PR; hopefully it will get merged! Also, in case anyone else has the same problem and wants to keep using ggh4x's other functions, I found a stupid trick that somehow worked (but hey, if it's stupid but it works it isn't stupid?): Set Thanks again, and a great fan of your work! |
HI Teun,
I have a problem that I've been unable to solve for the past days, related to the
[guide_axis_minor()]
function.I need to produce charts with ticks every year but where the year labels are centered within each year, as below:
(Note how each year's label is centered at the middle of the year)
I can mostly achieve this through the scale_x_date() function:
Here, I use minor_breaks to add ticks every year and breaks to add labeled ticks in the middle of each year (minor ticks don't show labels, so this was the only way I could find). However, I can't find a way to hide the mid-year ticks:
I've tried setting the x-axis man ticks to zero and then using the
ggh4x.axis.ticks.length.minor
setting to define the minor ticks, but the latter only takes relative values wrt to the main axis (and anything relative to zero will be zero).I've also looked at the code a bit and it seems it might be possible to fork the code to use absolute values instead of relative, but I'm not entirely sure where to edit. Lastly, I also saw comments on previous issues regarding the ongoing work on converting ggplot2 guides to ggproto, so I'm wondering if any changes will have to be modified again soon because of this.
Any thoughts or suggestions would be more than appreciated. Thanks!
Sergio
The text was updated successfully, but these errors were encountered: