Menu

LegendLineMarkers

Legend wth Line markers

A proposed new feature

References:

(0) Baseline

A lines plot with varying line widths, legend with color-boxes
Lines0

(1) Line markers in legend

New feature: SetLegendUseShapes(True), when used with a line plot, displays line segments with the and color and width used inside the plot. It also makes the color boxes 4x wider to make room for the lines.
Lines1

(2) With plot background color

When there is a plot background color, the legend color boxes display that too.
Lines3

(3) Linepoints plot

For comparison, here is the same data with a linepoints plot. In this case the same function SetLegendUseShapes(True) makes the legend show point markers.
Lines4

(4) Line markers in legend with line styles

If the plotted lines use line styles (dashed lines), the legend will show those dashed lines. This feature does not play well with line widths > 1, though.
Lines1a


Notes:

  • Updated 2012-12-18 to replace the text and figures showing diagonal line segments with horizontal line segments.
  • Updated 2012-12-20 to add (4) showing line styles

Related

Discussion: Make Legend colorbox border optional
Discussion: Make Legend colorbox border optional
Discussion: Make Legend colorbox border optional
Discussion: Make Legend colorbox border optional
Feature Requests: #51

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.