Closed
Description
Hi,
Many thanks for ggh4x, it's great. I want to create custom breaks in a 40 panel plot I've created with facet_grid2. Each panel needs custom x breaks. Following an answer on SO I created a list with my custom breaks like so:
CUSTOM.BREAKS <- list(
scale_x_continuous(breaks = c(40, 80, 120, 160)),
scale_x_continuous(breaks = c(50, 100, 150, 200, 250)),
scale_x_continuous(breaks = c(40, 80, 120, 160)),
scale_x_continuous(breaks = c(50, 100, 150, 200, 250)),
scale_x_continuous(breaks = c(0, 10, 20, 30)),
scale_x_continuous(breaks = c(0, 10, 20, 30)),
etc, one custom scale per panel
And refer to the list in the ggplot call:
+ facetted_pos_scales(y = CUSTOM.BREAKS)
but this returns:
Error in facetted_pos_scales(y = CUSTOM.BREAKS) :
Invalid facetted scale specifications.
I must be referring to the panels incorrectly. I'm unclear how I could refer to the individual panels directly in facetted_pos_scales
, the help file refers to only rows or columns. Please could you give some direction on how to set the breaks for each the indivudal panel? Many thanks.
Metadata
Metadata
Assignees
Labels
No labels