-3

enter image description here

I want to draw a curve using controls (in picture). Please, everybody help me!

  • 6
    welcome to tex.se! this site usual doesn't provide service "do-this-instead-me" ... show us, what you try so far and where you stuck in your effort. – Zarko Apr 19 '18 at 23:00
  • 2
    What is the function describing the curve? – Henri Menke Apr 19 '18 at 23:03
  • 2
    You can see code exxamples online Here!, if you cant find what you want, try to put some minimun working example (MWE), to get some help or see the related answers... – J Leon V. Apr 19 '18 at 23:29
  • 1
    What do you mean 'using controls'? – cfr Apr 19 '18 at 23:32
  • @cfr I'm wondering if (s)he is referring to Bezier control points... – marmot Apr 20 '18 at 0:02
1

You can play with in and out. To obtain as smooth curve, you only make sure that the in and out parameters of two successive points differ by 180. And using looseness you can further control the shape of the curve.

enter image description here

\documentclass[tikz,border=3.14pt]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[gray] (-1,-3) grid (9,4);
\draw[thick,-latex] (-1,0) -- (9,0) node[below left]{$x$};
\draw[thick,-latex] (0,-3) -- (0,4) node[below right]{$y$};
\draw[thick,blue] (0,0) to[out=-70,in=180] (1.2,-1.5) 
to [out=0,in=180,looseness=0.4] (5.8,3.9) to[out=0,in=120,looseness=0.5] (8,0);
\node[anchor=north west] at (5,0) {5};
\node[anchor=north east] at (0,0) {0};
\node[anchor=south east] at (0,1) {2};
\end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.