Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set default terminal of gnuplot

Tags:

gnuplot

Is there any way that I can set default terminal in gnuplot? I am trying to set the default terminal to x11 but it is always aqua when start up. Thanks.

like image 400
Jiang Xiang Avatar asked Nov 14 '13 21:11

Jiang Xiang


People also ask

What is terminal type on gnuplot?

gnuplot provides the x11 terminal type for use with X servers. This terminal type is set automatically at startup if the DISPLAY environment variable is set, if the TERM environment variable is set to xterm, or if the -display command line option is used.

Where is gnuplot ini?

It is called wgnuplot. ini and it can be found in the %APPDATA% directory.


2 Answers

The only way I know is to add a line to the .gnuplot (or gnuplotrc or gnuplot.ini) file that is loaded on startup. (This file may live in your home directory or elsewhere depending on your gnuplot version / configuration, and you can see where it lives with the show loadpath command.) Here is the line to add:

set term x11

The commands in this file are executed before any others when gnuplot is run.

like image 189
andyras Avatar answered Sep 18 '22 09:09

andyras


While @andyras' answer works, there is still this notification about the old terminal when starting new session - I wanted to change windows to wxt: when I changed my gnuplotrc to have wxt the greeting message still mentioned windows:

PS C:\Users\Ev> gnuplot
...
Terminal type is now 'windows'
...

Although it was indeed using wxt now:

gnuplot> show t

   terminal type is wxt 0 enhanced

I found the way to fix it in readme in the folder with the program, in my case C:\Program Files\gnuplot\README-Windows.txt:

If GNUTERM is defined, it is used as the name of the terminal type to be used.

So instead of the files, I set up the env var GNUTERM.

like image 26
Evgeniia Vakarina Avatar answered Sep 17 '22 09:09

Evgeniia Vakarina