MATLAB export_fig crops title

27 ビュー (過去 30 日間)
Sindre Hodneland
Sindre Hodneland 2020 年 7 月 18 日
コメント済み: Diaa 2020 年 9 月 13 日
I am trying to export pdf figures with the export_fig function, but it is cropping away the title. it is doing a nice cropping job at the other axis but not the north one. My code is
t = 0:0.01:10;
s1 = 0.7*sin(6*t) + sin(9*t) + 2*sin(14*t);
title('This is a title')
export_fig( './sinewave_with_noise', '-pdf','-transparent')
The above code produces this figure
I know I can '-nocrop':
export_fig( './sinewaves', '-pdf','-transparent','-nocrop')
to get the title back, but then it is not cropped on the west and east axis, like below
Anyone had this issue, or have a workaround?
Thanks for any comments!


Yair Altman
Yair Altman 2020 年 7 月 18 日
This is fixed in the latest version of export_fig (3.09). In the future, report such issues in export_fig's issues page:
  1 件のコメント
Sindre Hodneland
Sindre Hodneland 2020 年 7 月 18 日
Thank you!


その他の回答 (1 件)

Image Analyst
Image Analyst 2020 年 7 月 18 日
If you have r2020a, you can try exportgraphics() instead.
  2 件のコメント
Diaa 2020 年 9 月 13 日
Simplest solution. Thanks for pointing this out.



Community Treasure Hunt

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

Start Hunting!

Translated by