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

  • "APPENDIX" shows up in wrong place in table of contents 2012-03-30

    I have a table of contents in my memoir book. I want there to be one line for each chapter, in addition to headings for each set of similar chapters. For some reason, the line for the first chapter appears before the first phantom line. \documentclas

  • PGFPlots polaraxis axis labels are swapped (or in the wrong place) 2015-07-28

    I have some problems with axis labels when using the polar axis, if I set the X and Y label they appear in the wrong place. When using the polar axis; x coordinate is the angle (azimuth, phi) y coordinate is the radius (zenith, theta). However, the x

  • On display of hidden element it shows on wrong place because of scroll, only in chrome 2016-02-04

    I don't realy know how to explain this thing in short sentence. I don't know if it is bug or not.. In parent div with fixed height and overflow-y scroll, I have multiple children elements, which has jquery function click, what displays hidden element

  • pgfplots axis labels in wrong place after scaling 2015-05-08

    When using the scale key for tikzpicture, the axis labels of pgfplots are no longer in the correct place. In the example below, the first axis environment is not within a scaled tikzpicture environment and the axis labels are placed correctly. The se

  • Vector data(point) is drawn in wrong place on map (OpenLayers) 2012-10-28

    I need to show a map (world map, used default OpenLayers WMS) and one point on it (with events like onhover, etc). Here is my code: var options = { projection: new OpenLayers.Projection("EPSG:900913"), maxResolution: 6000 }; map = new OpenLayers

  • MS Project shows a task duration of less than one day for a single day task 2011-10-05

    I created a task in MS Project 2010 which starts on 14-Oct-2011 and has a duration of one day. Project automatically sets the Finish Date to 17-Oct-2011 (because the 15th and 16th are weekend non-working days). However my task will really finish on t

  • Yipes! pdflatex command placing graphs in wrong place 2011-12-21

    How to influence the position of float environments like figure and table in LaTeX? This is a general question and should collect useful answers for all users. I hope we can use this as a reference --------------Solutions------------- To answer this

  • Point appears in wrong place, seems like wrong SpatialReference 2016-01-06

    I'm using the code below to render a point on the map but the point is in the wrong place. The coordinate system is 28992 which is a local system for the Netherlands. Instead of the point being rendered in the Netherlands, it's rendered off the coast

  • Quiz how to show correct and wrong answer in result activity 2016-02-01

    I would like to know how to show what is wrong and correct answers got in the quiz. Like: 1.A-Wrong 2.A-Wrong 3.A-Correct 4.A-Correct 5.A-Correct Result Activity: public class ResultActivity extends Activity { @Override protected void onCreate(Bundle

  • OpenLayers-2 marker popup appears in the wrong place 2016-07-01

    After user types address in search box, the address marker appears in the wrong place. Here's a screenshot showing the popup positioned below the location instead of above it: Code: Could anyone please suggest what's wrong with the code? toolbarItems

  • Android 4.0.3 has virtual keyboard with Y key in wrong place? 2012-05-20

    Why the virtual keyboard of Android 4.0 has a different qwerty virtual keyboard? It seems the Y is in the wrong place. Is it some configuration? Where it is? Screenshots (click images for larger variants) --------------Solutions------------- Are the

  • Why is the Apple menu icon in the wrong place on my secondary monitor? 2013-12-31

    So I'm running Mavericks and absolutely love having menus on each monitor. I have two external monitors working with my 15" Macbook Pro, and one of the two monitors has the top menu kind of messed up. The Apple icon is way over on the right, and is a

  • Link to Appendix (from anywhere in the document) goes to the wrong place. 2014-05-02

    I have several chapters and several appendices. I am using the hyperref package, and everything is numbered (all the chapters, appendices, etc...) My appendices also have sections within them and I refer to those sections in the text. All the links t

  • LibreOffice 5.0 showing greek letters in place of the for the application interface. 2016-01-20

    I'm new to Linux and I'm using Fedora 14 currently. The LibreOffice5.0 user interface is showing greek letters in place of the normal English interface. I tried to change it from Tools > Options > Language settings (although its not shown in English

  • brackets inserts 'use strict'; automatically in wrong place 2016-07-25

    I use Brackets for editing my codes. Recently, it injects "use strict"; in wrong places. like: . . . (function() { 'use strict'; //this is always added automatically var $ = Main.$, c, d,bi; . . })(); . . this function is only function in the fi

  • Tag Posts showing in wrong places 2013-02-17

    Am using a custom template (tag.php) to show posts related to tag. So when someone clicks on say tag 'A' then he/she gets redirected to my tag.php layout instead of default template for archives. I did this by making a tag.pho in my child theme. Now

  • Location history shows wrong place 2015-02-14

    This question already has an answer here: Google Maps Location History is showing an incorrect location 4 answers I am trying to find out how on Feb 18th and 19th of 2014, I was in Louisville Ky, but my location history is showing that I was in Somer

  • Wrong placement (and/or size) of picture / plot with groupplot of table (- and discontinuity)? 2014-06-05

    Consider this MWE: \documentclass{article} % \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.5.1} \usetikzlibrary{pgfplots.groupplots} \usepackage{pgfplotstable} \pagecolor{yellow!15} \begin{document} \pgfplotstableset{ % %defi

  • 14.04 kate editor does not show any plugins (wrong config permission even after fresh install) 2015-07-31

    I got a strange problem with kate editor. For some reason, whenever I runs kate in normal mode (without sudo) then all kate plugins disappear. I could not see any Projects/FileSystemBrowser/Documents that I normally use. But when I run kate with sudo

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.767 (s). 13 q(s)