Discussion:
Can I increase the line width in the legend?
(too old to reply)
Jean-Pierre Coulon
2020-05-14 08:56:32 UTC
Permalink
I want to plot "something.txt" w l title "mything" with the usual line
width but can I increase the width of the sample portion of lines that
follows the titles?
--
Jean-Pierre Coulon
Jörg Buchholz
2020-05-14 10:39:57 UTC
Permalink
Post by Jean-Pierre Coulon
I want to plot "something.txt" w l title "mything" with the usual line
width but can I increase the width of the sample portion of lines that
follows the titles?
As a workaround you can use a "keyentry".


plot sin(x) w l lt 1 t '',keyentry w l lw 4 lt 1 t 'sin(x)'


Jörg
Jean-Pierre Coulon
2020-05-14 11:38:51 UTC
Permalink
Post by Jörg Buchholz
As a workaround you can use a "keyentry".
plot sin(x) w l lt 1 t '',keyentry w l lw 4 lt 1 t 'sin(x)'
I have:

plot 'demo.txt' w l title "example",\
'demo.txt' using 1:(2*$2) w l title "modif", keyentry w l lw 4 lt 1 title
"double

but it says: line5: undefined variable: keyentry
--
Jean-Pierre Coulon
Karl Ratzsch
2020-05-14 19:15:14 UTC
Permalink
Post by Jean-Pierre Coulon
Post by Jörg Buchholz
As a workaround you can use a "keyentry".
plot sin(x) w l lt 1 t '',keyentry w l lw 4 lt 1 t 'sin(x)'
plot 'demo.txt' w l title "example",\
'demo.txt'  using 1:(2*$2) w l title "modif", keyentry w l lw 4 lt 1
title "double
but it says: line5: undefined variable: keyentry
"keyentry" is a new thing in gp5.4 (a second release candidate will
likely be out in a few days). It produces an entry in the legend
without plotting anything.
Jörg Buchholz
2020-05-15 06:07:03 UTC
Permalink
Post by Jean-Pierre Coulon
Post by Jörg Buchholz
As a workaround you can use a "keyentry".
plot sin(x) w l lt 1 t '',keyentry w l lw 4 lt 1 t 'sin(x)'
plot 'demo.txt' w l title "example",\
'demo.txt'  using 1:(2*$2) w l title "modif", keyentry w l lw 4 lt 1
title "double
but it says: line5: undefined variable: keyentry
You can do the same with plotting something out of the yrange.

set yrange [0:10]
plot sin(x) w l lt 1 t'',-1 w l lt 1 lw 4 t 'sin(x)'

tested with Version 5.2 patchlevel 6

Jörg
Jean-Pierre Coulon
2020-05-15 14:58:10 UTC
Permalink
Post by Jörg Buchholz
You can do the same with plotting something out of the yrange.
set yrange [0:10]
plot sin(x) w l lt 1 t'',-1 w l lt 1 lw 4 t 'sin(x)'
Works. It is nice that title '' provides no line skip between the useful
lines with a title when I plot several data arrays or functions. Thanks.
--
Jean-Pierre Coulon
Loading...