4

I would like to adjust the positions of labels in the following diagram to be placed in the middle of the arrows. Thank you so much for the suggestions.

\documentclass{article}

\usepackage[justification=centering,font=small,labelfont=bf]{caption} \usepackage{amsmath,amssymb} \usepackage{xypic} \xyoption{all}

\begin{document}

\title{Title} \author{Author} \date{Today} \maketitle

\begin{figure} [ \xymatrixcolsep{1.5pc} \xymatrix{ \text{LTDS} \ar@{=>}[d]^{\text{RRA}} \ar@{-->}[r] & \text{RRA} \ar@{=>}[d]^{\text{FxTS of ODEs}}{\text{FxTS of TDSs}} \ \text{An LTI without delays} \ar@{=>}[d]{\text{Equivalent}}^{\text{Transformations}}
& {\begin{smallmatrix} \text{Equivalence of FxTS} \ \text{between LTDS and LTI} \end{smallmatrix}} \ar@{-->}@/^4pc/[dddl] \ \text{An LTI with a single input} \ar@{=>}[d]{\text{FxTS of ODEs}}^{\text{Backstepping}} & \ \text{FxTC for LTI} \ar@{=>}[d]{\text{Linear}}^{\text{Transformations}} \ \text{FxTC for LTDS} } ] \caption{Schematic diagram of the proposed methodology}\label{fainait figure 1} \end{figure}

\end{document}

enter image description here

Sebastiano
  • 54,118
Johannes
  • 153

2 Answers2

3

I'm not sure if this is what you mean by placing labels in the middle of the arrows—it looks strange to me. But here is a solution with tikz-cd.

enter image description here

\documentclass{article}

\usepackage[justification=centering,font=small,labelfont=bf]{caption} \usepackage{amsmath,amssymb} \usepackage{tikz-cd}

\begin{document}

\begin{figure} [ \begin{tikzcd}[row sep=1cm] \text{LTDS}\arrow[r, dashed]\arrow[d, Rightarrow, "\text{RRA}" description] & \text{RRA}\arrow[d, Rightarrow, "\text{FxTS of TDSs FxTS of ODEs}" description]\ \text{An LTI with a single input}\arrow[d, Rightarrow, "\text{Equivalent Transformations}" description] & \begin{smallmatrix} \text{Equivalence of FxTS} \ \text{between LTDS and LTI} \end{smallmatrix}\arrow[dddl, controls={+(0,-3) and +(3,0)}, dashed]\ \text{An LTI with a single input}\arrow[d, Rightarrow, "\text{FxTS of ODEs Backstepping}" description]\ \text{FxTC for LTI}\arrow[d, Rightarrow, "\text{Linear Transformations}" description]\ \text{FxTC for LTDS} \end{tikzcd} ] \caption{Schematic diagram of the proposed methodology}\label{fainait figure 1} \end{figure}

\end{document}

The description key places labels in the middle of arrows.

If you must do this with xymatrix you can place the labels in the middle of the arrows using the | key instead of ^ or _. But I think this labeling looks worse with xymatrix than in tikz-cd. Here is the image (with the xy code following).

enter image description here

\xymatrixcolsep{1.5pc} \xymatrix{
\text{LTDS}  \ar@{=>}[d]|{\text{RRA}} \ar@{-->}[r] & \text{RRA} \ar@{=>}[d]|{\text{FxTS of ODEs FxTS of TDSs}}
\\
\text{An LTI without delays} \ar@{=>}[d]|{\text{Equivalent Transformations}}  
& {\begin{smallmatrix} \text{Equivalence of FxTS} \\ \text{between LTDS and LTI} \end{smallmatrix}} 
\ar@{-->}@/^4pc/[dddl] 
\\
\text{An LTI with a single input} \ar@{=>}[d]|{\text{FxTS of ODEs Backstepping}} &
\\
\text{FxTC for LTI} \ar@{=>}[d]|{\text{Linear Transformations}}
\\
\text{FxTC for LTDS}
}
Sandy G
  • 42,558
0

With ^ the label is set to the left of the arrow, with _ to the right; with | it is placed in the middle.

I added some adjustments that maybe could be done also with Xy-pic methods, but…

The adjustments are for making the label slightly bigger and for hiding descenders in the main entries.

\documentclass{article}

\usepackage[justification=centering,font=small,labelfont=bf]{caption} \usepackage{amsmath,amssymb} \usepackage[all,cmtip]{xypic}

\newcommand{\ltext}[1]{\text{\fboxrule=0pt\fboxsep=2pt\fbox{#1}}} \newcommand{\stext}[1]{\smash[b]{\text{#1}}}

\begin{document}

\begin{figure}[htp] [ \xymatrix@C=1.5pc{ \text{LTDS} \ar@{=>}[d]|(0.45){\ltext{RRA}} \ar@{-->}[r] & \text{RRA} \ar@{=>}[d]^(0.45){\ltext{FxTS of ODEs}}_(0.45){\ltext{FxTS of TDSs}} \ \stext{An LTI without delays} \ar@{=>}[d]|(0.45){\ltext{Equivalent Transformations}} & {\begin{smallmatrix} \text{Equivalence of FxTS} \ \text{between LTDS and LTI} \end{smallmatrix}} \ar@{-->}@/^4pc/[dddl] \ \stext{An LTI with a single input} \ar@{=>}[d]|(0.45){\ltext{FxTS of ODEs Backstepping}} & \ \text{FxTC for LTI} \ar@{=>}[d]|(0.45){\ltext{Linear Transformations}} \ \text{FxTC for LTDS} } ] \caption{Schematic diagram of the proposed methodology}\label{fainait figure 1} \end{figure}

\end{document}

enter image description here

Please, note the cmtip option that I deem mandatory to get decent arrow tips.

egreg
  • 1,121,712