Preserving plot dimensions from one plot to another in R

Discussion in 'Automated Trading' started by garchbrooks, Jan 3, 2010.

  1. I saw some people here post some good advice about using R once, so I started to teach myself how to use it.

    There's a command called par(new=T) that lets you plot over the previous plot. The problem is that even though you're using the same plot, the dimensions of a new plot can change. I was wondering if there was some way to take a "snapshot" of the dimensions from one plot and then preserve them for use with another plot.

    Does anyone know how to do this?
  2. Using lines() and points() helped me achieve what I wanted to achieve, but I'd be interested in a solution involving par(new=T) if anyone out there has such a solution.
  3. rosy2


    you could assign your par params to a variable like

    orig<- par(mfrow = c(5,1) )

    and then use that next time like


    theres also library ggplot2 thats supposed to be popular