From: Claudio Pedrazzi on 26 May 2010 04:41 Thanks a lot "vortse_a", I'm replying to your answer because I have the same problem. I have tried your suggestion, and it works. Only, I would like that the figure, the .fig file, when double clicked, just simply be displayed in MATLAB without the need of issuing any command to activate visibility. As it works now, the .fig file, when doble clicked, produces no display. So the final question, at least from my side, is: is it possible, in a batch program, to save a few figures without interacting with the screen at all? And the saved figures should be .fig (with graphics files, all is ok, for example .png works fine). Best regards
From: us on 26 May 2010 06:06 "Claudio Pedrazzi" <firstnameinitial.lastname(a)company.it> wrote in message <htimr3$fl1$1(a)fred.mathworks.com>... > Thanks a lot "vortse_a", I'm replying to your answer because I have the same problem. I have tried your suggestion, and it works. > > Only, I would like that the figure, the .fig file, when double clicked, just simply be displayed in MATLAB without the need of issuing any command to activate visibility. As it works now, the .fig file, when doble clicked, produces no display. > > So the final question, at least from my side, is: is it possible, in a batch program, to save a few figures without interacting with the screen at all? And the saved figures should be .fig (with graphics files, all is ok, for example .png works fine). > > Best regards one of the many solutions tmpl='afig'; % <- the file name template... for i=1:3 fnam=sprintf('%s_%2.2d',tmpl,i); % <- current file name... clf; plot(rand(10,1)); saveas(gcf,fnam,'fig'); end dir('afig*.*'); % afig_01.fig afig_02.fig afig_03.fig us
From: Claudio Pedrazzi on 26 May 2010 09:09 thanks us, probably I did not explain correctly what I'm looking for. I would like to save without any plot activity on the screen! Imagine the following scenario... a long MATLAB application, running "in background", needing now and then to save a few plots. The user on the PC is doing something else ... every plot command produces a popup window that interrupts any other activity, jumping in the foreground. Your example, in my understanding, does work, and is familiar to me, but it opens a "figure" window 3 times. What I need is something like a "silent" saving of figure. Best regards & thank you Claudio
From: Oliver Woodford on 26 May 2010 09:38 "Claudio Pedrazzi" wrote: > What I need is something like a "silent" saving of figure. >> h = figure('Visible', 'off') >> plot(rand(10,3)); >> set(h, 'Visible', 'on'); saveas(h, 'test.fig'); set(h, 'Visible', 'off');
From: Walter Roberson on 26 May 2010 10:13 Claudio Pedrazzi wrote: > Only, I would like that the figure, the .fig file, when double clicked, > just simply be displayed in MATLAB without the need of issuing any > command to activate visibility. As it works now, the .fig file, when > doble clicked, produces no display. That could happen if the stored figure happens to have 'Visible' set to 'off'. If so, then you cannot display it without using at least one command at some point in time. > So the final question, at least from my side, is: is it possible, in a > batch program, to save a few figures without interacting with the screen > at all? And the saved figures should be .fig (with graphics files, all > is ok, for example .png works fine). http://www.mathworks.com/access/helpdesk/help/techdoc/ref/print.html And search down to "Printing and Exporting without a Display"
|
Pages: 1 Prev: Create a S-Function in a GUI Next: classregtree -- Can X be categorical variable(s) ? |