here's a drawing I just made (the sine function are replaced by external datas)
\documentclass[12pt]{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{through,calc,arrows,decorations.pathmorphing,backgrounds,positioning,fit}
\begin{document}
\begin{figure}
\begin{tikzpicture}
\def\decalx{-0.8};
\def\decaly{-0.9};
\foreach \pas in {340,320,...,0}
{
\begin{scope}[xshift=\decalx*(340-\pas),yshift=\decaly*(340-\pas)]
\begin{axis}[xmax=600,ymin=-1,ymax=1,xtick=\empty,ytick=\empty,axis x line=middle,axis y line = left]
\addplot[fill=black!5!white,fill opacity=0.5, domain=0:360] expression {sin(\pas/100*\x)};
\end{axis}
\end{scope}
}
\begin{scope}[xshift=-2.8cm,yshift=-10.8cm]
\begin{axis}[,x={(-\decalx,-\decaly)},anchor=south west,xmin=0,xticklabel style={xshift=5},xtick={90,270},axis x line=middle,hide y axis]
\addplot[blue,samples=19,domain=0:360,error bars/.cd, y dir=minus,y fixed relative=1, error mark=none, error bar style={dotted}] {sin(x)};
\end{axis}
\end{scope}
\end{tikzpicture}
\end{figure}
\end{document}
The thing is the blue curve is placed by trial and error, depending on the width, height, y min and max values and a bunch of other stuffs... Is there any way to extract the coordinate of the foreground plot's x axis so that I can draw the final blue chart from it ??? the hard part is probably that this blue curved is skewed...
I've been doing this by hand so far and I can definitely keep on doing it, it's just that I have to make tens of these, and it takes forever to compile with my 300 points data tables...
thanks !!!!
//EDIT///
If I need a ymin or ymax parameter Ant's solution doesn't work anymore...
\documentclass[12pt]{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{through,calc,arrows,decorations.pathmorphing,backgrounds,positioning,fit}
\begin{document}
\begin{figure}
\begin{tikzpicture}
\def\decalx{-0.6};
\def\decaly{-0.9};
\def\ymin{-0.5};
\foreach \pas in {340,320,...,0}
{
\begin{scope}[xshift=\decalx*(340-\pas),yshift=\decaly*(340-\pas)]
\begin{axis}[xmax=600,ymin=\ymin,ymax=1,xtick=\empty,ytick=\empty,axis x line=middle,axis y line = left]
\addplot[fill=black!5!white,fill opacity=0.5, domain=0:360] expression {sin(\pas/100*\x)};
\end{axis}
\end{scope}
}
\begin{scope}[xshift=\decalx*(340),yshift=\decaly*(340)]
\begin{axis}[xmax=600,ymin=\ymin,ymax=1,xtick=\empty,ytick=\empty,axis x line=middle,axis y line = left]
\addplot[fill=black!5!white,fill opacity=0.5, domain=0:360]
expression {0};
\node (start blue axis here) at (rel axis cs:1, 0) {};
\end{axis}
\end{scope}
\begin{axis}[at=(start blue axis here), x={(-\decalx,-\decaly)},anchor=south
west,xmin=0,xticklabel style={xshift=5},xtick={90,270},axis x
line=middle,hide y axis]
\addplot[blue,samples=19,domain=0:360,error bars/.cd, y
dir=minus,y fixed relative=1, error mark=none, error bar
style={dotted}] {sin(x)};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
\addplot shellfeature might be a help - if you are willing to use 3rd party tools. These could be plain text-based likesed/cator table tools asmatlaboroctaveor whatever you have at hand. – Christian Feuersänger Aug 5 '11 at 14:42