# error while using gnuplot in pgfplots

I am using pgfplots and tikz library for generating some figures. my problem is that I can not use gnuplot within pgfplots. I tried to compile the following code bu seemingly the gnuplot is not recognized.

\begin{tikzpicture}
\begin{axis}[view={0}{90}]
\end{axis} \end{tikzpicture}


Anyone knows which package I should include?

-
Use pdflatex --shell-escape yourfile. Yourfile is actually your tex file. Make sure that the gnuplot executable is in system's path. –  Harish Kumar Feb 10 '13 at 0:24

Compile this with --shell-escape. Also make sure that gnuplot is installed and is in system's path:

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat = 1.7}

\begin{document}

\begin{tikzpicture}

\begin{axis}[
%   title = {$x \times y$}
, xlabel = $x$
, ylabel = $y$
, domain = -1:1
, y domain = -1:1
, enlargelimits
, view = {0}{90}
, x tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=1,
/tikz/.cd
}
, y tick label style={
/pgf/number format/.cd,
fixed,
fixed zerofill,
precision=1,
/tikz/.cd
}
]

\end{axis}

\end{tikzpicture}

\end{document}


-
Just beautiful. –  vonbrand Feb 10 '13 at 0:29
I don't know how can I compile with --shell--escape? I'm using win7 –  batista cori Feb 10 '13 at 0:35
@batistacori Which editor you are using to type your latex code? –  Harish Kumar Feb 10 '13 at 0:46
solved thanks... I replaced my \begin{axis} with yours. –  batista cori Feb 10 '13 at 0:47
@HarishKumar another problem occurs. when I change the function of the plot. nothing is changed in pdf view. it is always like the above image –  batista cori Feb 10 '13 at 1:26
show 1 more comment