Closed
Description
I'm estimating that about 4 out of 5 times that layer_data()
, layer_grob()
or layer_scales()
is used, my intention is to get that information from the plot currently on display.
I think it is a good default to have plot = last_plot()
be the default value for these functions, for the following reasons:
- The current default, i.e. no value, is useless in 5 out of 5 times.
- I can think of no alternative default value that might be useful.
- It may save folks 11 keystrokes.
- For people that don't know about
last_plot()
, as I did for a long time, usinglast_plot()
is more convenient than using
p <- ggplot(...) + ...
layer_data(p)