Expand the figures?
5 次查看(过去 30 天)
显示 更早的评论
Hi everybody,
I have a fig file and I want to export it as a png, tif or jpeg file. I know how to do this (File - Export Setup). But graphics do not fill the field completely. So when I want to use the file in the word it looks like the following:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/336940/image.jpeg)
I mean, I want to expand my graphics to blue dots as like following:
How can I do this in MATLAB? (The fig. file is attached.)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/336943/image.jpeg)
5 个评论
dpb
2020-7-27
Yes, but you can do it programmatically -- altho you'll have to work out how much to move which image as the necessary room for the y-axis labels is quite a lot larger for some than others owing to the additional significant digits.
You can do things globally; the following changes all, albeit then they overlap some so you'll need to back off from this extreme...
hF=openfig('untitled.fig'); % get the figure handle -- you should already have or use gcf
hAx=findobj(hF,'type','Axes'); % and get all axes handles
set(hAx,{'Position'},get(hAx,'OuterPosition')) % set all to 'OuterPosition' limits -- no space
As noted, you'll just have to work out how far you can move each and spread them out; the leftmost and rightmost columns can end up with left|left+width at the above limits; the center column may just need to grow a little in width.
I didn't spearmint further...as said, the ones with five digits of precison on y-axis will have to either be narrower than the others or you'll have to replicate the appearance of the original by leaving more space to the left if the axes themselves are to be aligned.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!