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 (최근 30일)
이전 댓글 표시
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
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Identification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!