Hello,
I am creating a fairly complicated groupplot with a shared legend. Since each subplot has its own combination of axis labels, I created options and then I would like to put the into groupplot as an options, like follows
@pgf gp = GroupPlot({group_style = { group_size = "1 by 1",}, height = "6cm", width = "6cm"});
opts = "title = {title}, ylabel = {y label}, xlabel = {x label} "
push!(gp,opts)
which generates following latex code
\begin{groupplot}[group style={group size={1 by 1}}, height={6cm}, width={6cm}]
title = {title}, ylabel = {y label}, xlabel = {x label}
\end{groupplot}
But I would like the code to be
\begin{groupplot}[group style={group size={1 by 1}}, height={6cm}, width={6cm}]
\nextgroupplot[\title = {title}, ylabel = {y label}, xlabel = {x label}]
\end{groupplot}
Is there a way, how to achieve this, or I have to put the nextgroupplot by myself, as
@pgf gp = GroupPlot({group_style = { group_size = "1 by 1",}, height = "6cm", width = "6cm"});
opts = "title = {title}, ylabel = {y label}, xlabel = {x label} "
push!(gp,"\\nextgroupplot["*opts*"]")
It is sort of hacky solution, but it works. I am afraid that I am missing the “correct” way to do it.
Thanks for answers.