Plotting marks with more one character in Gaston

Dear all,
I have the following code to plot several points and marks beside it:

using Gaston
n=15
L=rand(1:100,n,2)
L=[L 1:n] 
scatter([L[1,1]], [L[1,2]],linewidth="3", pointtype="fsquare", plotstyle="linespoints",linecolor = "'red'",Axes(key = :off))
plot!(L[2:2,1], L[2:2,2],linewidth="3", pointtype="fcircle",linecolor = "'red'")
plot!(L[1:1,1].+2, L[1:1,2],linewidth="3", pointtype="453",linecolor = "'red'")

I would like to print the mark β€œ456” beside the first point.

However, the Gaston package (my preferable) does not accept the string β€˜453’ that has more one character, and only print the first character. How can I fix this, please?

image

This is a limitation in gnuplot. See section β€œPoints” in page 80 of the documentation.

To plot a string, you can use the labels plotstyle (page 77 in the manual).

could you inserd this instruction on my code, please?

Here’s a quick example:

x, y = [1, 2], [-1, 1.5]
scatter(x, y,
        pointtype = "fsquare", linecolor = "'red'",
        Axes(xrange=(0,3), yrange=(-2,3)))
plot!(x.+0.1, y, supp=["456", "457"], w = "labels")

which produces this plot:

image

2 Likes