[Scilab-users] Suppressing figure window
tim at wescottdesign.com
tim at wescottdesign.com
Sun Dec 14 00:08:05 CET 2014
Thank you. With a bit of tweaking to my makefile, this should work
splendidly.
This is the code I ended up with in the one script I've modified so far:
driver("ps");
xinit("motor-PD-friction.eps");
g = gcf();
g.figure_size = [600, 400];
xgrid(2);
plot2d(Tstart:Tstep:Tstop, [xf(1:2, :)' uf]);
legend(['velocity' 'position' 'drive']);
xend();
I am pleased that not only will it direct to a file, but that I can
still control the aspect ratio of the output and add grids, titles and
legends.
On 2014-12-13 04:47, Calixte Denizet wrote:
> Hi Tim,
>
> You could use the function driver:
>
> my_path = "/tmp";
> driver("pdf"); // select the driver to use
> xinit(my_path+"/foo.pdf") // set the output file name
> plot2d(); // draw something
> xend();
>
> Best regards
>
> Calixte
>
>
> On 13/12/2014 00:38, Tim Wescott wrote:
>> I have some papers that I maintain on my web site, for example:
>> http://wescottdesign.com/articles/Sampling/sampling.pdf.
>>
>> These are authored in lyx, with some figures generated with Scilab.
>> The
>> site is archived as software, and built using a makefile, including
>> the
>> pdf files. Rather than keeping the figures as generated graphics
>> files,
>> I keep the Scilab files and generate the figures as needed.
>>
>> To generate a figure, make runs it's generating script from a shell,
>> e.g.
>>
>> scilab -nw -nb -e
>> "execstr(['errcatch(-1,''kill'')';'scf';'exec(''motor-PD-friction.sce'');';'quit'])"
>>
>> When this happens Scilab silently opens, but when it actually makes
>> the
>> figure it opens the window on top of whatever is running, draws it,
>> then
>> closes it. Since I have several papers on the site (and its growing),
>> this means that I can't leave the make running in the background and
>> get
>> work done, because I'm constantly getting windows created in my face.
>>
>> It's kind of like trying to read in the same room as a cat, except
>> that
>> Scilab figures are not warm and fuzzy, and they do not purr.
>>
>> Is there a way to tell Scilab to create a figure but to keep it
>> minimized? Alternately, is there a Unix trick to tell the OS to act
>> like everything is going to a monitor, but suppress it?
>>
>> Thanks in advance.
>>
More information about the users
mailing list