Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#432 closed enhancement (fixed)

Add legend support to GraphPanel

Reported by: Kevin Milner Owned by:
Priority: major Milestone: OpenSHA 1.4
Component: commons Version:
Keywords: Cc:

Description

It would be nice to have legend support in GraphPanel?. You would need to be able to specify location as well.

Attachments (1)

DeformationModels_hists_small.png (9.4 KB) - added by Kevin Milner 10 years ago.
Histogram example

Download all attachments as: .zip

Change History (4)

comment:1 Changed 11 years ago by Kevin Milner

Milestone: OpenSHA 1.3OpenSHA 1.4

Leaving open as full legend support is not implemented, but XY Text Annotations have been added via PlotSpec?.setAnnotations(...). These annotations have an XY locations, text anchor, and font for customization.

comment:2 Changed 10 years ago by Kevin Milner

Resolution: fixed
Status: newclosed

Done in [10533].

PlotSpec? now has 3 new methods:

Legend defaults to below the plot and will only show up when setLegendVisible(true) is called. Function names will be used in the legend. You can set up a custom set of legend items with the setCustomLegendCollection(...) method, but it might be complicated.

Changed 10 years ago by Kevin Milner

Histogram example

comment:3 Changed 10 years ago by Kevin Milner

Here is an example
Histogram example

Note: See TracTickets for help on using tickets.