texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] GNUplot interface


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] GNUplot interface
Date: Mon, 3 Feb 2003 23:43:35 +0100 (MET)

Dear Stephan,

> Ages ago Joris suggested me to make an interface for gnuplot.
> After reading some documentation I made such an interface. I decided
> to do it in the simplest manner possible: as bash script, which I
> named "tm-gnuplot" to show that the script is not gnuplot itself.
> I hope to receive some feedback, whether others
> find this reasonable. I choosed this option for the following reasons:
> 
> 1. gnuplot has not to be changed (no programming, compiling etc.)
> 2. very simple changing of the script is possible
> 3. differences between the platforms can be handled easily (for
> example I use the windows version of gnuplot on my windows/cygwin
> platform. the "pipable" binary of this version is named "pgnuplot.exe"
> and not "gnuplot" as on unix/linux platforms.
> 4. the possibility to define new plot command
> 
> The script is a very simple but working (with one error, see below)
> possibility to get gnuplot working with TeXmacs.

Thank you very much for this useful contribution.
I included it for the next distribution of TeXmacs
(I modified some things as you will soon find out).

> IMHO, it would be good (as final aim) to have a
> menu item for inserting graphs, invoking a function that suggests to
> use the expression in the current selection as plot expression, and
> should work immediately if the current expression is a formula of a
> function or a vector of values. the attached implementation of the
> interface script tries to follow the interface conventions of TeXmacs
> even if there are some differences to cas, for which the interface
> functionality was mainly designed ("--texmacs" option, only one input
> line per output object, etc.)

You might try to implement this in the gnuplot.scm
scheme initialization file. Please see

        ftp://ftp.texmacs.org/pub/TeXmacs/misc/mycas-demo.tar.gz

for some examples on how this works.

> As output format I used the possibility to send postscript. Any
> pinions about a better way?

For the moment this is OK. Later we will have native TeXmacs graphics.

> The tm-gnoplot.scm file for the  ..../progs/cas diretory was derived
> by doing the minimal changes to mycas.scm.
> 
> BTW, it is needed under cagwin to change the binary names of cas to
> "cas-name.exe" within the if-line of the
> 
> (if (file-exists? "$PATH" "cas-name")
>     (exec-file "$TEXMACS_PATH/progs/cas" "cas-name.scm"))
> 
> expression in init-texmacs.scm because for compatibility with windows
> most binaries are named with ".exe" extensions. Another possibility
> is a link to the exe-binary named without extension.

Please try to figure out an automatic way in the script
in order to select the appropriare way to launch GNUplot.
At the moment, I selected the unix-way...

Best wishes and thanks again, Joris





reply via email to

[Prev in Thread] Current Thread [Next in Thread]