fkk
fkk

Reputation: 5

gnuplot, is there a way to switch the gui background color to black?

Is there a way to switch the colors of the gnuplot gui: background to black and text to grey or any other light color.

I'm not talking about the console. I'm not talking about the plotting area.

I use gnuplot under windows, with a dark theme. This kind of bright window literally burn my eyes.

gnuplot snapshot

Upvotes: 0

Views: 39

Answers (1)

theozh
theozh

Reputation: 26123

You probably have to go to the gnuplot source code and change some settings there to get a dark mode gnuplot console. Maybe you could also do some settings in the wgnuplot.ini or gnuplot.ini files (which I guess you have to create first). Since I don't have this in-depth insight, I can not make any suggestions for the ini-file or source code, where to find and how to change.

Actually, how do you write and modify your gnuplot scripts? In the bright mode gnuplot console which "burns" your eyes by typing your commands line by line and if corrections are necessary you type them again and replot? Don't you save your gnuplot scripts in a file?

The way how I typically write, modify, optimize and fine-tune gnuplot scripts is within a text editor (actually, Notepad++). In the gnuplot console I load the script, e.g. via load "SO79459284.gp" (and simply by the key "arrow up" to re-call the last command) and repeat the same after every modification in Notepad++.

Hence, here my suggestion to preserve your eyes from bright-mode as much as possible:

  • set your text editor (e.g. Notepad++) to dark mode
  • save your script in a file, e.g. SO79459284.gp
  • minimize the size of the (bright mode) gnuplot console just large enough that you can type, e.g. load "SO79459284.gp"
  • get your output, e.g. in a wxt or qt window, or as file on disk via some other terminals, e.g. pngcairo,pdfcairo, svg, ...

In order to avoid the bright mode gnuplot console completely, you could also start gnuplot from the (by standard dark mode) Windows command line (after eventually setting the PATH environment variable inculding the gnuplot.exe directory):

gnuplot -c SO79459284.gp

But it's probably not very fast and efficient to (re-)start gnuplot every time from scratch for every little change in the script.


Notepad++ in dark mode with script:

enter image description here

gnuplot console (still) in bright mode, but minimized size:

enter image description here

Output in wxt window:

enter image description here

Upvotes: 0

Related Questions