Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: saving current figure?
Replies: 7   Last Post: Jul 27, 2012 4:29 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 147
Registered: 3/7/08
Re: saving current figure?
Posted: Jul 26, 2012 2:29 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Jessica" wrote in message <jurm3n$q3k$1@newscl01ah.mathworks.com>...
> "Oliver Woodford" wrote in message <jurhqu$7tq$1@newscl01ah.mathworks.com>...
> > "Jessica" wrote in message <jupo0m$kdk$1@newscl01ah.mathworks.com>...
> > > Hi,
> > >
> > > Can anyone give suggestions about how to save the current figure with a specified DPI AND save it with the same dimensions it shows according to the axis. My current figure is 96 dpi and 1280 x 1024 pix and I want to save this (as a .jpg or .bmp) with the same properties. I also don't want to save the extra border around the figure (that is outside the figure handle).
> > >
> > > Thanks

> >
> > export_fig (http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig) does this if you save as png or tiff.

> The figure I load is 1280 x 1024. When I save it with:
> export_fig test3.png -r96
> It outputs a figure with 96 dpi but with 684x547.
> When I save it with:
> export_fig test3.png -r96 -m2 or export_fig test3.png -r48 -m2
> It outputs a figure with 180 dpi and 1281 x 1025.
> Any suggestions for getting it to 96 dpi and 1280 x 1024?

Also, is it possible to use export_fig to save the file with a certain name:

i=1; Filename=strcat('Picture',num2str(i),'.tiff');

export_fig Filename -r96

so that the file is called "Picture1" rather than "Filename"

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.