Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #4325
| From | Jörg Buchholz <bookwood4new@freenet.de> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Legend behavior would multiplot |
| Date | 2020-04-20 14:31 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <r7k4mb$p45$1@dont-email.me> (permalink) |
| References | <3095ba79-70e8-4f1d-9c1f-c2f2b7561b3f@googlegroups.com> |
On 14.04.20 22:43, Darby wrote:
> I've run into a problem with controlling the legend when using
> multiplot. I want the legend to stay in 1 column on the right side
> of the plot. With just a single plot per page, this works. But if I
> use multiplot (4 plots per page, layout 2,2), the legend wants to
> split into multiple columns, even if I try to force it to one column
> with "maxcols 1". In this case, the legend is too wide and obscures
> some of the plots. However, a multiple with two tall plots side by
> side seems to do the right thing. So it seems like this is tied to
> the size of the plot, not the page. I've recreated this with some
> simple examples below. I'm using gnuplot 4.6 patchlevel 2 on CentOS
> 7.7.
You can do a "dummyplot" only for the key. This works with older
versions than 5.2
reset
unset key
set xrange [-pi:pi]
set multiplot
set size 0.4,0.5
set origin 0.0,0.0
plot for [i=1:5] 10*sin(i*x) w l t 'sin',\
for [i=1:5] 10*cos(i*x) w l t 'cos',\
for [i=1:5] i*x w l t 'line',\
for [i=1:5] -i*x w l t 'line'
set size 0.4,0.5
set origin 0.0,0.5
replot
set size 0.4,0.5
set origin 0.4,0.0
replot
set size 0.4,0.5
set origin 0.4,0.5
replot
#---dummyplot--------
set key left
set size 0.2,1.0
set origin 0.8,0.0
unset grid
unset tics
unset border
set xrange [0:1]
set yrange [0:1]
plot for [i=1:5] (10*sin(i*x))-10 w l t 'sin',\
for [i=1:5] (10*cos(i*x))-10 w l t 'cos',\
for [i=1:5] (i*x)-10 w l t 'line',\
for [i=1:5] (-i*x)-10 w l t 'line'
unset multiplot
Jörg
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar
Legend behavior would multiplot Darby <darby.vicker@gmail.com> - 2020-04-14 13:43 -0700 Re: Legend behavior with multiplot Darby <darby.vicker@gmail.com> - 2020-04-14 13:47 -0700 Re: Legend behavior would multiplot Jörg Buchholz <bookwood4new@freenet.de> - 2020-04-16 13:22 +0200 Re: Legend behavior would multiplot Jörg Buchholz <bookwood4new@freenet.de> - 2020-04-20 14:31 +0200
csiph-web