An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090424/c0325265/attachment-0001.pl>
dotplot: labeling coordinates for each point
4 messages · Qifei Zhu, David Winsemius, Deepayan Sarkar
On Apr 24, 2009, at 9:23 PM, Qifei Zhu wrote:
I used dotplot to draw a graph for a dataset with size of 100. Since the x-axis are all texts, so they are mixed up and not readable. Is there any way to make it readable or how can I add labels to all the points with its (x,y) coordinates? Thanks for your help.
Look up information on the scales parameter and rotate your label text:
dotplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
scales=list(x=list(rot=60,
labels=c("AAAA","","","DDDD","","FFFF","","") )))
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
1 day later
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. Best, Tony -----Original Message----- From: David Winsemius [mailto:dwinsemius at comcast.net] Sent: Friday, April 24, 2009 10:48 PM To: Qifei Zhu Cc: r-help at r-project.org Subject: Re: [R] dotplot: labeling coordinates for each point
On Apr 24, 2009, at 9:23 PM, Qifei Zhu wrote:
I used dotplot to draw a graph for a dataset with size of 100. Since the x-axis are all texts, so they are mixed up and not readable. Is there any way to make it readable or how can I add labels to all the points with its (x,y) coordinates? Thanks for your help.
Look up information on the scales parameter and rotate your label text:
dotplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
scales=list(x=list(rot=60,
labels=c("AAAA","","","DDDD","","FFFF","","") )))
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
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