One title for multiplot in gnuplot

gnuplot

I am using gnuplot to create two plots next to each other. I would like to give the whole thing one title, but if I use the standard set title "blah" command I get two titles – one for each plot. How can I get only one title (centered above the plots)?

Best Answer

try:

set multiplot layout 1,2 title "blah"

Of course, this can be can be combined with the set title commands so you can have a page title (from multiplot) and then individual plot titles (from set title).

Here's a stupid example illustrating all of the different places that "title" is used.:

set multiplot layout 1,2 title "Sine and Cosine"
set title "Sine is coolest!"
plot sin(x)

set title "Cosine is coolest!"
plot cos(x) title "Cool",tan(x) title "Lame"

If you want more fine control over the page title, you can always use a label specifying the coordinates as screen. Just add this before the last plot and you're all set. (If you add it before the first plot, the same label may be drawn a few times which is probably not what you want.)

For example:

set label "Sine and Cosine" at screen 0.5,0.95 center front

`

Related Topic