Home > OS >  Reordering data in ascending order axis within 2 facets with ggplot in R
Reordering data in ascending order axis within 2 facets with ggplot in R

Time:02-16

I have a dataframe of overnight stays per holiday location by origin-location, year and age group, which is plotted in ggplot, facetted by Year and age group:

image of 8 different box plots, facetted by year and age group

As you can see, the lines don't sort correctly from smallest to largest. I use A two x four faceted lollipop plot. Each panel shows Origins on the y axis and Overnight Stays on the x axis, with horizontal bars showing stays per origin. The bars within each facet increase in length along the y axis from top to bottom.

  • Related