Hello Joel,
there were plans for different colorbars per axis, but these plans have
never really been pursued (partly due to a lack of people requesting it).
The manual contains a hint on how it would be done (compare the
colorbar/draw/.code key) -- which is, admittadly, not very user-friendly.
So, the answer is: multiple colorbars have no high-level support.
Here is what the high-level support will do eventually:
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.5}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}
\begin{axis}[colorbar,
colorbar/draw/.append code={
\begin{axis}[
point meta min=0, point meta max=1,
colormap/blackwhite,
colorbar horizontal,
every colorbar,colorbar shift,colorbar=false,
]
\pgfkeysvalueof{/pgfplots/colorbar addplot}
\end{axis}
}
]
\addplot+[scatter] {x};
\end{axis}
\end{tikzpicture}
\end{document}
The key points for the approach are
1. you have a standard 'colorbar'.
2. you modify 'colorbar/draw' by means of 'colorbar/draw/.append
code={<arg>}'. This appends <arg> to what would usually be drawn as
colorbar.
The argument should contain
1. the limits (point meta min/max) of the second color bar
2. style changes of the colorbar (like colorbar horizontal)
3. any colormap changes
4. the obligatory key sequence 'every colorbar,colorbar
shift,colorbar=false,' as stated in the manual.
5. the obligatory ' \pgfkeysvalueof{/pgfplots/colorbar addplot}'. Here,
the manual is outdated (sorry for that).
Using the steps above is safe (although a bit tedious).
Best regards
Christian
Am 22.03.2012 05:30, schrieb Joel:
> Hello Christian,
>
>
> In axis environment which plots more than one surface, is it possible to
> generate different colorbars, each corresponding to a different surface?.
>
>
> Please see an example output. I'd like to have a separate colorbar for the
> top and bottom surfaces, respectively.
>
>
> Thanks,
>
> Joel
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Pgfplots-features mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pgfplots-features