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
I'm trying to make a plot with a border around the entire panel and also with tick marks at the very ends of the axes. Unfortunately, regardless of theme this means the tick marks don't line up with the panel border. This is especially apparent when you have a larger base_size:
Well, that's not really what we want, because the panel border still doesn't line up with the axes. But how can I add right and top axes? The only way I know of is as follows:
But that feels pretty hacky to me. So my questions is: is there a way to add such an axis line without specifying sec.axis and then removing everything I don't want? Ideally the defaults for the the secondary axis theme elements would be element_blank() when there is no sec.axis specified, then the user could just turn them on as desired, e.g.:
@clauswilke Oh, wow, I had no idea clipping was causing the panel border to be half width, I just assumed it was designed like that, but that makes total sense now! That solution will definitely work for my current situation, but I can imagine cases where you might not want to turn clipping off (e.g. maybe you have elements outside of the plot area). I still think it'd be ideal to be able to style the secondary axes without going through the hassle of defining them in the x and y scales.
I'm trying to make a plot with a border around the entire panel and also with tick marks at the very ends of the axes. Unfortunately, regardless of theme this means the tick marks don't line up with the panel border. This is especially apparent when you have a larger
base_size
:(note the 10 and 50 y axis tick marks do not line up with the panel border)
Now, this makes sense, because the panel border is actually supposed to be within the axes, so let's just put some axes on:
Well, that's not really what we want, because the panel border still doesn't line up with the axes. But how can I add right and top axes? The only way I know of is as follows:
But that feels pretty hacky to me. So my questions is: is there a way to add such an axis line without specifying sec.axis and then removing everything I don't want? Ideally the defaults for the the secondary axis theme elements would be element_blank() when there is no sec.axis specified, then the user could just turn them on as desired, e.g.:
The text was updated successfully, but these errors were encountered: