Setting common colorbox for all graphs in multiplot in gnuplot

gnuplot

Solution

As Christoph mentioned, this can be done with `set`/`unset` `colorbox`. In your case, I highly recommend that you `plot ... with image` rather than use `set pm3d map`. But it can be done both ways, see Christoph's comment below.

What you need is something along these lines (change the details to accommodate it to your needs):

set multiplot
# Set left and right margins for both plots:
set lmargin screen 0.1 ; set rmargin screen 0.8
# Set ranges and *in this case* isosamples to make the graph look better
set xrange [-1:1] ; set yrange [-1:1] ; set isosamples 100
# Options for the first graph: set top and bottom margins and unset colorbox
set tmargin screen 0.9 ; set bmargin screen 0.6 ; unset colorbox
# Plot it
plot "++" u ($1):($2):(sin($1*$2)) with image
# Options for second graph
set tmargin screen 0.4 ; set bmargin screen 0.1
# Set colorbox with customize options
set colorbox user origin 0.85,0.1 size 0.05,0.8
# Plot it
plot "++" u ($1):($2):(cos($1*$2)) with image

Voilà:

Problem

I am generating a multiplot with 2 rows and 2 columns. I am using pm3d map for individual graphs. The generated picture is shown below: In this picture, each individual graph has its own colorbox and axes labels. I would like to have common colorbox for all these graphs and would like to give common i and j indices after drawing common x and y axes. How can I do this? Thanks in advance.

Original source

Related problems