[R] Plotting symbols over a screenshot

Greg Snow Greg.Snow at imail.org
Thu Mar 18 20:53:40 CET 2010


One approach:

Read in and plot background image (possibly using EBImage package or other).
Use the updateusr function from the TeachingDemos package to set the user coordinates to match your image.
Add points using points or symbols function.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Ralf B
> Sent: Wednesday, March 17, 2010 5:59 PM
> To: r-help at r-project.org
> Subject: [R] Plotting symbols over a screenshot
> 
> Hi all,
> 
> I would like to generate a very simple visualization in R and wonder
> if somebody here could tell me about a simple script that can do
> exactly that.
> 
> Input: I have about 1000-3000 screen coordinates of mouse movements
> and mouse click positions in a data.frame (each collumn for each data
> type) and an screenshot picture in png.
> 
> Output: I would like to visualize mouse movements as cycles and mouse
> clicks as squares. Background should be the picture. Foreground the
> cycles and squares.
> 
> What is the simplest way to do this? (single command?) It does not
> need to be fast, but should work decent for 1000-5000 points.
> 
> Thanks a lot,
> Ralf
> 
> ______________________________________________
> 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.



More information about the R-help mailing list