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 am trying to plot 3D plots with pgfplots. I have started with an example from documentation:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{pgfplots}
% \usepackage{3dplot}
\begin{document}
%
\begin{figure}[!h]
\begin{tikzpicture}
\begin{axis}
% this yields a 3x4 matrix:
\addplot3+[mesh] coordinates {
(0,0,0) (1,0,0) (2,0,0) (3,0,0)
(0,1,0) (1,1,0.6) (2,1,0.7) (3,1,0.5)
(0,2,0) (1,2,0.7) (2,2,0.8) (3,2,0.5)};
\end{axis}
\end{tikzpicture}
\end{figure}
%
\end{document}

When I look into the file .log I can read:

! Package pgfkeys Error: I do not know the key '/tikz/mesh' and I am going to ignore it. Perhaps you misspelled it.

I have re-installed pgfplots package and the result is the same.

share|improve this question
    
Welcome to TeX.sx!. I removed the thanks and sign-off at the end. This is just the style here, to keep questions and answers clean. Thanks is best expressed by upvoting answers that help you. In addition, I have indented the block of code with four spaces, which the presents the result with syntax highlighting. With the quote I put angle brackets beside the lines. These are available as buttons in the editor too. To see what I did, hit edit and take a look. –  qubyte Jan 29 '12 at 10:34
3  
Can you place a Minimal Working Example in the code block please? When I added the appropriate minimal code around what you have here it compiled fine. –  qubyte Jan 29 '12 at 10:38
    
Your code works fine on my computer. Can you also include the document preamble? –  percusse Jan 29 '12 at 11:13
    
Make sure that you have the current version (1.5.1) of pgfplots. You will need at least version 1.4.1 of this package. –  Thorsten Donig Jan 29 '12 at 11:14
    
Here is the document preambule I use :\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} % \usepackage{3dplot} \begin{document} \begin{figure}[!h] \begin{tikzpicture} \begin{axis} % this yields a 3x4 matrix: \addplot3+[mesh] coordinates { (0,0,0) (1,0,0) (2,0,0) (3,0,0) (0,1,0) (1,1,0.6) (2,1,0.7) (3,1,0.5) (0,2,0) (1,2,0.7) (2,2,0.8) (3,2,0.5) }; \end{axis} \end{tikzpicture} \end{figure} \end{document} –  Loïc Jan 29 '12 at 12:00
show 3 more comments

1 Answer

The example works well with the new version of pgfplots and tikz.

The newest version of tikz is available at sourceforge:

share|improve this answer
add comment

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.