pgfplot z projection shows up at wrong place

Starting from the example http://pgfplots.net/tikz/examples/contour-and-surface/, I would like to make projection of a surface, defined by a table. The X and Y projections work OK, but the Z projection appears at the top, rather than at the bottom. I guess it is because of the log scale. What do I wrong? The picture below illustrates my problem. (I know, the picture is not attractive and not reasonable, but I wanted to reduce the size for an MWE)

pgfplot z projection shows up at wrong place

\documentclass[border=10pt]{standalone} \usepackage{verbatim} \usepackage{pgfplots} \pgfplotsset{width=7cm,compat=1.8} %http://pgfplots.net/tikz/examples/contour-and-surface/ \pgfplotstableset{%     col sep=semicolon,     x index=0,     y index=1,     z index=2,     header=false }%  \begin{filecontents*}{data/XYZ.csv}    2016; 1;      32.7e-9    2016;10;      1560e-9    2016;20;      9811e-9    2016;25;      5204e-9     2015; 1;   199e-9    2015;10;   438e-9    2015;20;   674e-9    2015;25;  1718e-9     2014; 1;    199e-9    2014;10;   2446e-9    2014;20;   1893e-9    2014;25;   2670e-9     1994; 1;   76957E-9    1994;10;54545455e-9    1994;20; 1390462e-9    1994;25; 1440795e-9     1993; 1;  1167453e-9    1993;10;  7484185e-9    1993;20;  7484185e-9    1993;25;  8876163e-9 \end{filecontents*}   \begin{document} \begin{tikzpicture} \pgfplotsset{     every axis/.append style={         scale only axis,         width=\textwidth,        height=\textwidth,         xtick={1995,2000,2005,2010,2015},         ytick={1,10,20,25},         ztick={1e-8,1e-6,1e-4,1e-2,1e-0}     },     /tikz/every picture/.append style={         trim axis left,         trim axis right,     }     }    \begin{axis}       [ %nodes near coords={(\coordindex)},     domain=1980:2020,     domain y=1:40,       footnotesize,       title={Hillside},             /pgf/number format/.cd,         use comma,         1000 sep={},         xlabel=Year,         ylabel=position,         xmin=1980, xmax=2020,% x scale         ymin=1, ymax=40, % y scale         zmin=1e-12, zmax=1, % z scale         xlabel=Year,         zmode = log,         grid=major,         grid style={dotted},         colormap/jet,         zmode=log,       ]  \addplot3 [surf]     table {data/XYZ.csv};  % This is the Z (bottom) projection     \addplot3[         contour gnuplot={             % cdata should not be affected by z filter:             output point meta=rawz,             number=15,             labels=false,         },         z filter/.code=\def\pgfmathresult{1E-4},     ]     table {data/XYZ.csv}; % This is the X projection     \addplot3[         domain=1980:2020,         domain y=1:30,         % we want 1d (!) individually colored mesh segments:         mesh, patch type=line,         x filter/.code=\def\pgfmathresult{1980},     ]      table {data/XYZ.csv};  %% This is the Y projection     \addplot3[         % we want 1d (!) individually colored mesh segments:         mesh, patch type=line,         y filter/.code=\def\pgfmathresult{40},     ]      table {data/XYZ.csv}; \end{axis} \end{tikzpicture}  \end{document} 

Replay

Category: pgfplots Time: 2016-07-31 Views: 0
Tags: pgfplots

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.130 (s). 12 q(s)