[R] dotplot: labeling coordinates for each point

Qifei Zhu zhu_qifei at yahoo.com.sg
Wed May 6 04:04:14 CEST 2009


Hi Deepayan,

Thanks for the hint. I spent some time on the research but haven't got any luck in writing the custom panel function for the conditional labeling of points in a graph. Could you please provide some more thoughts and probably some pseudo code? Thank you so much for your time!

Best,
Tony

-----Original Message-----
From: Deepayan Sarkar [mailto:deepayan.sarkar at gmail.com] 
Sent: Sunday, April 26, 2009 2:32 PM
To: Qifei Zhu
Cc: David Winsemius; r-help at r-project.org
Subject: Re: [R] dotplot: labeling coordinates for each point

On 4/26/09, Qifei Zhu <zhu_qifei at yahoo.com.sg> wrote:
> Hi David,
>
>  Thanks! It looks much better now. but is there any way to add (x,y)
>  coordinates as labels to all the points in the graph? Best case if I can
>  enforce some conditions saying if (y>10,000) label, else no label. Any
>  advice is appreciated.

Sure, write a panel function. See the examples in ?xyplot.

-Deepayan




More information about the R-help mailing list