ggplot Select one variable from group to vizualize


I want to ask if is possinble to visualize only one selected variable in group
example I have group HM and it is As, Ni, Cd,Pb ....can I select only As in HM group and use it?

ggplot(data = b, mapping = aes(x = factor(year), y = value, color = type)) +
geom_boxplot(width=0.5,lwd=1, outlier.shape = NA)+

Subset the data and plot the results.

dat1  <- subset(b, b$HM == "As")

yes its working!!! thank you so much

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.