mjantti@abo.fi
1998-May-06 10:29 UTC
R-beta: adjusting y-axis scale with multiple lines in plot
Hello -- I am plotting multiple densities in a single plot. If the max of a new density (added with 'lines()') is sufficiently larger than that of the one first plotted (using 'plot()'), the new density is cut or trucated off of the figure. Is there a simple way of adjusting the yscale after all lines have been added? Or is the procedure to be used to first estimate all densities, the plot the first one with 'ylim=c(0,max())' and the add the lines one by one? If anyone has pondered on and solved this, I'd be very grateful for the solution. Regards, Markus -- Markus Jantti | Department of Statistics markus.jantti at abo.fi | Abo Akademi University http://www.abo.fi/~mjantti | FIN 20500 Turku, Finland 358-9-643 747 (Home/Voice) | 358-2-2154 161 (Office/Voice) | 358-2-2154 677 (Office/Fax) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
1998-May-06 11:45 UTC
R-beta: adjusting y-axis scale with multiple lines in plot
mjantti at abo.fi writes:> Or is the procedure to be used to first estimate all densities, the plot > the first one with 'ylim=c(0,max())' and the add the lines one by one? > If anyone has pondered on and solved this, I'd be very grateful for the > solution.Yup. That's the general procedure. Some kind of autoscaling would be nice to have some time in the future, but currently the graphics model in R (and S-plus) is that of a hardcopy device (e.g. a plotter) with "no eraser". There's also the option of using matplot(), although that'll lose the facilities of plot.density. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._