I would like to add zero to the origin of the axes. I tried with clip = false and \node[anchor=east] (zero) at (axis cs:0,0) {0}; but with disastrous results. This is my graph:

  legend pos=outer north east,
  legend cell align={left},
  yticklabels=\empty, xticklabels=\empty,
  xtick=\empty, ytick={0},
    axis lines=middle,
    x label style={at={(1,0)},right},
    y label style={at={(0,1)},above},
    xlabel={$T$}, ylabel={$\xi$},
    restrict y to domain=-10:1
        \node[anchor=east] (zero) at (axis cs:0,0) {0};                 
        \addplot [viola,smooth,domain=0:7,samples=1000] 
        {1-( (0*exp(-1/4)) *exp(1/x))};
        \addlegendentry{$r = 0$};
        \addplot [blue, domain=0:7, samples=100,  smooth]
        {1-( (0.2*exp(-1/4)) *exp(1/x))};
        \addplot [green, domain=0:7, samples=100,  smooth] 
        {1-( (0.4*exp(-1/4)) *exp(1/x))};
        \addplot [yellow,smooth,domain=0:7] 
        {1-( (0.6*exp(-1/4)) *exp(1/x))};
        \addplot [orange,smooth,domain=0:7] 
        {1-( (0.8*exp(-1/4)) *exp(1/x))};
        \addplot [red,smooth,domain=0:7] 
        {1-( (1*exp(-1/4)) *exp(1/x))};
        \addplot[only marks, mark=*,fill=cyan] coordinates { 
    \draw[-stealth] (6,3) -- ++(0,-2) node[midway,above,anchor=west] {$r$ crescente};

Any ideas?


1 Answer 1


When using axis lines=middle, PGFPlots will hide the tick labels around origin, to prevent axis lines interfering with them. To disable this feature, you can use hide obscured y ticks=false like this:

\documentclass[tikz, border=1cm]{standalone}
xmin=0, xmax=8,
ymin=0, ymax=1,
xtick=\empty, ytick={0},
axis lines=middle,
hide obscured y ticks=false,

Empty graph with a "0" tick

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.