A discussion of asp in plot.window help implies that asp override xlim and ylim (if you look at plot help, it will direct you to plot.window to learn more about asp ):
If asp is the final positive value, then the window is adjusted so that one data block in the x direction is equal to the length up to asp * of one information unit in the y direction.
Note that in this case par("usr") no longer defined, for example par("xaxs") , but rather on asp and the aspect ratio of the device. (See what happens if you interactively resize the graphics device after running the example below!)
The special case asp == 1 creates graphs on which the distances between points are displayed exactly on the screen. Values ββwith asp > 1 can be used to get more accurate maps when using latitude and longitude.
As @ mr.joshuagordon noted, you can use the pdf function (or png or jpeg if you want to output bitmap output), and play with the dimensions to get the desired image format while removing asp from plot so that you can set the xlim and ylim .
Another option is to switch to ggplot2 , which will simplify the adjustment of the axial limits and aspect ratio separately:
library(ggplot2)
UPDATE: Here's how to control xlim , ylim and aspect ratio independently in the base graph: instead of asp use the pin graphical parameter to set the physical dimensions of the parcel section. This setting does not affect the nominal values ββof xlim and ylim , but will change the physical measurement distance of 1 x-unit and 1 y-unit. Here are some examples:
Example 1: We will create two panels on one PDF page, each with a different aspect ratio:
# Create a 12" x 6" pdf graphics device pdf("test.pdf", width=12, height=6) # Divide graphics device into two regions, each of which will contain a plot par(mfrow=c(1,2)) # Left Panel: 5" x 5" plot area (plot region is square, so 1 y-unit = # 0.7 * 1 x-unit in terms of physical distance in the plot region) par(pin=c(5,5)) plot(0, 0, xlim = c(0, 70), ylim = c(0, 100), xlab = "", ylab = "", type = "n",main='par(pin=c(5,5)') # Right Panel: 0.7*5" x 5" plot area (so 1 x-unit = 1 y-unit # in terms of physical distance in the plot region) par(pin=c(0.7*5,5)) plot(0, 0, xlim = c(0, 70), ylim = c(0, 100), xlab = "", ylab = "", type = "n",main='par(pin=c(5,0.7*5)') dev.off()
Example 2. Show that you receive an error message if you set the pin larger than the size of the graphics device. We will use the default device ( RStudioGD in my case).
par(pin=c(10, 10)) plot(0, 0, xlim = c(0, 70), ylim = c(0, 100), xlab = "", ylab = "", type = "n",main='par(pin=c(5,4)')
Example 3: the same error occurs if you exceed the size of your pdf device (or png , etc.):
# Create a 5" x 5" pdf graphics device pdf("test.pdf", 5,5)