r - Multiple Boxplots in ggplot2 with continuous and categorical data -


i have data frame 4 columns , 200,000 rows of watershed id, forest age (categorical 1-4), evi (continuous), , drought (categorical "drought or "non-drought"). trying use ggplot make 10 boxplots each watershed comparing evi values in drought , non-drought conditions watershed.

data frame image: id each watershed repeated because there 10,000 evi samples each watershed in both drought , non-drought periods

data frame image: id each watershed repeated because there 10,000 evi samples each watershed in both drought , non-drought periods

this code i've been using try , make these plots ggplot:

box_watershed<-read.table("all_evi_watersheds_boxplot.txt", header=true)         ggplot(data = box_watershed, aes(x=box_watershed$id, y=box_watershed$evi)) + geom_boxplot(aes(fill=box_watershed$drought))     p <- ggplot(data = box_watershed, aes(x=box_watershed$id, y=box_watershed$evi)) +        geom_boxplot(aes(fill=box_watershed$drought))     p + facet_wrap( ~ evi, scales="free") 


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -