The useful blog I found is the following:
plot multiple axis in one graph in R
The basic idea is
1
<code>> plot <-- first plot
2
3
> par(new=T) <-- tell R to overwrite the first plot
4
5
> plot( ..., axes=F, ... ) <-- plot our second plot, but don't touch the axes
6
</code
Also, another trick when plotting a graph first, and then save to file is the following:
plot(...)
dev.copy(svg,"*.svg")
dev.off()
http://statistics.berkeley.edu/classes/s133/saving.html
No comments:
Post a Comment