Closed jdeines closed 5 years ago
Hi Jill,
Thanks for your feedback! I appreciate you took the time to describe it, and with such an excellent example.
When you describe that facet_rep_wrap
fails to add 'y scales', I take it you refer to the tick labels? That is at least what I see in the base ggplot example. If that is the case, you can specify which labels to add with the repeat.tick.labels
argument:
ggplot(plotdata, aes(x = dummy, y = value)) +
geom_line() +
facet_rep_wrap(~variable, scales = 'free_y', repeat.tick.labels = 'y')
# combinations of 'x' and 'y'; does the exact same as base facet_wrap...
gplot(plotdata, aes(x = dummy, y = value)) +
geom_line() +
facet_rep_wrap(~variable, scales = 'free_y', repeat.tick.labels = c('x','y'))
repeat.tick.labels
can also take any combination of 'left','right','top','bottom', 'x','y', or simply TRUE (for all) or FALSE (default, do not repeat the tick labels / tick text).
In my initial take, I did not consider if the labels should be repeated with free scales; in facet_grid the scales are identical across each column or row, while in wrap they can change for each panel.
I hope this satisfies your issue. If not, you are welcome to reply. :)
Cheers, Stefan
Hi Stefan,
Thanks for the timely response! Yes, repeat.tick.labels
solves the problem. But since without it, the plot is incorrect, it'd be good to adjust the default setting for future unsuspecting users in the next update.
Thanks again!
Jill
Hi,
Thanks for the package, I've found some features really useful. I was using facet_rep_wrap() to replicate x-axis tick marks across facets, and I noticed some odd behavior when scales = 'free_y' - namely, it allows the scale of the actual plotted values to vary by panel, but it doesn't add the different y-axes across rows. In other words, it makes it look like one of the panels in each row has vastly different values, since it's axis is not re-labelled when it's scale is freed.
I'm using version 0.4.1
Here's a quick and dirty demonstration:
Cheers, Jill