stretch a figure command line

Hello, I have a figure which I then print to an eps file with the printf command.
However, my X-AXIS is TOO TIGHT. Manually I stretch the figure and then save it, which works fine. But I can't do this manually for every figure (I have tons!). So, I tried setting some values for DataAspectRatio and PlotBoxAspectRatio .... but it doesn't work.. the image doesn't stretch in the x - direction like I want it to. I also tried it by moving paperunits... but it's not working...
I see there's a resize commmand, but I haven't been able to figure out how it works, and despite all I have searched through the web , I can't find an answer. If anyone out there knows the answer ... I would be happy to know it. Thanks
I

回答 (2 件)

Jan
Jan 2011 年 7 月 29 日

2 投票

You can set the figure size programmatically:
set(gcf, 'Units', 'pixels', 'Position', [10, 100, 1000, 400]);
Instead of gcf you can insert the figure handle, if you have stored it before.
Walter Roberson
Walter Roberson 2011 年 7 月 28 日

0 投票

Perhaps Oliver's export_fig would help.

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

質問済み:

2011 年 7 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by