r - how to have x-axis labels in multicolumn ggplot with facet_wrap? -


when trying plot this:

library(ggplot2) d <- ggplot(diamonds, aes(carat, price)) +   xlim(0, 2) + geom_point() d + facet_wrap(~ color) 

you notice x-axis labels show first column. them repeate on second , third column. possible?

if on facet_wrap use option scales="free",

d + facet_wrap(~ color, scales="free") 

then x-axis labels on plots, don't want. want labels in bottom row repeating across columns

if number of panels plot such, columns have same number of plots, axis gets repeated in way want. can't have right number of panels that.

with version 2.2.0 of ggplot problem fixed. see https://www.rstats-tips.net/2016/11/ggplot2-x-axis-scale-now-available-on-all-facet-columns/

enter image description here


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -