Closed nathanpli closed 3 years ago
The first problem (apparently empty file) is the same as issue #318
The second problem (narrow markers) is a direct result of the way that the builtin Matlab print
command works when using a non-default resolution (-r600 in your case, which is 6.25 times the standard Windows resolution of 96). You can try this for example:
print(gcf, '-r600', 'ex5', '-dpng');
winopen ex5.png
(in other words, the narrow markers using -r600 is the expected behavior, not a bug)
I encourage you to retry your 4 examples using the latest commit.
I downloaded export_fig from https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig/. I was trying to use the most basic options, but ran into issues. See this example code.
export_fig version 3.14 MATLAB version 2019b update 8 64-bit mac, Big Sur OS v 11.1
I followed the example in the readme for exporting images with transparent backgrounds, but the image failed to export properly. (See example1.png). Calling export_fig('example2.png') exported a low resolution image. I used the debugger and found that options.resolution was being set to 864 in line 1588 in the parse_args function when no resolution was specified as an input argument, so I am confused about why the image quality is so low. Specifying the resolution -r600 improved the image quality; however, the line widths of the markers were reduced to 1. See example3.png and compare with example4.png using the saveas() function. The line widths of lines are not reduced, but the markers look thinner in the exported png's.
After this, I quit MATLAB and restarted it, but that did not fix the issues.
example1.png (appears blank)
example2.png
example3.png
example4.png