Q:

putting(-) sign in the axes and working out a graph in pgfplots

I need pgfplots to show (-) sign in the y axis, somehow it does not read it. 
\documentclass{article}
\usepackage[margin=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}

\usepackage{pgfplots}
\pgfplotsset{width=10cm,compat=1.9}
%\usepgfplotslibrary{external}
%\tikzexternalize

\begin{document}

Plotting from data:

\begin{tikzpicture}
\begin{axis}[ 
title={pressure},
xlabel={r/R},
    ylabel={$\frac{\kappa}{C}\frac{dP_{r}}{dx}$},
    xmin=0, xmax=1.2,
    ymin=0, ymax=-9,
    xtick={0,0.2,0.4,0.6,0.8,1.0,1.2},
    ytick={0,-1,-2,-3,-4,-5,-6,-7,-8,-9}]

\addplot[
    color=blue]
    coordinates {
    (0,-8.289)(0.1,-8.139)(0.2,-7.705)(0.3,-7.036)(0.4,-6.2)(0.5,-5.271)(0.6,-4.315)(0.7,-3.386)(0.8,-2.52)(0.9,-1.739)(1,-1.054)
    };

\end{axis}

\end{tikzpicture}
\end{document}

Also, I want a label at the end showing (fig:something), can I add label like this in pgfplots? thanks

A:

You can't have ymin>ymax. Set ymin=-9 and ymax=0.
As for the labeling, you can put the plot inside a figure environment. 
\documentclass{article}
\usepackage[margin=0.5in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}

\usepackage{pgfplots}
\pgfplotsset{width=10cm,compat=1.9}
%\usepgfplotslibrary{external}
%\tikzexternalize

\begin{document}

Plotting from data:

\begin{figure}[h]
\centering
\begin{tikzpicture}[trim axis left]
\begin{axis}[ 
title={pressure},
xlabel={r/R},
    ylabel={$\frac{\kappa}{C}\frac{dP_{r}}{dx}$},
    xmin=0, xmax=1.2,
    ymin=-9, ymax=0,
    xtick={0,0.2,0.4,0.6,0.8,1.0,1.2},
    ytick={0,-1,-2,-3,-4,-5,-6,-7,-8,-9}]

\addplot[
    color=blue]
    coordinates {
    (0,-8.289)(0.1,-8.139)(0.2,-7.705)(0.3,-7.036)(0.4,-6.2)(0.5,-5.271)(0.6,-4.315)(0.7,-3.386)(0.8,-2.52)(0.9,-1.739)(1,-1.054)
    };

\end{axis}

\end{tikzpicture}
\caption{Hello world}\label{fig:myplot}
\end{figure}
\end{document}

