Find plot data. If data is not specified, this function will attempt to find the data corresponding to the last ggplot2 created or displayed. This will work in most situations where you are creating the plot and immediately displaying it, but may not work in other situations. In those cases, please specify the data explicitly.
find_plot_data(data)