I'm trying to get a linespoints plot with the points being hypertext. So far, I've managed to get linespoints working but without hypertext and I've split it into two plots overlaid, one with lines one with hypertext points. While the second "works", it results in an extra key for the points. Ideally, I want linespoints key entries for each line and points combination, not a line key and a points key.
-
Could you show some code and the figure that you have managed to obtain so far? I do not know what you mean by "hypertext points". Do these contain a web link somehow?– MiguelOct 8, 2014 at 6:46
-
1@Miguel See gnuplot.sourceforge.net/demo_svg_5.0/hypertext.html– ChristophOct 8, 2014 at 10:15
-
@Christoph Cool, I didn't know this was possible. Is it new in 5.0?– MiguelOct 8, 2014 at 10:23
-
@Miguel Yes, and it works only for some terminals (wxt, svg, canvas, qt?)– ChristophOct 8, 2014 at 10:25
1 Answer
That may be possible with a bit cheating. Usually the hypertext
is shown only if also points
is set. Since the area which is active for the hypertext depends on the point size, you can draw all points with linespoints
and then use a transparent point when plotting the labels:
set samples 11
set xrange [0:10]
plot '+' using 1:1:1 with linespoints pt 7 ps var title 'mytitle',\
'+' using 1:1:(sprintf('(%d,%d)', $1, $1)):1 with labels hypertext point pt 7 lc rgb '#ff000000' notitle
Note for other users: The hypertext
option was introduced in version 5.0.
-
-
I can't seem to get transparent points to work here using code like this. They just show up black. What am I missing? Jan 28, 2018 at 2:28
-
Huh, it looks like transparency on points works in the
svg
renderer, but not thecanvas
. Is this bugworthy? I'm using Firefox 57.0.4 on Debian unstable for both formats, in case this could be an issue with my browser or some library rather thangnuplot
itself. Jan 28, 2018 at 13:57 -
Yes, transparent line colors seem not to be implemented for the canvas terminal, compare also gnuplot.sourceforge.net/demo_canvas_5.2/rgba_lines.html with gnuplot.sourceforge.net/demo_svg_5.2/rgba_lines.html. I think that isn't a bug, but simply missing mainenance of the canvas terminal code. Since very few developers are actually working on the gnuplot code, some terminals take quite some time to support all features. Jan 28, 2018 at 15:39