Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
## ----plot----------------------------------------------------------------
library(ggplot2)
ggplot(data = quakes, aes(x = lat,y = long,colour = stations)) + geom_point()
## ----save_plot-----------------------------------------------------------
g = ggplot(data = quakes,
aes(x = lat,y = long,colour = stations)) +
geom_point() +
xlab("Latitude") + ylab("Longitude") +
theme_bw() +
theme(axis.text = element_text(size = 18),
axis.title = element_text(size = 20),
legend.text = element_text(size = 15),
legend.title = element_text(size = 15),
legend.position = c(0.3, 0.35),
legend.background = element_rect(fill = "transparent"),
legend.key = element_rect(fill = "transparent",
color = "transparent")) +
guides(
colour = guide_colorbar(title = "Number\nof\nStations\nReporting",
title.hjust = 0.5,
title.position = "left"))
print(g)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.