You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In situations when we want to remove margins, we must set both ticks and ticks length to remove the width/heigth of axis in the underlying gtable. As user would expect the empty size when they remove the axis using element_blank().
I've raised a similar issue before in #4722, but now that more people would want this, I think we should only reserve space for the elements that are drawn even more.
Thank you for pointing that out. I see the relevance of the previous issue. However, the current implementation of axis.ticks.length might cause confusion for users, even if it aligns with the design principles of ggplot2. It may be worth considering a revision to improve clarity and user experience.
In situations when we want to remove margins, we must set both ticks and ticks length to remove the width/heigth of axis in the underlying gtable. As user would expect the empty size when they remove the axis using
element_blank()
.Issue in stackoverflow: https://stackoverflow.com/questions/40407498/how-to-remove-margins-in-ggplot2-chart
Please note the 10th height which is the height of the axis grob.
Created on 2024-09-01 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: