3

I have a file of data, data.dat. I am using filecontents to import the data and make plots. Consider the following very small snippet:

n   m   data1    data2
2   2   900.00   981.00 
2   3   600.40   675.00
2   4   450.12   428.01
2   5   360.50   534.98
3   2   225.00   219.80
3   3   150.00   140.00
3   4   112.50   111.00
3   5   90.00    98.00

This is a snippet of the actual length of the data. I would like to make a contour plot of data1 which is easily done using this example from PGFPlots.net. However, similar to this example, I would like to add a projection of the surf plots onto the xz-plane and yz-planes.

Unlike the example, there is not an equation to define the distribution onto these axes. How could this be done? The MWE is shown below. I want to change this to a contour plot similar to this.

MWE

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{colorbrewer}
\usepackage{colorbrewer}
\usepackage{sfmath}
\usepackage{filecontents}           

\begin{document}

\pgfplotsset{
colormap={whitered}{color(0cm)=(white); color(1cm)=(orange!75!red)}}


\pgfplotstableread{StretchingResultsQCRB.dat}{\stretch}
\begin{tikzpicture}
\begin{axis}[width=\columnwidth,
    height=0.618\columnwidth,
    xmin=2,
    xlabel={$x$},
    ylabel={$y$},
    zlabel={$P(x,y)$},
    xlabel style = {font=\Large, yshift=1ex},
    ylabel style = {font=\Large, yshift=1ex},
    zlabel style = {font=\Large, yshift=-1ex},  
    zmode=log,  
    ymin=1,
    view={20}{50},
    axis line style={line width=1pt},
    colormap name=whitered,
    colorbar,
        colorbar style={
                at={(1,0)},
                anchor=south west,
                height=0.25*\pgfkeysvalueof{/pgfplots/parent axis height},
                %title={$P(x_1,x_2)$}
    }
]
    \addplot3[surf, line width=0.8pt] table [x={n}, y={m}, z={QCRBa0.5}] {\stretch};
\end{axis}
\end{tikzpicture} 


\end{document}

closed as unclear what you're asking by CarLaTeX, Phelype Oleinik, Bobyandbob, Stefan Pinnow, Andrew Swann Jun 22 '18 at 15:58

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.