1

I have been trying to plot scatter data with points where the size and colors depend on the input. I have check some others examples and I get to write this, but then I get that error message

plot '-' using 1:2:3:4:5 with labels hypertext point pt 7 ps var lc rgb variable    
     Too many using specs for this style

What I am missing? I know plot with labels and point size works fine using 4 columns, namely 1:2:3:4, but as soon as I add the 5th input the error appears.

jfzr
  • 374
  • 4
  • 17

1 Answers1

2

That simply tells you, that you cannot use variable points size and variable colors with the labels plotting style.

As workaround you can first draw the labels with the hypertext using white as point color, and then the colored points.

plot 'data.txt' using 1:2:3:4 with labels hypertext point pt 7 ps var lc rgb 'white',\
 '' using 1:2:4:5 with points pt 7 ps var lc rgb variable

Note, that with this solution you must send your data twice if you read from stdin.

Christoph
  • 47,569
  • 8
  • 87
  • 187
  • Excelent, I was thinking this approach too and it works just great. – jfzr May 04 '15 at 22:27
  • I had problem though, I am using a local defined palette so I use as input: `plot '-' using 1:2:3:4 with labels hypertext point pt -1 ps var lc "white" title 'Datafile 1', '-' using 1:2:3:4 w point pt 7 ps var lc palette var title 'Datafile 2'` and although it is plotted correctly i receive the error msg `unexpected or unrecognized token` pointing to palette and var. Since I am using javaplot it causing my graph to close – jfzr May 05 '15 at 12:25
  • 1
    Because that's the wrong syntax, just use `lc palette`, without `var`. – Christoph May 05 '15 at 12:35