Thank you for your replay, Larry,
> The only way I know to use Maxima+Gnuplot
> to plot data is to save the data as text
> file and use Gnuplot (or Octave, R, or even
> a spreadsheet) to do the plot.
>
I have been playing for a while with Maxima+Gnuplot and now I can plot my data
from within Maxima.
First, I define the following function:
dataplot(data):=
block([numer:true, total:length(data), lin:linel],
with_stdout("points.data",
for k from 1 thru total do
print(string(data[k][1]), string(data[k][2]))),
s1:sconcat("set terminal postscript eps; ",
"set out 'dataplot.eps'; ",
"set data style lines; ",
"plot 'points.data'; "),
linel:30,
with_stdout("source_eps.gp",print(s1)),
s2:sconcat("set terminal x11; ",
"set data style lines; ",
"plot 'points.data'; ",
"pause -1; "),
with_stdout("source_x11.gp",print(s2)),
linel:lin,
system("gnuplot source_x11.gp"),
"bye!")$
and now,
(%i10) load(bessel)$ sample:makelist([i,gauss(0,1)],i,1,50)$
(%i12) dataplot(sample);
I get:
a) a gnuplot window with the plotted data,
b) the file "points.data" with the sample,
c) the gnuplot source file "source_x11.gp", which is executed from
within the function,
d) the gnuplot source file "source_eps.gp", which I can use to get
the "dataplot.eps"
Mario.
> L. Prevett
> Mathematics Instructor
> Cochise College, Sierra Vista, AZ, US
> prevettl@cochise.edu
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima