出口到EPS时,轴刻度标签更改

34 views (last 30 days)
大家好,
Duplicate post from the discussion forum here:
because I think it's a reasonable question!
I am using Matlab R2010b.
我已经手动更改了某些阴谋的轴tick标签,并且经历了一些奇怪的行为。
我保存了数字(.fig),并且轴刻度标记是正确的。我可以毫无问题地导出到PNG或PDF。当我导出到EPS时,轴刻度标记已更改,并且完全不正确。
如果您想使用它,则无花果文件在这里:
Any ideas? Surely a bug if it is specific to EPS export?!
感谢您的建议,
加布里埃尔
1 Comment
Arnaud Miege
Arnaud Miege 2011年4月26日
The figure exports fine to EPS on my machine. Do you have Ghostscript and Ghostview installed?

Sign in to comment.

Accepted Answer

加布里埃尔·罗瑟(Gabriel Rosser)
Fixed:
The problem with specifying your own axis tick labels is that the property (for the y-axis here) YTickLabelMode is set to manual but the property YTickMode remains at auto.
When exporting to EPS, for some very odd reason the figure must be slightly rescaled (which is not the case/the rescaling is different when choosing PDF or PNG). The tick positions are automatically reassigned, but the labels remain those specified manually. Result: unexpected and rubbish figures!
将轴属性ytickmode设置为手动修复此操作。
Of course this is only a problem if the rescaling step causes the tick positions to change, so Oliver Woodford probably didn't observe this.
I still think this is buggy behaviour - why should one type of export cause figure resizing when another doesn't?
Thanks for your suggestions everybody!
7条评论

Sign in to comment.

更多的Answers (1)

Matt Fig
Matt Fig 2011年4月26日
我仅将其用于导出数字。
5 Comments
Oliver Woodford
Oliver Woodford on 27 Apr 2011
Yes, I was using your figure. Anyway, glad you found a solution. If I can replicate the bug I may put a fix into export_fig.

Sign in to comment.

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

开始狩猎!