How to make key color black in Gnuplot

How can I make “characters” black when using palettes?

enter image description here

+4
source share
2 answers

I think you cannot control this directly, here is a workaround:

plot 'MOD1.dat' u 2:3:1 w p pt 7 ps 2 lt black, \
'MOD1.dat' u 2:3:1 w p pt 7 ps 2 lt palette notitle

So, we first build data without a legend in black, and then build data points, but without a legend. The best part about this approach is that there is no need to fix the range of x or y.

+3
source

I would just create a dummy line and use notitlefor real strings. Sort of

set yrange[0:1]
plot "realdata1.data" u 1:2 w linespoints lt 1 notitle   , \
     "realdata2.data" u 1:2 w linespoints lt 2 notitle   , \
     1/0 w linespoints lt 1 lc rgb 'black' title 'Model1', \
     1/0 w linespoints lt 1 lc rgb 'black' title 'Model2'

lt 1 , . , set yrange gnuplot

+3

All Articles