0
votes

I have 8 plots which I want to implement in my Matlab code. These plots originate from several research papers, hence, I need to digitize them first in order to be able to use them.

An example of a plot is shown below:Example plot

This is basically a surface plot with three different variables. I know how to digitize a regular plot with just X and Y coordinates. However, how would one digitize a graph like this? I am quite unsure, hence, the question.

Also, If I would be able to obtain the data from this plot. How would you be able to utilize it in your code? Maybe with some interpolation and extrapolation between the given data points?

Any tips regarding this topic are welcome.

Thanks in advance

2

2 Answers

0
votes

Here is what I would suggest:

  1. Read the image in Matlab using imread.
  2. Manually find the pixel position of the left bottom corner and the upper right corner
  3. Using these pixels values and the real numerical value, it is simple to determine the x and y value of every pixel. I suggest you use meshgrid.
  4. Knowing that the curves are in black, then remove every non-black pixel from the image, which leaves you only with the curves and the numbers.
  5. Then use the function bwareaopen to remove the small objects (the numbers). Don't forget to invert the image to remove the black instead of the white.
  6. Finally, by using point #3 and the result of point #6, you can manually extract the data of the graph. It won't be easy, but it will be feasible.
0
votes

You will need the data for the three variables in order to create a plot in Matlab, which you can get either from the previous research or by estimating and interpolating values from the plot. Once you get the data though, there are two functions that you can use to make surface plots, surface and surf, surf is pretty much the same as surface but includes shading.

For interpolation and extrapolation it sounds like you might want to check out 2D interpolation, interp2. The interp2 function can also do extrapolation as well.

You should read the documentation for these functions and then post back with specific problems if you have any.