The ellipse code in do_ellipse() (graphics.c) assumes that the aspect ratio of the plot canvas can be determined by using
double aspect = (double)term->v_tic / (double)term->h_tic;
The same assumption about the aspect ratio can be found in get_arrow() (graphics.c), get_arrow3d() (graph3d.c), and do_arc() (term.c).
This assumption fails for the Windows terminal since it uses a fixed (virtual) height and width of its canvas and only maps it to screen coordinates while drawing. When resizing the graph window of the windows terminal, it adjusts v_tic and h_tic accordingly. In order to obtain the correct aspect ratio of ellipses, the code should always use
if (strcmp(term->name, "windows") == 0) aspect = 1.;
The problem applies to versions 4.6 and 4.7, but is not visible in version 4.6.3 due to another bug. It would be possible to fix this problem by adding a few checks like the one above. But IMHO this would be really ugly and I am hoping for a better proposal.
Attached is a screen copy illustrating the problem. It was created after using the script below and then changing the aspect ratio of the graph window, followed by a 'replot'.
set yrange [-2:2] set xrange [0:3] set samples 4 unset key set style ellipse units xy plot '+' u 1:(0):(1):(2) with ellipses
Log in to post a comment.