Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Extract data from a plot image
ResourceFunction["ExtractPlotImageData"][img] converts the plot image img to a normalized set of points. | |
ResourceFunction["ExtractPlotImageData"][img,{xscale,yscale}] scales the results by xscale and yscale. |
Extract data from a plot image:
In[1]:= |
Out[1]= |
An x-Ray diffraction (XRD) pattern of low-density polyethylene (LDPE) converted to a list of points:
In[2]:= |
Out[2]= |
Create a Sin plot:
In[3]:= |
Out[3]= |
Convert the plot into a list of points such that the points are rescaled:
In[4]:= |
Out[4]= |
You can use ExtractPlotImageData on data consisting of points:
In[5]:= |
Out[5]= |
The x- and y-scales can be arbitrarily manipulated. Take for example this UV-Vis spectroscopy graph of ZnO nanoparticles:
In[6]:= |
Out[6]= |
The extracted data can be interpolated:
In[7]:= |
Out[7]= |
In[8]:= |
Out[8]= |
On sets of points, FindFormula can be used to detect what relationship is found in the data:
In[9]:= |
Out[9]= |
Content in the image other than the curve is treated as data. Here, the "(a)" distorts the average pixel height:
In[11]:= |
Out[11]= |
This work is licensed under a Creative Commons Attribution 4.0 International License