Re: [R] Labelling curves on graphs

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Wed, 16 Jul 2008 21:32:41 -0500

Barry Rowlingson wrote:
> 2008/7/16 Ted Harding <Ted.Harding@manchester.ac.uk>:
>

>> Hi Folks,
>> I'd be grateful for good suggestions about the following.
>>
>> I'm plotting a family of (X,Y) curves (for different levels
>> of another variable, Z): say 6 curves in all but could be
>> more or less -- it's a rather variables situation.
>>
>> I'd like to label each curve with the value of Z that it
>> corresponds to.
>>
>> But people out there must have faced it, and I'd be grateful
>> for their own feedback from the coal-face!
>>

> Isn't this why we have colour vision? Just use 6 different colours and a
> legend. Or use linestyles and colours. Trying to do neat labelling along
> general lines like contour does is going to fail in edge cases such as if
> two lines are very close together. Contour can be fairly sure the lines will
> have sensible spacing unless it's mapping cliffs.
>
> I looked at the underlying C code for contour a while back with a view to
> using the algorithms in another package, but I gave up pretty quickly. The
> generated contour lines and labels are quite beautiful, but the code gave me
> a headache.
>
> Barry

Barry,

Why use color when you can use black and label the curves where they are most separated? This solves problems with color blindness, xeroxing, and faxing.

Frank

>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 17 Jul 2008 - 03:37:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Jul 2008 - 18:31:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive