[Maxima] Issues with the Maxima plugin running draw2d() and draw3d() commands

I have Maxima 5.43.2 installed in /opt/local/bin/ on my OSX 13.7 system. When I call Maxima from a terminal and run a draw[2|3]d command, gnuplot is opened, as it should be, in a wxt-terminal.

A Maxima session within TeXmacs 2.1 calls exactly the same Maxima 5.43.2 from the directory mentioned above.

However, running a draw[2|3]d command in a Maxima session launches gnuplot a in X11-terminal.

  • Why is that?

  • Which command in which of the plugin-files causes the reconfiguration/overriding of my gnuplot terminal settings?

  • How can I make sure that the Maxima plugin opens gnuplot in a wxt-terminal?

Any ideas welcome,
Tilda

Ideally you do not want any of these, but to include the graph in TeXmacs without opening a window as others plugin do. I’m not a maxima users myself. Maybe this is a question to ask in texmacs-devel where maybe the maintainer of the maxima package may be listening. We should however copy the answer here to keep track of it.

From other messages on the forum, it seems that on Mac OS, starting from the terminal or through the menus makes a difference to the environment TeXmacs sees. Perhaps it also affects the preferred terminal? You could try to start TeXmacs from the terminal as well.

For this side of the issue, the answer is using tm_plot and the series of tm_... drawing commands:

There is a thread on texmacs-dev on this topic, here are two messages:

https://www.mail-archive.com/texmacs-dev@gnu.org/msg03479.html
https://www.mail-archive.com/texmacs-dev@gnu.org/msg03562.html

Did not check the svn revisions, but there are two related commits in github. There are also a few examples in the help file :slight_smile:

1 Like

You can use tm_plot2d(), tm_plot3d(), tm_draw2d() and tm_draw3d() to create embedded plots.

1 Like

Thanks for all your replies.

Is this a feature or a bug? I couldn’t test as trying to run texmacs & from a terminal returned -bash: texmacs: command not found.

Having run diff on the files, the latest version of texmacs-maxima.lisp seems to have incorporated the suggestions brought up in the discussions you referred to above.

Of course, I could use

if I wanted to have embedded plots. However I’m not a great fan of them.

  1. embedded plots extremely bloat larger *.tm-documents

  2. they create a lot of junk files in $TEXMACS_HOME_PATH/system/tmp

  3. a gnuplot wxt-window allows for the use of cursors and zooming, plus save as options.

  4. compared to the output produced by draw[2|3]d from a gnuplot wxt-terminal when running Maxima from a terminal, the design and formatting of the plots created the series of tm_(...) commands are decidedly ugly, at least for my liking:

  • they look more like badly formatted Excel plots, with font sizes being much too large and bold

  • produce plot renderings of inferior quality as the line drawings are no longer delicate enough – that may be fine for beamer presentations but not for print publications.

btw, this issue doesn’t seem to be restricted to the Maxima plugin. I noticed the same “decline” in quality when rendering plots from within the Octave plugin and wonder what is the rationale behind that.

Interestingly enough, running plot[2|3]d in a Maxima session from within TeXmacs still opens a gnuplot wxt-terminal.

Tilda

I found a work-around for the issue that the plug-in doesn’t launch gnuplot in a wxt-terminal when using draw[2|3]d commands. Within a Maxima session I now do the following:

set_draw_defaults(
terminal=wxt
)$

This prevents x11-terminals from being opened and ensures launching wxt-terminals instead.

Cheers
Tilda

1 Like