Search code examples
whitespacegnuplotspacelegendcolumnheader

gnuplot autotitle columnheader with whitespaces


How can I create a legend with whitespaces in the column header with autotitle? E.g. the first two lines of the data file:

T "x high" "x low"
0.1 3.14 0.0554

The legend should be:

T
x high
x low

Unfortunately gnuplot interprets it like this:

T
x
high

The quotes are simply ignored and the second column header is split into two. I couldn't find any information about this on the internet.


Solution

  • For me, which gnuplot version 4.6 the following works:

    set key autotitle columnheader
    plot 'file.dat' using 1:2 , '' using 1:3
    

    and gives the legend

    x high
    x low
    

    There is no problem with quoting.