I am a beginner in Latex and I would like to draw the attached graph. I have seen that there are different packages, that by means of dots are drawing. I would like the method to be as mathematical and exact as possible.

Asked
Active
Viewed 221 times
0
Torbjørn T.
- 206,688
Carlos
- 111
-
2see this: https://tex.stackexchange.com/a/105584/28557 – nidhin Nov 10 '18 at 09:45
-
1Welcome to TeX.SX! What have you done so far? - Related:How to plot functions – Bobyandbob Nov 10 '18 at 09:47
2 Answers
4
Here is something to start with, you need to add the other curves. You can also tweak the options to get the look you are after.
\documentclass{standalone}
\usepackage{pgfplots,tikz}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xmin = -2, xmax = 2,
ymin = -1, ymax = 3,
axis lines=middle,
axis equal image,
ticks = none,
xlabel style={below right},
ylabel style={above left},
]
\addplot[samples=100,thick,no marks,color=blue] {cosh(x)}
node[black, rotate = 55] at (axis cs: 1.1,2) {\tiny$y = \cosh(x)$};
\addplot[no marks, dashed] {1/2*exp(x)};
\end{axis}
\end{tikzpicture}
\end{document}
jak123
- 4,252
- 5
- 26
- 49
4
Here is an alternative. (EDIT: Corrected xlabel, big thanks to thymaro !)
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis x line=middle, axis y line=middle,
xtick=\empty,ytick=\empty,
%ymin=-0.5, ymax=3,
ylabel=$y$,
xmin=-1.7,xmax=1.9,xlabel=$\alpha$,
samples=101,
legend pos=south east]
\addplot [blue,thick,domain=-1.5:1.6] {sinh(x)} node[pos=0.87,below,sloped]
{$y=\sinh\alpha$};
\addplot [red,thick,domain=-1.5:1.5] {cosh(x)} node[pos=0.82,above,sloped]
{$y=\cosh\alpha$};
\addplot [black,dashed,thick,domain=-1.5:1.55] {exp(x)/2} node[pos=0.1,above,sloped]
{$y=\frac{1}{2}\mathrm{e}^\alpha$};
\addplot [black,dashed,thick,domain=-1.5:1.5] {exp(-x)/2} node[pos=0.9,above,sloped]
{$y=\frac{1}{2}\mathrm{e}^{-\alpha}$};
\end{axis}
\end{tikzpicture}
\end{document}
-
I'm raelly not sure about this, but shouldn't your abscissa be named
\alpha? – thymaro Nov 11 '18 at 00:02

