problem with plotdf



Hi all,

from how I understand plotting using openmath works is that xmaxima
makes these plots by itself without calling the omplotdata script.
Most of omplotdata script is probably included in the xmaxima script.
I guess this behaviour is controlled by in_netmath and show_openplot
variables. If you set in_netmath to false and show_openplot to true
plotting does not work in xmaxima.

Other interfaces (wxmaxima, wintexmacs, commandline) would use the
omplotdata script to plot using openmath. This does not work because:

1) tcl/tk is usually not installed by default on windows

2) the script is called omplotdata instead of omplotdata.tcl - the

#!/bin/sh
# comment \
exec wish84 "$0" "$@"

trick does not work on windows

3) omplotdata expects unix cat program to be installed - this is near
the end of omplotdata

if { [lindex $argv 0] == "plotdf" } {
    lappend omcommand "plotdf"
} else {
    lappend omcommand [exec cat [lindex $argv 0]]
}

I propose that we change omplotdata to omplotdata.tcl and somehow deal
with problem 3). Then if someone complains that plotting using
openmath does not work we can simply say that tcl/tk needs to be
installed. (BTW, I always copy omplotdata to omplotdata.tcl and add
the cat program and plotting using openmath works since I have tcl/tk
installed - there's no need to edit the plot.lisp file).

As for using plotdf from console (or wxmaxima) - this will not work
out of the box even if we have openplot working. I can provide a patch
for plotdf.lisp which fixes this if anyone is interested.

HTH,
Andrej


On 5/31/06, Jaime E. Villate <villate at gnu.org> wrote:
> On Wed, 2006-05-31 at 20:22 +0300, Vadim V. Zhytnikov wrote:
> > > 4-INSTALL-OMPLOTDATA-TO-USE-OPENMATH-IN-CONSOLE-MAXIMA
> > > omplotdata.exe
> > I'll try.  But I'm not sure that it will work with
> > omplotdata.exe out of the box without some small
> > modification to plot.lisp
>
> You are more familiar than me with the subject, but just in case, I
> will tell you the issues that I see here:
>
> 1- Maxima must be able to create the file maxout.openmath somewhere
> in windows. I guess plot2d has already faced that difficulty with
> the creation of maxout.gnuplot
> (plotdf does not create any files, so these issue does not apply to it)
>
> 2- The file omplotdata.exe that you create should accept arguments
> as a TCL script does in Linux:
>   path\omplotdata -option1 value1 -option2 value2 ... [file]
>
> Using the maxout.openmath file created by
> plot2d(sin(x),[x,0,6],[plot_format,openmath]);
>
> a command such as:
> {Maxima_dir}\libexec\maxima\5.9.3\omplotdata maxout.openmath
>
> should show the plot.
>
> Jaime
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>