Hello Rob,
the developerversion of pgfplots now has a 'reverse legend' feature
which does exactly what you want.
This feature has been suggested and implemented by Tom Cashman (thanks,
Tom!).
Until the next version is ready, you can download the (not completely
stable) developerversion or you can use the attached self-contained
implementation of Tom Cashman which can be used as last statement in an
axis.
Please note that this implementation should be considered as
non-supported special feature which will probably cease to work in one
of the following stable versions of pgfplots (without notice)! Use at
your own risk!
Regards
Christian
--
Christian Feuersaenger
Institut fuer Numerische Simulation
Rheinische Friedrich-Wilhelms Universitaet Bonn
Wegelerstrasse 6
D-53115 Bonn
Germany
Tel: +49 228 733848
URL:
http://wissrech.ins.uni-bonn.de/people/feuersaenger.html% Please note that this implementation should be considered as non-supported special feature which will probably cease to work in one of the following stable versions of pgfplots (without notice)! Use at your own risk!
\newcommand{\reverselegend}{%
% Reverse \pgfplots@plotspeclist
\pgfplotslistnewempty\pgfplots@plotspeclist@reversed
\begingroup
\pgfplotslistforeachungrouped\pgfplots@plotspeclist\as\pgfplots@plotspeclisttmp{%
\expandafter\pgfplotslistpushfront\pgfplots@plotspeclisttmp\to\pgfplots@plotspeclist@reversed
}%
\global\let\pgfplots@plotspeclist=\pgfplots@plotspeclist@reversed
\global\let\pgfplots@plotspeclist@reversed=\relax
\endgroup
% Reverse \pgfplots@legend
\pgfplotslistnewempty\pgfplots@legend@reversed
\begingroup
\pgfplotslistforeachungrouped\pgfplots@legend\as\pgfplots@legendtmp{%
\expandafter\pgfplotslistpushfront\pgfplots@legendtmp\to\pgfplots@legend@reversed
}%
\global\let\pgfplots@legend=\pgfplots@legend@reversed
\global\let\pgfplots@legend@reversed=\relax
\endgroup
}
------------------------------------------------------------------------------
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users