Menu

#2438 Glitch in straight-line plot (wxWidgets?)

None
open-upstream-bug
nobody
glitch (1)
2021-05-20
2021-04-21
No

The attached simple plotfile shows a small glitch just to the right of (0,1).
The glitch only shows up at some window sizes, and can be lower or higher than the straight line.
I have attached a screenshot of the whole window and then closeups at different window sizes showing it above, below, and centered on the straight line.

This seems to happen only with the wxt terminal -- possibly a bug in the wxWidgets library?

This glitch even happens if the y value for the line is a constant 0.843 (i.e. not aligned with an axis tick).

It seems to happen with the x-values are "too closely" spaced.

Gnuplot 5.2 patchlevel 8 (as distributed with Maxima 5.44.0)
Windows 10 version 10.0.19043 Build 19043
NVidia GeForce GTX 750 Ti, driver 27.21.14.6192 of 2021-03-10

5 Attachments

Related

Bugs: #2281

Discussion

  • Ethan Merritt

    Ethan Merritt - 2021-04-22

    Please try this:

    In the toolbar widget with the wrench icon, try one or more of the following:

    1) select "no antialiasing"; apply, and replot
    2) select "antialiasing"; apply, and replot
    3) drag the "hinting" slider down to 50% or less; apply, and replot

    For me any of the three will remove the glitch, leading me to conclude that it is the combination of oversampling and strong hinting that is to blame. Hinting is known to have problems in recent pango/cairo libraries (see for example https://sourceforge.net/p/gnuplot/bugs/2048/) although up to this point I thought that was only relevant to fonts, not simple vectors.

    If that fixes it for you, you should be good to go. The settings are persistent across plotting sessions.

     
  • Stavros Macrakis

    Thanks for the suggestions!
    1) No anti-aliasing makes some vertical lines darker than others, and also has "jump" artifacts in them.
    2) Antialiasing alone is by far the best.
    3) Using anti-aliasing and oversample, with hinting as low as 10%, does not eliminate the problem.
    4) AA alone or AA+O @ 0% has some very subtle imperfections on the inside or outside of sharp corners at some window sizes, but they are barely visible.

    When Maxima is installing gnuplot, how can it pre-set these values for the wxt terminal while not affecting other terminals, and while allowing a per-user config file to override them?

     
  • Ethan Merritt

    Ethan Merritt - 2021-04-25

    The per-user config file is ~/.gnuplot-wxt

    Last year Henri Menke modified gnuplot's development version 5.5 to support XDG conventions for configuration files. I have to admit I don't use XDG myself and don't really know what "support" means in this case. Possibly adding a file .gnuplot-wxt in a system-wide XDG directory would "just work" in version 5.5. Or possibly the gnuplot terminal source needs to mention XDG somewhere? If that's the case I would be happy to take patches to add this (and other) relevant configuration files to the list managed by XDG. I am ignorant as to how XDG works.

    Menke's patch was small and reasonably self-contained, so if it handles your case already or with minimal tweaking it would be reasonable to back-port it to gnuplot version 5.4

     
    • Stavros Macrakis

      Thanks. I will pass along that information to the Maxima maintainers who work on installers -- and who know what XDG is all about! I don't think there's any urgency requiring a backport. Thanks again.

       
    • Stavros Macrakis

      Ethan, instead of doing this in a configuration file, is there a way to set the option in the gnuplot plotting file? It looks like that might be easier for us.

       
  • Ethan Merritt

    Ethan Merritt - 2021-05-20
    • status: open --> open-upstream-bug
     

Log in to post a comment.