altmany / export_fig

A MATLAB toolbox for exporting publication quality figures
BSD 3-Clause "New" or "Revised" License
1.28k stars 368 forks source link

Sometimes figure does not save properly #352

Open HalonMallic opened 2 years ago

HalonMallic commented 2 years ago

Sometimes when exporting a .pdf for example using the code, export_fig(['/Users/Me/Folder/Graph'], '-transparent', '-pdf', '-painters');, the figure doesn't save correctly and it will end up saving a very small blank square instead of the graph that I want to save.

Why does this happen/how can this be fixed?

altmany commented 2 years ago

This is presumably a duplicate of issues #350 and #351, which were resolved in the latest version of export_fig. If this is not resolved in the latest version then let me know and I will reopen the issue.

anask07 commented 1 year ago

This is presumably a duplicate of issues #350 and #351, which were resolved in the latest version of export_fig. If this is not resolved in the latest version then let me know and I will reopen the issue.

I just attempted this in v3.39 and had the same issue. This is on an ARM Mac with MatLab 2021b.

esdcmc commented 8 months ago

I don't know if it's related or it can help at all. I had a 'ghostly' large grey column appearing on the left of the saved/printed graph (in jpg) thus resizing the actual graph to a smaller window to the right. This 'ghostly' column seemed to show instructions at random of my running macro. I addressed this by increasing the pause time at line 403 of export-fig.m from 0.05 to 0.2: finger crossed it seems to work so far although I haven't rerun many figures yet.