From 038f1a185c08de27b46a9fef2bb6e13ee4d04559 Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Wed, 21 Feb 2024 10:20:09 +0100 Subject: [PATCH 1/3] Define order within legend according to order of appearance --- chapters/annotations.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/chapters/annotations.tex b/chapters/annotations.tex index fc501f809..4ec402823 100644 --- a/chapters/annotations.tex +++ b/chapters/annotations.tex @@ -254,6 +254,7 @@ \subsubsection{Plot Curves}\label{plot-curves} When \lstinline!legend! is not provided, the tool produces a default based on \lstinline!x! and/or \lstinline!y!. Providing the empty string as \lstinline!legend! means that the curve shall be omitted from the plot legend. Variable replacements, as described in \cref{variable-replacements}, can be used in \lstinline!legend!. +The order of presentation within the plot legend corresponds to order of appearance in the \lstinline!curves! of a \lstinline!Plot!. \subsubsection{Escape Sequences}\label{text-markup-escape-sequences} From 7ae3b83f10709313499c4632a285d7afd8441d27 Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Wed, 21 Feb 2024 10:21:02 +0100 Subject: [PATCH 2/3] Introduce 'zOrder' to give control over drawing order --- chapters/annotations.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chapters/annotations.tex b/chapters/annotations.tex index 4ec402823..bfdca2a70 100644 --- a/chapters/annotations.tex +++ b/chapters/annotations.tex @@ -236,6 +236,7 @@ \subsubsection{Plot Curves}\label{plot-curves} expression x = time "X coordinate values"; expression y "Y coordinate values"; String legend "Legend"; + Integer zOrder = 0 "Drawing order control"; end Curve; \end{lstlisting} @@ -256,6 +257,9 @@ \subsubsection{Plot Curves}\label{plot-curves} Variable replacements, as described in \cref{variable-replacements}, can be used in \lstinline!legend!. The order of presentation within the plot legend corresponds to order of appearance in the \lstinline!curves! of a \lstinline!Plot!. +The \lstinline!zOrder! gives control over drawing order, with higher values corresponding to closer to front. +Ties are resolved using order of appearance in the \lstinline!curves! of a \lstinline!Plot!, with later appearance corresponding to closer to front. + \subsubsection{Escape Sequences}\label{text-markup-escape-sequences} In an attribute inside a figure where the variable replacements of \cref{variable-replacements} or the text markup of \cref{text-markup-in-captions} can be used, the following use of \firstuse[text markup escape sequence]{text markup escape sequences}\index{escape sequence!text markup} applies. From 0210871bdc343f0c29f5c74a384d1a53d8103e9d Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Mon, 26 Feb 2024 19:28:51 +0100 Subject: [PATCH 3/3] Make similar description of graphics back to front ordering --- chapters/annotations.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapters/annotations.tex b/chapters/annotations.tex index bfdca2a70..4ccb18724 100644 --- a/chapters/annotations.tex +++ b/chapters/annotations.tex @@ -653,8 +653,8 @@ \section{Graphical Objects}\label{annotations-for-graphical-objects}\label{graph \end{lstlisting} \end{example} -The graphics is specified as an ordered sequence of graphical primitives, which are described below. -First, base class contents are drawn according to the order of the \lstinline!extends!-clauses, and then graphical primitives are drawn according to the order such that later objects can cover earlier ones. +The graphics is specified as an ordered sequence of graphical primitives described below. +Base class contents are drawn behind the graphical primitives of the current class, with base classes ordered from back to front according to the order of the \lstinline!extends!-clauses, and graphical primitives according to order of appearance in the annotation. \begin{nonnormative} Note that the ordered sequence is syntactically a valid Modelica annotation, although there