1
votes

I get an error, when I try to start gnuplot via cygwin (see below): Gnuplot does not seem to know the wxt-term, but according to this page (https://cygwin.com/pipermail/cygwin-announce/2020-July/009620.html), gnuplot should be able to know it.

After this I can use gnuplot by hand, e.g. typing in comments and it works normal. But usually a have automatic plot programs and the error will cause the program to crash, so I can't work with it properly.

Is there any way to force gnuplot to ignore the error? Or can I start gnuplot directly with a certain terminal (e.g. png)?

Thanks Sandra

$ gnuplot

        G N U P L O T
        Version 5.4 patchlevel 0    last modified 2020-07-13

        Copyright (C) 1986-1993, 1998, 2004, 2007-2020
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

Terminal type is now 'unknown'

set term wxt
         ^
unknown or ambiguous terminal type; type just 'set terminal' for a list

WARNING: Error during initialization

gnuplot>```
2

2 Answers

0
votes

Not tested but I suspect you need to use the gnuplot-wx package as there are several gnuplot packages:

gnuplot-base    A command-line driven interactive function plotting utility
gnuplot-doc A command-line driven interactive function plotting utility
gnuplot-qt5 A command-line driven interactive function plotting utility
gnuplot-wx  A command-line driven interactive function plotting utility
gnuplot-X11 A command-line driven interactive function plotting utility

https://cygwin.com/packages/summary/gnuplot-wx.html

0
votes

"Is there any way to force gnuplot to ignore the error?" No. When a gnuplot executable is built, someone has to choose which terminal types to include. This usually depends on what support libraries they have available to them when building it. Apparently your gnuplot executable was built without the wxt terminal. If you really need that particular output mode you will need to find a different gnuplot executable or build one yourself.

On the other hand - "can I start gnuplot directly with a certain terminal (e.g. png)?". Yes. There are at least three ways to do this.

  1. Define an environmental variable GNUTERM. For example

    export GNUTERM="png truecolor size 700,500"

(But that's a linux command. I don't whether there is an equivalent on Windows)

  1. Edit the initialization file to contain a line such as

    set term png truecolor size 700,500

    From the "help" text:

When gnuplot is run, it first looks for a system-wide initialization file gnuplotrc. The location of this file is determined when the program is built and is reported by show loadpath. The program then looks in the user's HOME directory for a file called .gnuplot on Unix-like systems or GNUPLOT.INI on other systems. (OS/2 will look for it in the directory named in the environment variable GNUPLOT; Windows will use APPDATA).

  1. Give the "set term" command as part of the command line when you run gnuplot:

    gnuplot -e "set term png truecolor size 700,500"