Created
September 30, 2019 08:26
-
-
Save LuisSevillano/261835d1e1e64b50d1be2c0b6b712e3c to your computer and use it in GitHub Desktop.
Extract data from ggplot plot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plot <- ggplot(data = pf, aes(x = age, y = df)) + | |
geom_point(alpha = 1/100, | |
position = position_jitter(h = 0), | |
color = "darkred") | |
ggplot(data = layer_data(plot, 1), aes(x = x, y = y)) + | |
geom_point(alpha = 1/20) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment