linewidth of the legends. If I write (for example) set key lw 3 (so as to have thick legends while keeping thin plot lines) it does not recognize it. In fact, when reading the manual, linewidth is not allowed for the key command (other than for the box option, but that concerns only the thickness of the box, not of the legends themselves)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It would not make any sense for the program to generate key samples automatically that do not match the plots they correspond to. But you are free to generate additional key samples with any characteristics you like. Here is a script that creates a plot with five different line widths but all the manually supplied key entries use linewidth 1.0. In this example the colors are deliberately chosen to match the actual plots, but I could imagine cases where you might want to change the color and keep the linewidth, or dash style, etc.
I understand. keyentry makes the trick, just as label does; for the case of modifying the thickness of the legends while keeping thin graphs, it would be
plot for [i=1:5] sin(x/i) with lines lt i **lw 1** notitle, \
for [i=1:5] keyentry with lines lt i **lw i** title "i = ".i
which works just fine; I just wondered whether to allow set key lw <n°> would simplify things.
👍
1
Last edit: Justin Sales 2023-12-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I often plot all graphs using the same style. While small lines are advantageous in the plot, the color sometimes is unrecognizable in the key (legend) with small linewidths. This is even more so when using style dots, just try: plot sin(x) wi do, cos(x) wi do
All workarounds I have seen so far are cumbersome. So it would be nice of the color of the plot would be more conspicuous in the key.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The linewidth of what lines?
linewidth of the legends. If I write (for example) set key lw 3 (so as to have thick legends while keeping thin plot lines) it does not recognize it. In fact, when reading the manual, linewidth is not allowed for the key command (other than for the box option, but that concerns only the thickness of the box, not of the legends themselves)
It would not make any sense for the program to generate key samples automatically that do not match the plots they correspond to. But you are free to generate additional key samples with any characteristics you like. Here is a script that creates a plot with five different line widths but all the manually supplied key entries use linewidth 1.0. In this example the colors are deliberately chosen to match the actual plots, but I could imagine cases where you might want to change the color and keep the linewidth, or dash style, etc.
I understand. keyentry makes the trick, just as
label
does; for the case of modifying the thickness of the legends while keeping thin graphs, it would bewhich works just fine; I just wondered whether to allow
set key lw <n°>
would simplify things.Last edit: Justin Sales 2023-12-06
I'd like to second that feature request.
I often plot all graphs using the same style. While small lines are advantageous in the plot, the color sometimes is unrecognizable in the key (legend) with small linewidths. This is even more so when using style dots, just try:
plot sin(x) wi do, cos(x) wi do
All workarounds I have seen so far are cumbersome. So it would be nice of the color of the plot would be more conspicuous in the key.
See also this question on Stackoverflow:
https://stackoverflow.com/questions/11058659/thicker-lines-in-the-legend-of-gnuplot
There, you'll also find the "workarounds".