RiverWare 7.1 Plots: Change to Patterned Line Appearance / Gnats 5864
Phil Weinstein, CADSWES, 4-19-2017
Gnats 5864 reported inconsistencies of appearances of patterned (dotted, dashed, etc.) plot curves with line widths (thicknesses) of two or more pixels between: (a) curves drawn on the plot canvas and (b) lines drawn in the corresponding legend items. This was initially addressed for RiverWare 7.1 by making legend items conform to the plot canvas curves.
But in the course of that work, it was discovered that we had been making the line patterns "wrong" on the plot canvas, rather than in the legend. "Dotted" lines looked dashed, and the more complex patterns were hard to discern. The problem was that we were unintentionally applying the "square cap style" to curve lines, rather than leaving them as intended with the more-precise "flat cap style".
This has been changed for RiverWare 7.1. Plot curve line patterns now have a "lighter" appearance -- and the "dotted" line style looks dotted.
In case this change presents a problem for RiverWare users, we have added a provision to restore the original appearance through the use of the following environment variable. If this environment variable is defined and has a non-zero value, plot curves and their legend samples are drawn the old way, with "heavier" patterns.
If that environment variable is detected, with a non-zero value, the following message is written out to diagnostics the first time a non-empty plot dialog is shown:
Heavy plot curve dotted and dashed patterns have been restored with use of the "RIVERWARE_PLOT_RESTORE_HEAVY_DOTS_DASHES" environment variable (non-zero value).
Below is a two-frame animation (a GIF file) illustrating the two appearances of the current five plot curve line styles, followed by the individual still frames:
For testing, a checkbox was deployed (but is now hidden) to toggle between these two appearances. This was added to the bottom of the Plot Dialog Settings dialog. It can be made visible by changing this compile-time symbol in Q3GUI/PlotDlgSettings.cpp:
Of course we could consider making this toggle an available user option (in some form). Also, we could instead simultaneously support both variants of patterns -- basically doubling the user choices for plot curve line styles.
---