I have two contour plots over same XY mesh and Z points are computed using the same formula but one has little introduced error. Can anyone tell me a way to compare the two plots and see how much they differ ??
-
1Plot `Z1-Z2`? For example with `imagesc` – Luis Mendo Jan 02 '14 at 12:17
2 Answers
As Luis mentioned, the way to calculate the simple difference in the z direction, would be to substract Z_correct
from Z_witherrors
. This can then be plotted, a histogram can be made or statistics can be calculated.
If you are worried about errors in multiple directions, the problem becomes more complicated and you would need a good definition of the 'difference' between two plots. (@Adiel gives an example of this in the other answer)
If you are really only worried about the output of the contour plot (small differences in values may not always show on the plot for example). Then it becomes more of an image processing question, more advice can in that case be found at How can I measure the similarity between two images.

- 1
- 1

- 21,208
- 8
- 66
- 122
There are some ways to measure distance between two regions, or contours.
One way is to measure for each point from one of the contours (call it contour A), the geometric distance to the closest point in contour B, e.g. find the minimal distance from specific point in A to all the points in contour B. After you find the minimal distance for all of the points in contour A, sum it and divide in the number of points.
It's sort of way to measure distance, note that in this way the distance from A to B is not allways equal to the distance from B to A...

- 3,071
- 15
- 21