Tuesday, 15 February 2011

plot - Set R graphics parameters locally but not globally? -



plot - Set R graphics parameters locally but not globally? -

is there way set or mask par() in local environment? i'm not terribly familiar r environments i'm not clear on why wouldn't possible, although understand why isn't default behavior. saw this question don't know plenty know whether applies here. i'd surprised if there isn't way tweak search path work.

then again, there's no way tweak algorithm decides whether omit of axis labels... hard have switch turn feature off , allow users pay price? seems have been design philosophy else in language (and i'm kind of starting appreciate it).

in add-on other answer(s) , comments, note graphical parameters local graphics device, can open new graphics device, set parameters want, when through close device (or switch other one) , previous parameters in effect. quick example:

dev.new() par(col='blue') hist(rnorm(100)) abline(v=0, lwd=5) dev.new() par(col='red') hist(rnorm(1000)) par(lwd=5) abline(v=0) dev.off() plot(runif(25), rnorm(25)) abline(h=0, lwd=3)

see help dev.list , dev.set details on switching between graphics devices.

r plot

No comments:

Post a Comment