Fake differences between figures generated on different machines

4 views (last 30 days)
Hi all,
Matlab figures generated on different machines cannot be compared pixel-to-pixel.
In the attached left-hand figure, you can see a figure obtained with Machine A
In the attached right-hand figure, you can see a figure obtained with Machine B
In the attached figure at the bottom, you can see the pixel-to-pixel difference obtained by the BeyondCompare software tool.
There is actually no difference between the data on both figures. These differences are coming from probably different color depths (or things like that, I am not really sure)
Is there a way to avoid such 'fake' differences when the figures are generated on different machines?
  1 Comment
DGM
DGM on 6 Jun 2023
Edited: DGM on 6 Jun 2023
This isn't really an answer but if you're relying on figure capture (which seems entirely reasonable in this case), then I'm pretty sure some minor inconsistency is to be expected. The cause may vary depending on the particulars of the code (how the figure is set up and captured) and the differences between the test platforms (version, hardware, graphics options).
Severe geometry variation may be caused if a call to saveas() or print() occurs before the figure is completely set up. This could be fixed with a call to drawnow() where appropriate.
Smaller differences may be caused by differences in all that contributes to the rendering process. I don't pretend to know how or if that could be fixed, and it probably depends on knowing what the rendering settings are and how it's being captured.
Disclaimer: I don't have exportgraphics(), so I'm unfamiliar with whether it helps fix or reduce any of the described issues observed with saveas(), print(), and getframe().
In this particular case, it looks like there are a bunch of lines that are just missing entirely (e.g. the plot box). I can't tell if that's an interpolation issue due to the image being resized or if it's a simple matter of the plot box simply being drawn differently in the first place.

Sign in to comment.

Answers (0)

Categories

Find more on Specifying Target for Graphics Output in Help Center and File Exchange

Tags

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!