ggplot Boxplot error

library(ggplot2)

h <-ggplot(data,Kishtwar_land_use, aes(x=landuse, y=OC))
h <- ggplot(data=Kishtwar_land_use, aes(x=Landuse, y=OC))
h + geom_boxplot()
h + geom_boxplot(size=1.2) + geom_point()
h + geom_boxplot(size=1.2) + geom_jitter()
h + geom_jitter(aes(size=points)) + geom_boxplot(size = 1.2, alpha .7, outlier.colour = NA)
h + geom_jitter(aes(size=points)) + geom_boxplot(size=1.2, alpha=.7, outlier.colour = NA)
Don't know how to automatically pick scale for object of type function. Defaulting to continuous.
Error: Aesthetics must be valid data columns. Problematic aesthetic(s): size = points.
Did you mistype the name of a data column or forget to add after_stat()?
Run rlang::last_error() to see where the error occurred.
h + geom_jitter(aes(size=points)) + geom_boxplot(size=1.2, alpha=.7, outlier.colour = NA)
Don't know how to automatically pick scale for object of type function. Defaulting to continuous.
Error: Aesthetics must be valid data columns. Problematic aesthetic(s): size = points.
Did you mistype the name of a data column or forget to add after_stat()?
Run rlang::last_error() to see where the error occurred.

Are you sure that Kishtwar_land_use has a column named points? It looks like ggplot cannot find that column and is then finding the plotting function called points.

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