I have three questions:

  1. How can I draw the arrow marks in the picture below?
  2. How can I customize the location of the labels of the axes?
  3. How can I change the axis line style as latex?

Current Code:



    \begin{axis}[scale=2, width=8cm,axis equal image, xticklabel style={below}, 
        yticklabel style={below}, zticklabel style={left},
        axis line style={very thick, latex-latex},
        x={(-0.6cm,-0.3cm)}, y={(.8cm,0.0cm)}, z={(0cm,.8cm)},
        xlabel={$x$}, ylabel={$y$}, zlabel={$z$},
        axis lines=middle,
        xtick={1}, ytick={1},ztick={1},
        \addplot3[samples y=0,
        smooth, thick, color=blue,
        ] ({0},{x},{sqrt(1-x^2)});
        samples y=0,
        smooth, thick, color=green,
        ] ({x},{0},{sqrt(1-x^2)});
        samples y=0,
        smooth, thick, color=red,
        ] ({x},{sqrt(1-x^2)},{0});
        \node at (axis cs:1,1,0) {$ C_1 $};
        \node at (axis cs:0,0.8,0.8) {$ C_2 $};
        \node at (axis cs:0.8,0,0.8) {$ C_3 $};

Output with additional arrows:

Output with additional arrows.

  • For the arrows see in the pgfmanual chapter "50.6.1 Arrow Tip Marking". Fpr the axes there are several chapters. You may want to go to "82.5 Advanced: Creating New Axis Systems". Find the manual here: ctan.org/pkg/pgf
    – MS-SPO
    Jun 5 at 14:29
  • 2
    If the sketch you gave is exactly what you need, I'll recommend not to use the axis environment which is too heavy for that simple task. A plain TikZ drawing would allow you to place an arrow on the middle of your curves (using decorations.markings library).
    – SebGlav
    Jun 5 at 14:39

2 Answers 2


If you only need to draw what you show, it will be easier IMHO to do it with plain TikZ instead of PGFPlots. You'll need 3d and perspective libraries for this.

For example:

\usetikzlibrary{3d}           % canvas is... options
\usetikzlibrary{perspective}  % 3d view
\usetikzlibrary{arrows.meta,decorations.markings} % arrow and decorations

{% this style creates an arrow like the one you draw in the middle of a path
   ->-/.style={decoration={markings,mark=at position 0.5 with {\arrow{Straight Barb}}},

\begin{tikzpicture}[line join=round,line cap=round,3d view={120}{30},scale=4]
\draw[-latex] (-0.2,0,0) -- (1.2,0,0) node[left]  {$x$}; % <-- here you can change the label position
\draw[-latex] (0,-0.2,0) -- (0,1.2,0) node[right] {$y$};
\draw[-latex] (0,0,-0.2) -- (0,0,1.2) node[above] {$z$};
\node[below]       at (1,0,0) {$1$};
\node[below]       at (0,1,0) {$1$};
\node[above right] at (0,0,1) {$1$};
\draw[canvas is xy plane at z=0,red  ,->-] (1,0) arc (0:90:1) node[black,midway,below] {$C_1$};
\draw[canvas is yz plane at x=0,blue ,->-] (1,0) arc (0:90:1) node[black,midway,right] {$C_2$};
\draw[canvas is zx plane at y=0,green,->-] (1,0) arc (0:90:1) node[black,midway,left]  {$C_3$};

enter image description here


Edit (1): Please, one problem for question! But seems that the following (simplified code) solve most of your problems.

Edit (2): added are tick style, tick label style and axis on top,

enter image description here

For above image is defined style ->- (you can select other name), which define by use of the decorations.markings library:

  • arrows positioned in the middle of curve.
  • labels of curves

         > = {Straight Barb[scale=1.2]},
->-/.style args = {#1/#2}{decoration={markings,
              mark=at position .5 with {\arrow[very thick]{>};
              \path[draw=none] (0mm,1mm) -- (0mm,-5mm) node {$#1$};
              postaction = {decorate}
  axis lines=center,
  axis on top,
  axis line style = {semithick, Straight Barb-Straight Barb},
x={(-30mm,-15mm)}, y={(40mm,-10mm)}, z={(0,40mm)},
xtick={1},  ytick={1},ztick={1},
tick style = {tickwidth=3mm, thick, black},
xlabel=$x$, ylabel=$y$, zlabel=$z$,
tick label style = {inner sep=2mm},
xmin=-0.2,  ymin=-0.2,  zmin=-0.2,
xmax= 1.2,  ymax=1.2,   zmax=1.2,
samples y=0, samples=101, domain=1:0,
\addplot3[->-=C_2/2, thick, color=blue] ({0},{x},{sqrt(1-x^2)});
\addplot3[->-=C_3/3, domain=0:1,
                     thick, color=teal] ({x},{0},{sqrt(1-x^2)});
\addplot3[->-=C_1/1, thick, color=red]  ({x},{sqrt(1-x^2)},{0});

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.