Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Mathematics
General TopicsResearchOperations ResearchStatisticsMathematical LogicNumerical AnalysisUndergraduate MathAlgebra HelpRecreational Math
Math Software
MapleMathematicaMATLABScilabSASSPSS

Math Forum / Math Software / MATLAB / July 2008



Tip: Looking for answers? Try searching our database.

Print Toolbar using Saveas Figure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael - 28 Jul 2008 19:22 GMT
I am trying to save a figure after each iteration of a for
loop, but the formatting is not preserved.  When I save the
file as a .jpg, the font size is increase from the default
font size to around size 18 and the windows taskbar is not
printed.  When I save the figure as a .bmp, the original
font size is preserved, but windows taskbar is also printed.
I do not want the windows taskbar printed because it shows
what other programs are running during the matlab execution.  

I have tried to use set(figure(1),'defaultaxesfontsize',12),
but I still get an increase in font size when saving it as a
.jpg.  How can I save a figure with all the text in the
figure set as size 12 and not have the windows taskbar
displayed?

~Michael
Walter Roberson - 28 Jul 2008 19:28 GMT
>I am trying to save a figure after each iteration of a for
>loop, but the formatting is not preserved.  When I save the
[quoted text clipped - 4 lines]
> I do not want the windows taskbar printed because it shows
>what other programs are running during the matlab execution.  

Does the windows taskbar overlap a portion of the screen
where the window should be? If so then perhaps when the
pixels are read out of the screen buffer, the taskbar pixels
are being read out. Solution: make the figure smaller so it
doesn't overlap the task bar, or move the task bar so it doesn't
overlap the portion of the screen that is being copied.
Signature

 "Product of a myriad various minds and contending tongues, compact of
 obscure and minute association, a language has its own abundant and
 often recondite laws, in the habitual and summary recognition of
 which scholarship consists."                -- Walter Pater

Michael - 28 Jul 2008 22:07 GMT
roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
message <g6l34a$4kn$1@canopus.cc.umanitoba.ca>...
> >I am trying to save a figure after each iteration of a for
> >loop, but the formatting is not preserved.  When I save the
[quoted text clipped - 11 lines]
> doesn't overlap the task bar, or move the task bar so it doesn't
> overlap the portion of the screen that is being copied.

Walter,

Thanks for the suggestion.  I'm pretty sure that is what is
the problem.  Because multiple users will eventually use
this program, each (presumably) with a different screen
resolution, I used

set(gcf,'units','normalized','outerposition',[0 0 1 1]);

to maximize the figure window.  Is there an easy way to set
the maximum size of the figure window to account for the
taskbar and exclude these pixels in the saveas/print command?

~Michael
Michael - 01 Aug 2008 00:38 GMT
Okay, so I guess I should have played with the file formats
a little bit more.  Instead of saving as a .bmp (which is a
bitmap anyways, and therefore pixelated), I saved it as a
.emf (which is a vector format).  This resolved the toolbar
showing up issue and allows for non-pixelated scalable plots.

I used the following to maximize the window:
set(gcf,'units','normalized','outerposition',[0 0 1 1]);

I used the following to save:
saveas(figure(1),'filename','emf')

Works quite well.

~Michael

"Michael " <humpface@hotmail.com> wrote in message
<g6lcdm$i47$1@fred.mathworks.com>...
> roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in
> message <g6l34a$4kn$1@canopus.cc.umanitoba.ca>...
[quoted text clipped - 36 lines]
>
> ~Michael
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.