2

I am trying to draw this simple graph with some labels on tikz. Here are my codes:

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{backgrounds,intersections}
\begin{document}

\begin{tikzpicture}\draw[thin,-] (0,0) -- (4.5,0) node[anchor=north west] {$\psi \gamma_{c}$};
    \draw[thin,-] (0,0) -- (0,4.5) node[anchor=south east] {$\phi \gamma_{e}$};
   \draw (0,0) -- (45:6.2) node[pos=0.70, above left]{$\tau_{x}=0$}
   node[pos=0.60,above left]{$(\phi \gamma_{e} \geq \psi \gamma_{c})$}
   node[right]{$\gamma_{c}=\gamma_{e}=1$}
   node[pos=0.55,right]{$\tau_{x}>0$}
   node[pos=0.48, right]{$(\phi \gamma_{e} < \psi \gamma_{c})$};
 
\end{tikzpicture}

\end{document}

I am getting this output:

enter image description here

Now is there a way to make the graph look more presentable? In particular, I would like to move $\tau_{x}=0$ to the left to make it align with $\phi \gamma_{e} \geq \psi \gamma_{c}$ so that it appears right below it (or can be next to it but I am an unable to space them separately). I do not want the labels to cross the 45 degree line.

For $\tau_{x}>0$ I want to move it further down and the stuff in brackets to appear right below it.

The straight line is a 45 degree line so show cutoff for the different regions $\tau_{x} = 0$ and $\tau_{x}>0$.b

1 Answer 1

5

You can use the aligned environment to align the equations:

enter image description here

Code:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{backgrounds,intersections}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}\draw[thin,-] (0,0) -- (4.5,0) node[anchor=north west] {$\psi \gamma_{c}$};
    \draw[thin,-] (0,0) -- (0,4.5) node[anchor=south east] {$\phi \gamma_{e}$};
   \draw (0,0) -- (45:6.2) 
   %node[pos=0.70, above left]{$\tau_{x}=0$}
   %node[pos=0.60,above left]{$(\phi \gamma_{e} \geq \psi \gamma_{c})$}
   node [pos=0.60,above left] {$
       \begin{aligned}
           \tau_{x} &= 0 \\
           \phi \gamma_{e} &\geq \psi \gamma_{c}
       \end{aligned}
   $}
   node[right]{$\gamma_{c}=\gamma_{e}=1$}
   %node[pos=0.55,right]{$\tau_{x}>0$}
   %node[pos=0.48, right]{$(\phi \gamma_{e} < \psi \gamma_{c})$}
   node[pos=0.55,right] {$
       \begin{aligned}
           \tau_{x} &>0 \\
           (\phi \gamma_{e} &< \psi \gamma_{c})
       \end{aligned}
   $}
   ;
\end{tikzpicture}%
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .