SED-ML / sed-ml

Simulation Experiment Description Markup Language (SED-ML)
http://sed-ml.org
5 stars 2 forks source link

Clearer formulation for legend labels required #133

Closed matthiaskoenig closed 3 years ago

matthiaskoenig commented 3 years ago

The description of the legend currently reads:

AbstractCurve: In addition to the optional id and name attributes it inherits from SEDBase (the latter of which may be used as the label in the Plot legend, if present)

This should be less ambiguous as

AbstractCurve: In addition to the optional id and name attributes it inherits from SEDBase. The name attribute must be used as the label in the Plot legend, if present.

In addition the description in legend should be updated from

The legend attribute defines whether a legend should be displayed (“true”) or not (“false”). The position and styling of the legend is unspecified. If the attribute is not defined, it is up to the tool whether to display the legend or not, and does not mean that the attribute has a default value of “false”.

to

The legend attribute defines whether a legend should be displayed (“true”) or not (“false”). The position and styling of the legend is unspecified. If the attribute is not defined, it is up to the tool whether to display the legend or not. The name attribute of the AbstractCurve in Plot2D and the name attribute of the Surface in Plot3D are used as labels in the legend.

luciansmith commented 3 years ago

Actually, if the name isn't defined, it's reasonable to use the 'id' instead. I'm fine being more explicit, but I would use 'should' instead of 'must' and mention the ID as an option.

matthiaskoenig commented 3 years ago

Yes, definitely we should add the fallback to the id. And add "If neither name or id are set it is up to the tool what to used as label."

luciansmith commented 3 years ago

Added the following text:

The name of the AbstractCurve should be used to label the curve in the given Plot2D, or, if name is not defined, the id may be used. If neither are present, the name or id of the referenced yDataReference may be used in the case of a Curve or the yDataReferenceFrom and/or yDataReferenceTo in the case of a ShadedArea. Because of the complications this can engender, it is highly recommended to define the name of all AbstractCurve elements.

and later:

The name of the Surface should be used to label the surface in the given Plot3D, or, if name is not defined, the id may be used. If neither are present, the name or id of the referenced zDataReference may be used. In general, it is highly recommended to define the name of all Surface elements.

luciansmith commented 3 years ago

Oh, I should say: I did not add any additional text to the bit about the legend, as that seemed redundant, but would be OK if someone wants to add it in anyway.