Menu

#2565 windows terminal: Length of Arrow goes beyond value

None
closed-fixed
nobody
None
2023-05-19
2022-11-11
Anonymous
No

Hello,

This is for Version 5.4 patch level 5 last modified 2022-09-28, running on Windows Version 10.0.19045.2251

Why when I specify the length of an arrow as 1, the length of the arrow goes beyond 1?

Script:
set datafile separator comma
set style data circles
set terminal windows enhanced background rgb "0xE6E6FA" size 768, 768
set size square
set xrange [-1.5:1.5]
set yrange [-1.5:1.5]
set title "This is the tilte" font "Tahoma,22" textcolor rgb "0xE25822" rotate by 0
unset key
set object 1 circle at 0,0 size 1.005 fillstyle solid fc rgb "black"
set object 2 circle at 0,0 size 1 fillstyle solid fc rgb "grey"
set object 3 circle at 0,0 size 0.9 fillstyle solid fc rgb "white"
set arrow 1 from 0,0 length 1 angle 90 lw 5.00 lc rgb "black" nohead
plot 0.0

1 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2023-04-28
    • summary: Length of Arrow goes beyond value --> windows terminal: Length of Arrow goes beyond value
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2023-04-28

    I very much suspect that the problem is this code in graphics.c get_arrow(). In version 6 it has moved to gadgets.c effective_aspect_ratio().

    #ifdef _WIN32
            if (strcmp(term->name, "windows") == 0)
                aspect = 1.;
    #endif
    

    I understand that there may be some reason the windows terminal cannot derive the aspect ratio from term->v_tic and term->h_tic as other terminals do. However it is obviously not correct to always return 1.0. It should be something like

    xscale = (term->xmax  - term->xmin) /  (xaxis->max - xaxis->min)
    yscale = (term->ymax  - term->ymin) /  (yaxis->max - yaxis->min)
    aspect = yscale / xscale
    
     
  • Ethan Merritt

    Ethan Merritt - 2023-05-01

    Try this patch (version 6)

     
  • Tatsuro MATSUOKA

    The patch fixed the issue. Please merge it.

     
  • Ethan Merritt

    Ethan Merritt - 2023-05-02
    • status: open --> pending-fixed
     
  • Tatsuro MATSUOKA

    The patch was merged into 6.0 and 6.1 branches.
    Windows binary of version 6.1 can be avaiable at
    http://tmacchant33.starfree.jp/gnuplot_bin.html

     
  • Ethan Merritt

    Ethan Merritt - 2023-05-19
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.