[R] How to label and unlabel points on scatterplot with mouse pointer

Duncan Murdoch murdoch at stats.uwo.ca
Wed Aug 12 15:50:50 CEST 2009


Hitesh Singla wrote:
> Thanks milton,
>
> But that does not work in my case.. Any other suggestion be appreciated.
>   

You can't do what you want with standard graphics or 
grid/lattice/ggplot2, as far as I know.  But there are various other 
graphics systems in contributed packages that can probably do it:  
rggobi and iplots can probably do it, and it would be possible (but a 
lot of work) to implement this in rgl.  There are probably others too.

Duncan Murdoch
> Thanks and regards,
> Hitesh Singla
>
>   
>> Hi Hitesh,
>>
>> while the rigth response not arrive, you can play with:
>>
>> id<-1:10
>> x<-runif(10)
>> y<-runif(10)
>>
>> plot(x,y)
>> identify(x, y , labels = id)
>> Try give a look on spatstat help. I am not quite sure, but may be there
>> you
>> can find some solution (sorry if it is not true)
>>
>> cheers
>>
>> milton
>>
>> On Wed, Aug 12, 2009 at 12:49 AM, Hitesh Singla <
>> hitesh_s at students.iiit.ac.in> wrote:
>>
>>     
>>> Dear all,
>>>
>>> How can I label/unlabel points on scatterplot with mouse pointer. As the
>>> mouse approches near to point, it should label the closest point, then
>>> unlabel when it moves away.
>>>
>>> How can I do in R? I be very thankful.
>>>
>>> Thanks and Regards,
>>>
>>> Hitesh Singla
>>>
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content by MailScanner, and is
>>> believed to be clean.
>>>
>>> ______________________________________________
>>> 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<http://www.r-project.org/posting-guide.html>
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>       
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>>     
>
>
>




More information about the R-help mailing list