MATLAB: How to make round ‘o’ markers render as round when saving to png

figure renderingMATLAB

When I export a figure to an image (png or tif), the round markers form peculiar cross shapes as attached.
This happens whether using export_fig
export_fig f1 savefig.png '-r600' -nocrop
or exporting manually via the dialogue box.
File>Export Setup> Properties/Rendering > 600 dpi Export
I'm using Matlab 2015a on Windows 7.
How do I make round 'o' markers render as round?
Thanks

Best Answer

That looks like an issue that the OpenGL driver has on some graphics cards when drawing wide lines. If so, you have a couple of options. Here are a few:
  • The simplest is to disable the edges and just use the fill color of the markers:
plot(randn(1,120),'o','MarkerFaceColor','black','MarkerEdgeColor','none')
  • Another option would be to tell export_fig to use the painters renderer.
  • Starting MATLAB with -softwareopengl might help, but I think that the Microsoft OpenGL implementation in Windows 7 is one of the ones that has this issue. Perhaps you're already getting that one. What does "opengl info" report?
Related Question