-1

I know how to plot a function if i know the equation but in this case i don't know the equation of itself , thus i want to plot it by using some curve or approximation command

enter image description here

thanks for the help

Quintis
  • 155

1 Answers1

2

I understand you do not want to guess these functions but nevertheless...

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[pics/symmetric axes/.style={code={
\draw[thick,-stealth] (0,-#1) -- (0,#1);
\draw[thick,-stealth] (-#1,0) -- (#1,0);}},pics/symmetric axes/.default=5]

 \pic{symmetric axes};
 \draw[red,thick] plot[variable=\x,domain=-4:4,smooth] ({\x},{2*tanh(\x)+0.5*\x});

 \begin{scope}[xshift=7cm]
  \pic{symmetric axes};
  \draw[red,thick] plot[variable=\x,domain=-4:4,smooth] ({pow(\x,3)/8-\x},{\x});
 \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

  • actually i really want to the know the functions sometimes but don't know how to find em , thanks for the help – Quintis Jun 25 '19 at 15:24
  • 1
    @Quintis Here you can find a collection of options. –  Jun 25 '19 at 15:27
  • how do you know the equation of these functions so precisely ? – Quintis Jun 25 '19 at 16:33
  • @Quintis Living in a burrow helps. ;-) Most of the standard plots can be reproduced by some combination of polynomials, exp, tanh, and the trigonometric functions. –  Jun 25 '19 at 16:40