By default gnuplot uses the default visual of the screen. The number of colors which can be allocated depends on the visual class chosen. On a visual class with a depth 6#6 12bit, gnuplot starts with a maximal number of 0x200 colors. On a visual class with a depth 6#6 8bit (but 5#5= 12 bit) the maximal number of colors is 0x100, on 5#5= 8bit displays the maximum number of colors is 240 (16 are left for line colors).
Gnuplot first starts to allocate the maximal number of colors as stated above. If this fails, the number of colors is reduced by the factor 2 until gnuplot gets all colors which are requested. If dividing maxcolors by 2 repeatedly results in a number which is smaller than mincolors gnuplot tries to install a private colormap. In this case the window manager is responsible for swapping colormaps when the pointer is moved in and out the x11 driver's window.
The default for mincolors is maxcolors / (num_colormaps 6#6 1 ? 2 : 8), where num_colormaps is the number of colormaps which are currently used by gnuplot (usually 1, if only one x11 window is open).
Some systems support multiple (different) visual classes together on one screen. On these systems it might be necessary to force gnuplot to use a specific visual class, e.g. the default visual might be 8bit PseudoColor but the screen would also support 24bit TrueColor which would be the preferred choice.
The information about an Xserver's capabilities can be obtained with the program xdpyinfo. For the visual names below you can choose one of StaticGray, GrayScale, StaticColor, PseudoColor, TrueColor, DirectColor. If an Xserver supports a requested visual type at different depths, gnuplot chooses the visual class with the highest depth (deepest). If the requested visual class matches the default visual and multiple classes of this type are supported, the default visual is preferred.
Example: on an 8bit PseudoColor visual you can force a private color map by specifying gnuplot*maxcolors: 240 and gnuplot*mincolors: 240.
|gnuplot*visual: visual name|