Hi All, I am using plot(x, type = 'l') for some plotting, but I would like rounded edges rather than jagged edges in the plot (purely for aestetic reasons). How could I achieve that? Cheers, Federico -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 7594 1602 Fax (+44) 020 7594 3193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
probably you want to use the `lend' argument of ?par(); I hope it helps. Best, Dimitris ---- Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm ----- Original Message ----- From: "Federico Calboli" <f.calboli at imperial.ac.uk> To: "r-help" <r-help at stat.math.ethz.ch> Sent: Wednesday, June 07, 2006 12:40 PM Subject: [R] smoothing plot(x, type ='l')> Hi All, > > I am using plot(x, type = 'l') for some plotting, but I would like > rounded edges > rather than jagged edges in the plot (purely for aestetic reasons). > > How could I achieve that? > > Cheers, > > Federico > > -- > Federico C. F. Calboli > Department of Epidemiology and Public Health > Imperial College, St Mary's Campus > Norfolk Place, London W2 1PG > > Tel +44 (0)20 7594 1602 Fax (+44) 020 7594 3193 > > f.calboli [.a.t] imperial.ac.uk > f.calboli [.a.t] gmail.com > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
On Wed, 7 Jun 2006, Federico Calboli wrote:> Hi All, > > I am using plot(x, type = 'l') for some plotting, but I would like > rounded edges rather than jagged edges in the plot (purely for aestetic > reasons). > > How could I achieve that?It I understand you aright, that is done by par(lend) but the default is "round". So maybe your graphics device (unstated) on your OS (unstated) does not support this. We need more details, and preferably a simple reproducible example. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Federico Calboli wrote:> Hi All, > > I am using plot(x, type = 'l') for some plotting, but I would like rounded edges > rather than jagged edges in the plot (purely for aestetic reasons). > > How could I achieve that? >Perhaps you want something like: x<-rnorm(50) plot(spline(1:50,x),type="l") Jim