0

I would like to get several keys from the graphs in one line in gnuplot as shown in the attached image


here is an example of the code:

set key maxrows 2
plot sin(x) title 'x1',cos(x) title 'x2',x title' ',2*x title ' ',-x title ' ',-3*x title ' '

I get this result (see attached). my question how to obtain the 3 key blow 'green - pink -yellow' dashed line

enter image description here

ChrisF
  • 134,786
  • 31
  • 255
  • 325
azdine
  • 1
  • 1

1 Answers1

1

You could set the dashtype (assuming that your terminal supports it):

set key maxrows 2

plot \
   sin(x) dt 1 title 'x1', cos(x) dt 3 title 'x2', \
   x dt 1 title ' ', 2*x dt 3 title ' ', \
  -x dt 1 title ' ', -3*x dt 3 title ' '
ewcz
  • 12,819
  • 1
  • 25
  • 47