I have a dataframe, df, with 17 observations of 12 variables. Every observation represents the value assumed by a variable in a year, I have years from 1995 to 2011.
I would like to plot some of those variables having on the x axis always the year, and on the y axis the values of the variables. I would like to have it like facets, in a single graph.
How can I do it? I used ggplot2 to plot one of those variables.
The code I've written:
ggplot(c4ItaGerFinale, aes(Anno,EXPtot)) +
geom_point(color = "steelblue", size=2) +
labs(x= "Anno", y= "Milioni di dollari", title = "Settore Tessile, wiod c4") +
coord_cartesian(ylim=c(0,6000))
Where EXPtot
is a variable, Anno
is the variable I would like to have always on the x axis, and c4ItaGerFinale
is my data.frame.