[newbie] zero file length when plotting (gnuplot-syntax)
Subject: [newbie] zero file length when plotting (gnuplot-syntax)
From: Hugo Coolens
Date: Tue, 7 Dec 2010 08:13:21 +0100
On Mon, 6 Dec 2010, Leo Butler wrote:
>
>
> On Mon, 6 Dec 2010, Hugo Coolens wrote:
>
> < I'm trying to make a pslatex-file from a plot as follows:
> <
> < deltaurlrel(x):=1-1/(x*(1-x)*%beta+1);
> < relplots:makelist(deltaurlrel(x),%beta,[0.1,0.213,0.444,1,4.545]);
> < plot2d(relplots,[x,0.01,1],[legend,"beta0.1","beta0.213","beta0.444","beta1","beta4.545"],[gnuplot_preamble,"set
> < terminal pslatex; set output 'plotrel.tex';"]);
> <
> < unfortunately the resulting file "plotrel.tex' is empty
> < can anyone here tell me what (syntax?) error I'm making here?
>
> Hugo, this works in 5.22.1,
>
> plot2d(relplots,
> [x,0.01,1],
> [legend,"beta0.1","beta0.213","beta0.444","beta1","beta4.545"],
> [gnuplot_term,'pslatex],
> [gnuplot_out_file,"example.tex"]);
This solves my problem, however I can't figure out how to set the
size properly. I tried (reading the documentation):
plot2d(relplots,[x,0.01,1],[legend,"beta0.1","beta0.213","beta0.444","beta1","beta4.545"],[gnuplot_term,'pslatex],[gnuplot_ps_term_command, set size 25cm,18cm],[gnuplot_out_file,"example.tex"]);
I als tried:
[gnuplot_term,'pslatex size 25cm, 18cm]
but this doesn't work neither.
can anyone tell me how to set the size properly?
thanks in advance
hugo
>
> A while ago (< 1year), plot2d changed and now inserts gnuplot preamble
> above the gnuplot code it writes. Tere is an effort to determine if
> gnuplot preamble sets the output, but I can see this a a no-win
> situation: to do it correctly, you almost need to build the gnuplot
> interpreter inside of Maxima.
>
> Here's my advice: if you want to write gnuplot code, dump your data
> to a file and write the gnuplot code in a separate file. Otherwise,
> avoid gnuplot preamble in Maxima. Note that draw offers quite an
> extensive front-end to gnuplot features, so if you want to stay in
> Maxima,, you can use it.
>
> I'm saying this after spending this semester re-writing an entire
> course's worth of Maxima plot2d code that was written like yours
> with lots of stuff packed into gnuplot preamble.
>
> Leo
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>