Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the color of the points in labelled plot

Tags:

gnuplot

The script works, without any change in color, however:

plot '_numXY' using 2:3:(sprintf('%d', $1)) \
    with labels offset 0,1 point pointtype 6 ps 2 notitle lc rgb "blue"

The points are black. I want to see the points in blue color.
Why does lc rgb "blue" not work?

like image 618
alex Avatar asked Aug 08 '14 11:08

alex


1 Answers

The lc settings are ignored for the labels plotting style if they don't follow immediately the point option. In your case you must only place the notitle at the end.

plot '_numXY' using 2:3:(sprintf('%d', $1)) \
    with labels offset 0,1 point pointtype 6 ps 2 lc rgb "blue" notitle

As a demonstration example:

set samples 11
set xrange [0:10]
plot '+' using 1:1:(sprintf('%d', $1)) \
    with labels offset 0,1 point pointtype 6 ps 2 lc rgb "blue" notitle

The result with 4.6.5 is:

enter image description here

like image 69
Christoph Avatar answered Oct 06 '22 04:10

Christoph