Hi everyone,
I am trying to plot a chart with ggplot but I am getting an error. Thanks in advance!!
library(cowplot)
energy_types_longer%>%
ggplot (aes(x = "year", y= "gigawatts", group = country) +
geom_line(color = "steelblue", size = 0.8) +
geom_point( shape= "21", fill="steelblue", size= 2)+
facet_wrap(~ type, scales = "free_y")+
scale_y_continuous(labels = scales::comma)+
theme_minimal_hgrid()
Error: Incomplete expression:
energy_types_longer%>%
ggplot (aes(x = "year", y= "gigawatts", group = country) +
geom_line(color = "steelblue", size = 0.8) +
geom_point( shape= "21", fill="steelblue", size= 2)+
facet_wrap(~ type, scales = "free_y")+
scale_y_continuous(labels = scales::comma)+
theme_minimal_hgrid()
After correcting the unbalanced brackets, ..still giving me an error...
energy_types_longer%>%
ggplot (aes(x = "year", y= "gigawatts", group = country)) +
geom_line(color = "steelblue", size = 0.8) +
geom_point( shape= "21", fill="steelblue", size= 2)+
facet_wrap(~ type, scales = "free_y")+
scale_y_continuous(labels = scales::comma)+
theme_minimal_hgrid()
Error: Discrete value supplied to continuous scale