Gnuplot: get disabled plots in script

33 Views Asked by At

In some gnuplot terminals (e.g., qt and wxt), there is the possibility to interactively disable certain plots by clicking with the mouse their entry in the key. Is there a possibility to retrieve the disabled plots in any way in the gnuplot script itself?

1

There are 1 best solutions below

1
Ethan On

The command you are looking for is toggle.

gnuplot> help toggle

 Syntax:
       toggle {<plotno> | "plottitle" | all}

 This command has the same effect as left-clicking on the key entry for a plot
 currently displayed by an interactive terminal (qt, wxt, x11). If the plot is
 showing, it is toggled off;  if it is currently hidden, it is toggled on.
 `toggle all` acts on all active plots, equivalent to the hotkey "i".
 `toggle "title"` requires an exact match to the plot title.  `toggle "ti*"`
 acts on the first plot whose title matches the characters before the final '*'.
 If the current terminal is not interactive, the toggle command has no effect.

You could bind the toggle commands to hot-keys:

bind '1' 'toggle 1'
bind '2' 'toggle 2'
bind '3' 'toggle 3'