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 want to plot a dataset in a 3D pgfplots graph. It looks like a good start but somehow the label placement is far out. Boiling it down to a MWE did not give me any hints how to get the labels back in place. Is there any option I overlooked? My pgf and pgfplots version's are fairly recent, so it should not be this issue: 3d axis label ovelapping.

Here is my almost minimal example:

\documentclass[tikz]{standalone}
\usepackage{tikz,pgfplots,pgfplotstable}
\pgfplotsset{compat=1.7} 

\begin{document}

\pgfplotstableread{
as_concentration    T   
0.00        0.0
0.00        0.152   
0.13        0.00    
}\ascycledata

\pgfplotstableread{
as_concentration    T   
0.00        0.152   
0.13        0.00    
}\asdata

\begin{tikzpicture}
\begin{axis}[
    view={45}{45},
    width=10cm,
    height=10cm,
    ymin=-0.1, ymax=0.25, xmax=0.19, xmin=0,    zmax=0.3,
    xlabel=$x$,
    ylabel=$y$,
    axis lines=center,
    ]
    \addplot3 [forget plot,no marks,fill=blue, opacity=0.5] 
                     table[x=as_concentration,y expr=0,z=T] {\ascycledata}; 

    \addplot3+ [] table[x=as_concentration,y expr=0,z=T]    {\asdata};              
\end{axis}
\end{tikzpicture} 

\end{document}

And the output with the axis labels far away:

wrong result

share|improve this question
    
Looks like it's due to axis lines=center option. –  percusse Feb 27 '13 at 23:25
    
Ah, that is already a nice hint. Some searching with this keyword revealed: "That is a known bug ..." by Christian Feuersänger (tex.stackexchange.com/questions/84442/…). So that answers my question already. –  Alexander Feb 27 '13 at 23:34
add comment

1 Answer

up vote 3 down vote accepted

With percusse's hint it turns out that this problem is a known bug in pgfplots 1.7 (see: pgfplots: labels and width issues in non-boxed 3d plot with oblique projection).

Christian Feuersänger already fixed this in the most recent unstable version of pgfplots (1.7-181-gc021eee). The fixed behavior needs to be enabled via the explicit use of the new version: \pgfplotsset{compat=1.8}.

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.