# Tikzpicture chart with custom functions

I'm trying to create the chart drawn below. I have tried using Tikzpicture, but I'm struggling.

    \begin{center}
\begin{tikzpicture}
\begin{axis}[
xlabel=$\kappa''$,
ylabel={$x_j^*$}    ]
xtick={-1,0,...,1},
ytick={0.2},
\end{axis}
\end{tikzpicture}
\end{center}


Any suggestions as to how I could create this chart?

• and how your functions are defined? if define all coordinates of your function then it is straightforward to draw functions with addplot coordinates {(..,..) (...,...) ... }; – Zarko Feb 21 '18 at 13:23
• There are no values, there are just straight lines. I would like the proportions to be roughly this way. – pafnuti Feb 21 '18 at 13:25
• and you expect that we will estimate this points from your desultorily sketch for you? what is is actually your problem? – Zarko Feb 21 '18 at 13:35
• @pafnuti If my answer is sufficient, please accept it by clicking the green tick ;-) – Thorbjørn E. K. Christensen Feb 21 '18 at 13:46

## 1 Answer

I haven't use pgfplots and my solution is not pretty (It would be cooler with loops and nice tricks, but I've just done it the way I could remember).

\documentclass[border = 5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
%Drawing the lines
\draw [color = red]  (5,0) -- (10, 7.5) -- (15, 7.5);
\draw [color = blue] (5,0) -- (10, 6.6) -- (15, 6.6);
\draw [color = red]  (5,0) -- (10, 3.0) -- (15, 3.0);
\draw [color = blue] (5,0) -- (10, 2.5) -- (15, 2.5);
\draw (14.9,-.2) -- (15.1,-.1);
\draw (14.9,-.1) -- (15.1,0);
%Drawing the border
\draw [->](0,-5) -- (0,10) -- (15,10) -- (15,-5) -> (0,-5);
\draw (0,0) -- (5,0) -- (8, -5);
% Drawing dashed lines
\draw [dashed,thick] (0,7.5) -- (15,7.5);
\draw [dashed,thick] (0,6.6) -- (15,6.6);
% Writing stuff
\node at (-1,0) {$\frac{n}{s}$};
\node at (16,7.5) {$\frac{3}{4}$};
\node at (16,6.6) {$\frac{2}{3}$};
\node at (16,3.0) {$\frac{1}{3}$};
\node at (16,2.5) {$\frac{1}{4}$};
\node at (15,-6) {$\kappa$};
\node at (8,-6) {B};
\node at (5,-6) {A};
\node at (1,-6) {$-\infty$};
\node at (-1,10) {$x_j$};
\end{tikzpicture}
\end{document}


Yields:

• Note that it might be useful to change my numbers, if more precise placement is warranted (f.ex. is 3 a rather bad approximation of 10/3) – Thorbjørn E. K. Christensen Feb 21 '18 at 13:58