R: how to set the size of a contour plot with user defined aspect ratio? -


i trying plot (filled) contour map aspect ratio = 1, fail right shape of plot window/ left areas in plot window white because plot window (or box) remains square. please see example below

x <- 10*1:nrow(volcano) y <- 10*1:ncol(volcano) filled.contour (x, y, volcano, asp = 1) 

results in plot looks this:filled.contour

how rid of white areas in plot box/window while preserving aspect ratio? assume need set size of plot window somewhere, can't find out how; seems graphical parameter settings (using par) overwritten filled.contour (or setting asp = 1)

try this

  x <- 10*1:nrow(volcano)   y <- 10*1:ncol(volcano)   filled.contour(x, y, volcano,asp=1, frame.plot=f,   plot.axes = { axis(1, pretty(x,min=0), line=-4)                 axis(2, seq(0, 600, = 100)) }) 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -