\documentclass[a4paper]{article}
\usepackage{german}
\usepackage[utf8]{inputenc} % erlaubt direkte Nutzung von Umlauten

% \usepackage[a4paper,noheadfoot,pdftex,left=0.8cm,right=1cm,top=0.8cm,bottom=0.8cm]{geometry}
% \usepackage{color}
% \usepackage{colortbl}
% \usepackage{longtable}
% \usepackage[a4paper,colorlinks=true]{hyperref} % Querverweise etc. option pdftex,dvipdfm?
% \usepackage{graphicx}
% \usepackage[draft]{graphicx}
% \usepackage{listings} % fuer codefragmente jeder art
\usepackage[intlimits]{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
% \usepackage{amsthm}
\usepackage{bibgerm}
%\usepackage{simplelist}

\usepackage{pgfplots}
\makeatletter
\input pgfplotsliststructureext.code.tex
\makeatother

% fuer endvironment 'sidewaysfigure' bspw
% \usepackage{rotating}

%\pdfinfo {
%	/Author	(Christian Feuersaenger)
%}

%%
% My user defined commands ...
%
\usepackage{mymath}
\usepackage{myext}

% von Alex: A4-Groesse, symmetrische Seitenraender.
% \usepackage{mya4sym}


% figure einstellungen:
%\renewcommand{\topfraction}{0.85}
%\renewcommand{\textfraction}{0.06}
%\renewcommand{\floatpagefraction}{0.8}

\def\testfile#1{\chapter{#1}}
\def\testsection#1{\message{STARTING TEST SECTION '#1'}\section{#1}}
\def\testsubsection#1{\message{STARTING TEST SUBSECTION '#1'}\subsection{#1}}
\def\testsubsubsection#1{\message{STARTING TEST SUBSUBSECTION '#1'}\subsubsection{#1}}


\author{Christian Feuersänger}
%\title{}

\begin{document}
%\maketitle

\parindent=0pt
\parskip=10pt

\testsection{pgfplotslist test}
\message{pgfplotslist test}%
{
\tracingcommands=2
\tracingmacros=2
\pgfplotslistnewempty\probe
\pgfplotslistpushback eins\to\probe
\pgfplotslistpushback [probe]\to\probe
\pgfplotslistpushback [probe2]\to\probe
\pgfplotslistpushback [probe3]\to\probe

\verb|\pgfplotslistpushback....|

Size: \pgfplotslistsize\probe\to{\count0}\the\count0

Contents:

\pgfplotslistforeach\probe\as\curlistelem{\curlistelem \par}

Nochmal mit \verb|pgfplotslistnew{Eins\\Zwei\\Drei\\}|:

\pgfplotslistnew\foolist{Eins\\Zwei\\Drei\\}%
\pgfplotslistforeach\foolist\as\foo{Element \foo\par}%

Nochmal mit \verb|pgfplotslistnew{Eins,Zwei,Drei}|:

\pgfplotslistnew\foolist{Eins,Zwei,Drei}%
\pgfplotslistforeach\foolist\as\foo{Element \foo\par}%

Nochmal mit \verb|\pgfplotslistnew{Eins,Zwei\\Zeilen,Drei}|:

\pgfplotslistnew\foolist{Eins,Zwei\\Zeilen,Drei}%
\pgfplotslistforeach\foolist\as\foo{Element \foo\par}%

Nochmal mit \verb|\pgfplotslistnew{}|:

\pgfplotslistnew\foolist{}%
\pgfplotslistforeach\foolist\as\foo{Element \foo\par}%

Size: \pgfplotslistsize\foolist\to{\count0}\the\count0



Nochmal mit \verb|\pgfplotslistnew{Eins,Zwei\\Zeilen,Drei\\}|:

\pgfplotslistnew\foolist{Eins,Zwei\\Zeilen,Drei\\}%
\pgfplotslistforeach\foolist\as\foo{Element \foo\par}%


\testsubsection{select}
\count1=1
Element \the\count1: \pgfplotslistselect\count1\of\probe\to\elem\elem

Element 3: \pgfplotslistselect3\of\probe\to\elem\elem

count1 is now=\the\count1
\vskip1cm

\testsubsection{listpopfront}
\pgfplotslistpopfront\probe\to\first
first:  \first

remaining size: \pgfplotslistsize\probe\to{\count0}\the\count0

\pgfplotslistpopfront\probe\to\first
first: \first

remaining size: \pgfplotslistsize\probe\to{\count0}\the\count0


\testsubsection{list concat}
new list:
\pgfplotslistnew\foolist{First Element\\Second Element\\Third Element\\}
\pgfplotslistnew\foolistX{Eins\\Zwei\\}

Contents:
\pgfplotslistforeach\foolist\as\curlistelem{\curlistelem \par}

\pgfplotslistconcat\third=\foolist&\foolistX

Result of concat:
\pgfplotslistforeach\third\as\curlistelem{\curlistelem \par}
}

\section{pgfplotsarray test}
\message{pgfplotsarray test}
{
\tracingcommands=2
\tracingmacros=2

\pgfplotsarraynewempty\probe
\pgfplotsarraypushback eins\to\probe
\pgfplotsarraypushback [probe]\to\probe
\pgfplotsarraypushback [probe2]\to\probe
\pgfplotsarraypushback [probe3]\to\probe

Size: `\pgfplotsarraysize\probe\to{\count0}\the\count0'

Content:

\pgfplotsarrayforeach\probe\as\curarrayelem{\curarrayelem \par}

\testsubsection{Select}
Test list:

\pgfplotsarraynew\fooarray{Eins\\Zwei\\Drei\\}%
\pgfplotsarrayforeach\fooarray\as\foo{Element \foo\par}%

Getting elements:

\count1=1
Element \the\count1: \pgfplotsarrayselect\count1\of\fooarray\to\elem\elem

Element 2: \pgfplotsarrayselect2\of\fooarray\to\elem\elem

\vskip1cm


\testsubsection{Copy}

Copy:
\pgfplotsarraynew\fooarray{Eins\\Zwei\\Drei\\}%
Source: \pgfplotsarrayforeach\fooarray\as\foo{Element \foo\par}%

\pgfplotsarraycopy\fooarray\to\fooarrayX

Copy:   \pgfplotsarrayforeach\fooarrayX\as\foo{Element \foo\par}%

\testsubsection{reverse iter}
\pgfplotsarrayforeachreversed\probe\as\curarrayelem{\curarrayelem \par}

\testsubsection{reverse iter ungrouped}
\pgfplotsarrayforeachreversedungrouped\probe\as\curarrayelem{\curarrayelem \par}

\testsubsection{sort}
\pgfplotsarraynewempty\testarray
\pgfplotsarraypushback503\to\testarray
\pgfplotsarraypushback087\to\testarray
\pgfplotsarraypushback512\to\testarray
\pgfplotsarraypushback061\to\testarray
\pgfplotsarraypushback908\to\testarray
\pgfplotsarraypushback170\to\testarray
\pgfplotsarraypushback897\to\testarray
\pgfplotsarraypushback275\to\testarray
\pgfplotsarraypushback653\to\testarray
\pgfplotsarraypushback426\to\testarray
\pgfplotsarraypushback154\to\testarray
\pgfplotsarraypushback509\to\testarray
\pgfplotsarraypushback612\to\testarray
\pgfplotsarraypushback677\to\testarray
\pgfplotsarraypushback765\to\testarray
\pgfplotsarraypushback703\to\testarray

Unsorted: 

[\pgfplotsarrayforeach\testarray\as\elem{\elem\space}]

\pgfplotsarraysort\testarray

sorted: 

[\pgfplotsarrayforeach\testarray\as\elem{\elem\space}]

}


\section{App--list test}
{
\tracingmacros=2\tracingcommands=2

\pgfplotsapplistnewempty\foolist

\pgfplotsapplistedefcontenttomacro\foolist\to\content
Empty list: '\content'.

\pgfplotsapplistpushback Eins\to\foolist
\pgfplotsapplistedefcontenttomacro\foolist\to\content
Now: '\content'.

\pgfplotsapplistpushback Zwei\to\foolist
\pgfplotsapplistedefcontenttomacro\foolist\to\content
Now: '\content'.

\pgfplotsapplistpushback Drei\to\foolist
\pgfplotsapplistedefcontenttomacro\foolist\to\content
Now: '\content'.
}

\bibliographystyle{gerabbrv} %gerapali} %gerabbrv} %gerunsrt.bst} %gerabbrv}% gerplain}
% \bibliography{literatur.bib}
\end{document}


