In ggplot2, is there a way to get the commands used to create the graph in R?

If I create a chart using this command:

bp <- ggplot(PlantGrowth, aes(x=group, y=weight)) + geom_boxplot() 

Is there a way to get ggplot2 commands from bp? I use a package ( cummeRbund ) that uses ggplot2 to display graphs, so the commands that generate the graphs are wrapped in one command that hides how the plot was created. I want to change the plot and see how it was created -

 ic<-csCluster(myGenes,k=7) icp7(csClusterPlot(ic)) 
+6
source share

Source: https://habr.com/ru/post/979637/


All Articles