After hours of debugging I finally updated to the newest release of export_fig (v 2.0.0.0). Issue resolved. Needless to say I feel a bit stupid.
Issue with datetime and export_fig
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
For years I've never had any issues with datetime nor export_fig. However, today I noticed some erroneous datetime labels after exporting by export_fig. After hours of debugging, I was able to reproduce the issue by these lines of code:
td=datetime(2009:2016,1,2)
plot(td,td)
export_fig(1,'myfig','-png')
Basically the resulting image has different XTickLabels than what I see on the screen prior to exporting. The erroneous labels briefly appear the screen during the export but revert back to the correct ones after a few seconds. Interestingly enough, I do not get this issue if I change the days input to 1 instead of 2 in datetime, probably because the XTicks are exactly aligned with my data (?).
I can use print just fine, it's just export_fig that's being annoying. I am wondering:
- Is it reproducible or is related to my local settings?
- Does anyone know the cause?
- Does anyone know a fix?
The attached images were exported by print and export_fig, respectively.
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Data Type Identification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!