[R] barplot + plot

juli g. pausas juli at ceam.es
Mon Oct 14 14:20:45 CEST 2002


Dear all,
I've got another question,
By default barplot and plot seem to produce slightly different y-axis.
The problem I've got is when using a mix figure with both, barplot and
plot. For example:

barplot(1:5, ylim=c(0, 6))
par(new= T)
plot(1:5, 9:5, type="b", axes=FALSE, ylim=c(0,9))
axis(4)
box()

note that both plots (barplot and plot) should start at 0, but the exact
starting at 0 is only produced with barplot but not with plot.
Is there a way to make the two axes more coherent, that is both starting
at the exact 0 or both starting like the plot?

Thanks a lot for any suggestion

Juli

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list