[R] Difficulty with formatting scatter.smooth output

J.delasHeras at ed.ac.uk J.delasHeras at ed.ac.uk
Fri Apr 13 19:19:26 CEST 2007

Quoting Bing Ho <2bingho at stanford.edu>:

> Hello,
> I have been using scatter.smooth and been trying to format my plots
> and been unable to adjust the line type or color of the smooth curve.
> When I specify col in scatter.smooth, I can adjust the color of the
> scatter plot points, but the line always stays black and solid. lty
> has no effect.
> When I specify par prior to calling scatter.smooth, col will change
> the color of the points, smoothed line, and bounding box. lty,
> col.axis, col.lab work as expected.
> What I would like to be able to do is format each element of the graph
> specifically - bounding box, points, and smoothed curve.
> Thank you for any advice.

Hi Bing,

I had exactly the same requirement, so I modified the original  
function where you can specify different colours, line widths, etc...  
(and you can easily add other parameters the same way). I'm attaching  
my version here, in case it saves you 2 minutes of typing :-)


Dr. Jose I. de las Heras                      Email: J.delasHeras at ed.ac.uk
The Wellcome Trust Centre for Cell Biology    Phone: +44 (0)131 6513374
Institute for Cell & Molecular Biology        Fax:   +44 (0)131 6507360
Swann Building, Mayfield Road
University of Edinburgh
Edinburgh EH9 3JR

More information about the R-help mailing list