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
The base plot method allows you to pass a frame.plot = FALSE argument, which removes the outline box. Because plot draws non-intersecting axes by default, this provides an easy way to achieve the (in my view) aesthetically pleasing effect of floating axes.
Of course, some other base plotting functions---most obviously hist---do this automatically.
To the best of my knowledge, there is no direct way to achieve the same floating effect of non-intersecting axes in ggplot2. The workarounds that I've seen generally involve some hacks with segment. For example, see this SO answer and I believe that this is also what ggthemes does behind the scenes with its geom_rangeframe function. Unfortunately, I've found these workarounds to be quite brittle/unreliable, producing ugly artefacts with certain datasets or more complex plot constructions like faceting (ticks not lining up with the axis ends, etc.)
It would be great if we could disable axes intersection (but not turn them off completely) as part of a regular theme argument.
Thanks for considering and for maintaining this essential package.
The text was updated successfully, but these errors were encountered:
The base
plot
method allows you to pass aframe.plot = FALSE
argument, which removes the outline box. Becauseplot
draws non-intersecting axes by default, this provides an easy way to achieve the (in my view) aesthetically pleasing effect of floating axes.Created on 2023-02-16 with reprex v2.0.2
Of course, some other base plotting functions---most obviously
hist
---do this automatically.To the best of my knowledge, there is no direct way to achieve the same floating effect of non-intersecting axes in ggplot2. The workarounds that I've seen generally involve some hacks with
segment
. For example, see this SO answer and I believe that this is also what ggthemes does behind the scenes with itsgeom_rangeframe
function. Unfortunately, I've found these workarounds to be quite brittle/unreliable, producing ugly artefacts with certain datasets or more complex plot constructions like faceting (ticks not lining up with the axis ends, etc.)It would be great if we could disable axes intersection (but not turn them off completely) as part of a regular theme argument.
Thanks for considering and for maintaining this essential package.
The text was updated successfully, but these errors were encountered: