0

I have an xy plot (time v.s synthetic index price) in png format. Because I cannot find the raw data with which I used to generate this plot. I wanna sample this plot and get some estimation.

Unfortunately, I've never deal with importing image files and processing the data, would you please give me some hints? which package, function, or any useful suggestion?

basic info:

file format: png

img background: white

line color: black

Thanks for any hint

Community
  • 1
  • 1
  • Can you post an example image? – Marius Sep 17 '13 at 23:28
  • Perhaps [this post](http://stackoverflow.com/questions/3955077/image-analysis-in-r) and links therein could be a start. – Henrik Sep 17 '13 at 23:49
  • it's really a simple one, take this as an example: http://www.pyngl.ucar.edu/Training/Exercises/Images/xy2_ex01.png but mine is even simpler, no x/y axis and border, just the xy curve itself. – simeonyyyyyy Sep 18 '13 at 00:30
  • Here is [another similar post](http://stackoverflow.com/questions/14133040/finding-coordinate-of-sketch-image-eg-scanned-as-photo-format-in-r-or-other-s/14142962). – dnlbrky Sep 18 '13 at 04:21

1 Answers1

1

I strongly recommend you not try to do this in R. There are several good tools for extracting data from a plot. My favorites are datathief http://www.datathief.org/ and engauge http://digitizer.sourceforge.net/. Run those, then import the data (ascii text) they generate into R

Carl Witthoft
  • 20,573
  • 9
  • 43
  • 73