I have monthly wise information of NDVI values by COUNTYNAME (35 counties) and by REGIONS (8regions)from 2002 to 2014. Below is the script to plot boxplot (x= COUNTYNAME and y=Dec) and facet_grid by REGIONS and order the boxplot by Median value of Dec. In the output plot, i want to make some changes such as
Keep only the COUNTYNAME and the box plot which fall under the REGIONS and remove the rest. Eg. The number of COUNTYNAME fall in to REGIONS 1 is only 6. I want to remove the rest of the county information (both the x axis lables as well as the empty plot space).
Plot a GRANDMEAN for the variable Dec
.
ggplot(farmsndvilongitudinal, aes(x= reorder(COUNTYNAME, Dec, FUN=median),
y = Dec, color=factor(Regions)))+
geom_boxplot()+
theme(axis.text.x = element_text(angle = 90, hjust = 1))+
geom_point(stat="summary", fun.y=mean, size=2.0, color='black')+
facet_grid(~Regions)