Menu

#295 rotated labels with (unexpected) increasing offset

None
closed
nobody
None
5
2 days ago
2024-05-13
Anonymous
No

Hi all. I have a file with "annotations" as interesting moments in the experiment:

[erauser@hvgplodldb02 1-mcm-on-and-off]$ cat annotations.txt
2024-05-13 05:02:52.932 -> Amex-bench benchmark started with 200 clients.
2024-05-13 05:03:14.033 -> amex-mcm stopped on 10.9.208.190 10.9.208.237 
2024-05-13 05:03:59.407 -> amex-mcm started on 10.9.208.190 10.9.208.237 

And I am using the following to print these as vertical labels:

  arrow_remove = "sed s'/->/|/1' ${REPORTDIR}/annotations.txt"
 plot "data" using 1:2  with points title 'etcd proposal pending', \
"<".arrow_remove using 1:0:2 with labels nopoint rotate by 90 offset 0,10 textcolor rgb "gray" notitle"

See the attached files to see how the labels are being printed with an increased offset. Apparently, only the first label is correctly using the (0, 10) offset, the second one is printed with increasing vertical offset, and the third one is not even shown.

How can I solve this? Any help would be appreciated.

This is gnuplot 5.2 patchlevel 4

Thanks!
Gerardo

1 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2024-05-13

    Gnuplot 5.2 is rather old by now, so debugging is rather pointless unless the problem has persisted through to versions 5.4 and current 6.0

    However I think it is more likely that the error is in the font handling routines for whatever output graphics libaray you are using. What gnuplot terminal are you using? Have you checked whether other terminals show the same error? I know there was a problem like this that affected gdlib version 2.3.3 if the wrong configuration options were chosen at the time the library was built. When gnuplot was run, the gdlib error affected the png, jpeg, and gif terminals. Rebuilding the library from source fixed it (no need to rebuild gnuplot), and supposedly the problem was fixed in gdlib 2.4 although I have not been able to confirm that (since I didn't have that configuration problem to begin with).

    Edit:

    I think Hiroki Motoyoshi has identified the more likely problem. The gdlib error I was thinking of affected text with increasing rotation angle, not increasing x or y coordinate.

     

    Last edit: Ethan Merritt 2024-05-15
  • Hiroki Motoyoshi

    If you replace the code snippet 'using 1:0:2' in the 'with labels' section with 'using 1:(0):2', does the output match your expectations?

    The 'using 1:0:2' is functionally equivalent to 'using ($1):($0):($2)'. Here, '$0' serves as a pseudocolumn, initiating at 0 and incrementing by 1 for each valid point read. This likely affects the y-axis offset of the labels in your figure, causing it to increase by 1.

    If, despite the replacement, the y-axis offset of the labels in your figure still increases, it strongly suggests a bug in the code.

     
  • Ethan Merritt

    Ethan Merritt - 2024-05-22

    Ticket moved from /p/gnuplot/bugs/2707/

    Can't be converted:

    • _milestone:
    • _priority:
     
  • Ethan Merritt

    Ethan Merritt - 2 days ago
    • status: open --> closed
    • Group: -->
    • Priority: --> 5
     

Log in to post a comment.