How to plot the following diagram?

by marya   Last Updated January 14, 2018 07:23 AM

I want to plot the following

enter image description here

But I am unable to add the details(the C's with their pointing segment) and unable to keep the $x$-axis shorter than $y$-axis as shown in the diagram. Here is my MWE

\documentclass[tikz]{standalone}
\usepackage{pgfplots,kpfonts}
\usetikzlibrary{
  calc,angles,positioning,intersections,quotes,decorations.markings,backgrounds,patterns,
  decorations.pathreplacing % <- added
}
\tikzset{
point/.style={circle,draw=black,inner sep=0pt,minimum size=3pt}
}
\pgfplotsset{
    soldot/.style={color=blue,only marks,mark=*}
    }
\begin{document}
\begin{tikzpicture}
    \begin{axis}[
            xmax=1.5,
            xmin=-1.5,
            axis equal,
            xtick={0},
            ytick={-2,-1,1,2},
            axis lines =middle, xlabel=$x$, ylabel=$y$,
            every axis x label/.style={at=(current axis.right of origin),anchor=west}
          ]
          \addplot [blue, smooth,domain=-2:2] {x^3+2};
          \addplot [blue, smooth,domain=-2:2] {x^3+1};
          \addplot [blue, smooth,domain=-2:2] {x^3};
          \addplot [blue, smooth,domain=-2:2] {x^3-1};
          \addplot [thick, red, smooth,domain=-2:2] {x^3-2};
          \addplot[soldot,red]coordinates {(1,-1)} node [anchor=west,text=black]  {$(1,-1)$};
          \node at (axis cs:-0.6,-0.3) [anchor=west] {$0$}; 
        \end{axis}
\end{tikzpicture}
\end{document}


Related Questions


Serious problem by creating a figure

Updated August 08, 2015 14:10 PM


How can I do this by Latex (Tikz or PSTricks)

Updated March 13, 2016 08:09 AM

PSTricks equivalent to TikZ

Updated June 30, 2015 13:10 PM