Skip to content

Commit

Permalink
Make Axis.unit default to "" (without yet specifying what the default…
Browse files Browse the repository at this point in the history
… means)
  • Loading branch information
henrikt-ma committed Aug 10, 2020
1 parent b373159 commit 80855ab
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,14 @@ \subsubsection{Axis Properties}\label{axis-properties}
record Axis
Real min "Axis lower bound";
Real max "Axis upper bound";
String unit "Unit of min and max";
String unit = "" "Unit of min and max";
String label "Axis label";
end Axis;
\end{lstlisting}

When an axis bound isn't provided, the tool computes one automatically. When \lstinline!min! or \lstinline!max! is specified, it is an error to leave \lstinline!unit! unspecified.
When an axis bound isn't provided, the tool computes one automatically. When \lstinline!min! or \lstinline!max! is specified, it is an error to leave \lstinline!unit! empty.

If a tool does not recognize the \lstinline!unit!, it is recommended to issue a
warning and treat the \lstinline!unit! as if it was not specified.
If a tool does not recognize the \lstinline!unit!, it is recommended to issue a warning and treat the \lstinline!unit! as if it was empty.

When an axis label isn't provided, the tool produces a default label. Providing the empty string as axis label means that no label should be shown. Variable replacements, as described in
\cref{variable-replacements}, can be used in the \lstinline!label! of \lstinline!Axis! The Modelica tool is responsible for showing the unit used for values at the axis tick marks, so the axis
Expand All @@ -189,9 +188,8 @@ \subsubsection{Plot Curves}\label{plot-curves}
The mandatory \lstinline!x! and \lstinline!y! expressions are restricted to be
component references refering to a scalar variable or \lstinline!time!. It
is an error if \lstinline!x! or \lstinline!y! does not designate a scalar variable.
It is an error if the unit of an expression (i.e., a variable's \lstinline!unit!,
or second for \lstinline!time!) is incompatible with the \lstinline!unit! of the
corresponding axis.
When the \lstinline!unit! of an \lstinline!Axis! is non-empty, it is an error if the unit of the corresponding \lstinline!Curve! expression (i.e., a variable's \lstinline!unit!,
or second for \lstinline!time!) is incompatible with the axis unit.

When \lstinline!legend! isn't provided, the tool produces a default based on
\lstinline!x! and/or \lstinline!y!. Providing the empty string as
Expand Down

0 comments on commit 80855ab

Please sign in to comment.