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 ]
Saravanan Mani

Posts: 28
Registered: 6/3/11
Re: saving current figure?
Posted: Jul 26, 2012 3:24 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

hello,
t = 0:0.001:10;
x = sin(2*pi*t);
fh = figure('Name','Test',...
'numbertitle','off');
plot(t,x,'g');
msgf = questdlg('Do you want to save your figure window','YES','NO');
if length(msgf) > 2
% we can our filename like example 'test' and which format you want
% save like jpg
saveas(gcf,'test','jpg');
elseif length(msgf) > 1
disp(' do nothing')
end

Can you please try this and let me know
BR,
Saravanan Mani


"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




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

[Privacy Policy] [Terms of Use]

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