[apluslist] Surface plots in A+
Alexander Skomorokhov
askom at obninsk.com
Thu Sep 9 17:02:03 EDT 2004
Hi Pedro,
Better late than never. I missed this message somehow...
I suggest using gnuplot for 3D (and maybe other) plotting. Prepare small
file of
gnuplot commands like the following:
---------------------------------------------
sasha at suse82:~> cat gp
#!/bin/bash
(echo 'set terminal postscript'
echo 'set output "fig.ps"'
echo 'plot "tmp.dat"')>temp.gp
gnuplot temp.gp
\rm temp.gp
---------------------------------------------
I was lazy to prepare data for 3D and use command "plot" here. You have to
use
gnuplot command "splot" for 3D plotting. In the file above you may also set
your
axis labels and stuff like that.
Make it executable:
---------------------------------------------
sasha at suse82:~> chmod +x gp
---------------------------------------------
Now in A+, for example,
---------------------------------------------
$mode ascii
rho m //variable to plot
100 2
$>m tmp.dat //write it to tmp file
sys.system{"./gp"} //plot it with gnuplot
0
---------------------------------------------
Back to shell. File with postscript of your figure:
---------------------------------------------
sasha at suse82:~> ls fig.ps
fig.ps
View it:
sasha at suse82:~>gv fig.ps
---------------------------------------------
Hope this helps.
Regards,
Sasha.
> -----Original Message-----
> From: apluslist-bounces at aplusdev.net
> [mailto:apluslist-bounces at aplusdev.net]On Behalf Of Pedro
> Rodrigues de Almeida
> Sent: Saturday, August 07, 2004 5:37 PM
> To: apluslist at aplusdev.net
> Subject: [apluslist] Surface plots in A+
>
>
> Hi!
>
> Is there an obvious way to produce 3D renditions of functions of two
> variable in A+ (for instance, just like in J)? and if so, could you
> please direct me to the right reference (so far I did not find anything
> in the online manuals).
>
> Thanks,
>
> Pedro Rodrigues de Almeida
> Helsinki - Finland
>
> _______________________________________________
> apluslist mailing list
> apluslist at aplusdev.net
> http://aplusdev.net/mailman/listinfo/apluslist
>
>
More information about the apluslist
mailing list