# ConTeXt: Is it possible to use pgfplots groupplots library in ConTeXt mkiv?

I tried to use pgfplots groupplots library in ConTeXt. Therefore I loaded pgfplots and the library as described in the manual. It seems to load correctly when looking at the log file. Normal use of pgfplots does work too.

The environment \startgroupplot/\stopgroupplot is unknown, do I miss something?

I tried to get the example from the manual running.

\usemodule[tikz]
\usemodule[pgfplots]
\usepgfplotslibrary[groupplots]
\pgfplotsset{
}

\starttext

\starttikzpicture
\startgroupplot[group style={group size = 2 by 2}, height=3cm, width=3cm]
\nextgroupplot
\nextgroupplot
\nextgroupplot
\nextgroupplot
\stopgroupplot
\stoptikzpicture

\stoptext

• It is \groupplot ... \endgroupplot. Unfortunately, this library does not define ConTeXt synonyms. – Henri Menke Jun 21 '17 at 19:39

It is \groupplot ... \endgroupplot. Unfortunately, this library does not define ConTeXt synonyms, but to get the ConTeXt-y feeling you can easily define them yourself.

\usemodule[tikz]
\usemodule[pgfplots]
\usepgfplotslibrary[groupplots]
\pgfplotsset{
}

\unexpanded\def\startgroupplot{\groupplot}
\unexpanded\def\stopgroupplot{\endgroupplot}

\starttext

\starttikzpicture
\startgroupplot[group style={group size = 2 by 2}, height=3cm, width=3cm]
\nextgroupplot