texmacs-dev
[Top][All Lists]
Advanced

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

[Texmacs-dev] GNUplot interface


From: Stephan Mucha
Subject: [Texmacs-dev] GNUplot interface
Date: Mon, 3 Feb 2003 11:23:09 +0100

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.

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.)

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

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.




Regards,
Stephan

mailto:address@hidden

Attachment: tm-gnuplot.scm
Description: Binary data

Attachment: init-texmacs.scm
Description: Binary data

Attachment: tm-gnuplot
Description: Binary data


reply via email to

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