Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to specify a custom tick with a custom label at a sp

\begin{axis}[       
symbolic y coords={<{Critical point} at 2.138  ???>},
]
\addplot+[samples=100,domain=-2:2] {x^2};
\end{axis}
share|improve this question

1 Answer 1

up vote 5 down vote accepted

You have to use extra y ticks to specify the ticks you want to customize and extra y tick style to specify their style, for example:

\documentclass[border=2pt]{standalone}

\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    extra y ticks={2.18},
    extra y tick style={
        grid=major,
        yticklabel={$P_c$},
        yticklabel style={yshift=0.7ex, anchor=east}}]
\addplot+[samples=100,domain=-2:2] {x^2};
\end{axis}
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer
    
Thank you, dude, that was exactly, what I was looking for! –  Caniko Sep 18 '13 at 9:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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