Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R Magnifying Glass Effect

Tags:

r

Is there a magnifying glass function in r? I have a graph with a lot of info and was wondering if there is a way to expand the area around the mouse.

like image 974
screechOwl Avatar asked Dec 27 '22 09:12

screechOwl


2 Answers

Here's a variety of half answers:

  1. RStudio supports a zoom feature for existing plots
  2. You can set the xlim and ylim in a plot that is already made (assumes the plot didn't take a long time to generate), e.g. plot(1:10, xlim = c(3,5), ylim = c(4,6))
  3. You can save your plot to a scalable device and zoom in another program, ala pdf().
  4. Look at the help page for getGraphicsEvent(). This may be platform dependent, but the code there outlines this to some extent.

There are likely some new things in the works based on Qt and/or RGGobi that may be possible too.

like image 75
Chase Avatar answered Jan 27 '23 20:01

Chase


There's also 'iplots extreme', aka 'Acinonyx', which is available from R-forge. Its still a bit experimental and may crash your R session though. Has zooming and linking facilities.

like image 45
Spacedman Avatar answered Jan 27 '23 20:01

Spacedman