Learn R Programming

phenology (version 3.49)

ScalePreviousPlot: Return the scale of the previous plot

Description

Return a list with the limits of the previous plot

Usage

ScalePreviousPlot()

Arguments

Value

  • A list with xlim and ylim

Details

ScalePreviousPlot returns the scale of the previous plot

Examples

Run this code
par(xaxs="i", yaxs="i")
plot(x=1:100, y=sin(1:100), type="l", bty="n", xlim=c(1,200), xlab="x", ylab="y")
xlim= ScalePreviousPlot()$xlim
ylim= ScalePreviousPlot()$ylim
par(xaxs="r", yaxs="i")
plot(x=1:100, y=sin(1:100), type="l", bty="n", xlim=c(1,200), xlab="x", ylab="y")
xlim= ScalePreviousPlot()$xlim
ylim= ScalePreviousPlot()$ylim

Run the code above in your browser using DataLab