Minor tick spacing changes when saving figure to file
7 次查看(过去 30 天)
显示 更早的评论
I would like to prevent the minor ticks from changing when I export a figure. Any idea how I do that? I have tried setting YTickMode to manual and that doesn't seem to help. Here is a picture of the figure (left) before exporting and (right) after exporting. I don't understand why the y minor tick spacing changes. I have tried both print() and export_fig() and they both exhibit the same behavior. This all started happening after I updated from 14b to 15b. YAY!!! I want to export what I see.
4 个评论
Kirby Fears
2015-11-6
You can make a post about minor tick spacing in the export_fig link provided by Walter. Yair may have a solution or find a fix.
回答(2 个)
Usha Duddu
2015-11-11
Hi Thomas
I understand that when you try exporting the figure either using "print" or "export_fig", minor yticks change their position in figure file.
This might happen because Y axis ticks in the figure are set to 'Auto' and Y axis is rescaled when the figure is resized for exporting.
One resolution to preserve the Y axis ticks from the original file to the exported file might be to uncheck the 'Auto' option for Y axis from "Edit->Axis Properties" from figure window. After doing the above setting, you could try exporting the figure through "print" command.
Hope this helps!
Thank you Usha
0 个评论
Ye
2016-5-18
Previously, I met the same problem. Then I find out it depends on the size of figure window displayed in matlab before you print the figure. That is after I run my script, matlab will show a figure window, and that is what your later exported figure looks like. If you maximize the window, minor ticks will increase, vice versa.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!