How does one draw a horizontal parabola, left or right oriented? I can easily draw:
\draw[blue, line width=1.75pt, domain=-2.00 : 3.00, samples=1500] plot[smooth](\x, {\x*\x - \x - 2});
and even trick a horizontal parabola in origin using two radicals:
\draw[magenta, line width=1.75pt, domain={0.00}:{3.0}, samples=1500] plot[smooth]( \x, {pow(\x, 0.5)} );
\draw[magenta, line width=1.75pt, domain={0.00}:{3.0}, samples=1500] plot[smooth]( \x, {- pow(\x, 0.5)} );
But I cannot make it do this (true horizontal parabola):
\draw[red, line width=1.75pt, domain={-4.10}:{4.0}, samples=500] plot[smooth]( \y, {\y*\y - \y - 2} );
Any idea? Here's my MWE:
\documentclass{standalone}
\usepackage{mathtools} %includes amsmath
\usepackage{mathabx}
\usepackage{tikz}
\usetikzlibrary{patterns,calc,arrows}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}[>=triangle 45, cap=round]
\draw[->] (-4.0,0) -- (4.0,0); % Ox
\node[below] at (4.0, 0.0) {\textit{x}};
\node at (-0.2,-0.3) {\textit{0}};
\draw[->] (0,-4.0) -- (0,4.0); % Oy
\node[left] at (0.0,4.0) {\textit{f(x)}};
\filldraw [red] (0.00, 0.00) circle(3pt);
\draw[blue, line width=1.75pt, domain=-2.00 : 3.00, samples=1500] plot[smooth](\x, {\x*\x - \x - 2});
%\draw[red, line width=1.75pt, domain={-4.10}:{4.0}, samples=500] plot[smooth]( \y, {\y*\y - \y - 2} );
\draw[magenta, line width=1.75pt, domain={0.00}:{3.0}, samples=1500] plot[smooth]( \x, {pow(\x, 0.5)} );
\draw[magenta, line width=1.75pt, domain={0.00}:{3.0}, samples=1500] plot[smooth]( \x, {- pow(\x, 0.5)} );
\end{tikzpicture}
\end{document}



rotate=90orrotate=270to one of the vertical ones. – Gonzalo Medina Oct 13 '15 at 23:32\draw[red, line width=1.75pt, domain={-4.10}:{4.0}, samples=500] plot[smooth]({\x*\x - \x - 2},\x );– Guho Oct 13 '15 at 23:40swapaxes. – Guho Oct 13 '15 at 23:51