If you have a linepoints plot, set one of the shapes to 'none' to suppress the point marker for that dataset, and have a legend with SetLegendUseShapes(True), then the legend will have no marker at all for that data set, even though a line is plotted. PHPlot should probably fall back to drawing a color box in this case.
Found this while working on [feature-requests:#50] and [feature-requests:#51] for PHPlot-6.0.0, but the problem exists in 5.8.0 (and older). It doesn't look like a quick fix. For one thing, it only needs to do this for linepoints plots, not points plots, but checking for the plot type directly is something to avoid (and not done anywhere else in PHPlot).
Maybe it should fall back to a line marker (new in PHPlot-6.0.0), rather than a color box? Except line markers need 4x width vs point shape markers.
Related
Feature Requests:
#50Feature Requests:
#51Idea for fixing this: when doing the legend with point shapes, override shape 'none' with another shape, such as 'line'. This puts a short horizontal line of the right color in the legend. (This avoids the issue in the previous comment that using line markers there would be better, but the line markers want to be 4x wide.) Tried it: 'line' works but isn't that visible. 'rect' is more visible, but the shape is misleading since there are no actual rectangle boxes on the plot lines.
The comment about points vs linepoints plots is probably moot. Yes, with this fix, if you have a points plot with some shapes set to 'none', you get no plotted points for that data set - but you will get a legend line with a short horizontal line for a marker. But 'none' is documented in SetPointShapes() as only being useful for linepoints plots, so this isn't much of a concern.
The fix described above has been committed to SVN (on the /Rel6 branch). PHPlot will use the 'line' marker instead of 'none' when drawing the legend. The fix will be in PHPlot-6.0.0.
Fixed in 6.0.0