1

I have a tikzpicture with a 4 by 1 groupplot generated by matplotlib2tikz and want to make label in the middle of the picture below the graph, similar to what can be achieved with \centering after \end{tikzpicture}. How this can be done?

Edit: adding a not-so-minimal working example per @Jan 's request (work in progress). What I've tried is in the secon-to-last line:

\begin{tikzpicture}

\begin{groupplot}[group style={group size=4 by 1,
 yticklabels at=edge left,
 horizontal sep=10pt}]
\nextgroupplot[ylabel={\small ylabel},
xmin=0, xmax=60,
ymin=0, ymax=60,
width=\figurewidth,
height=\figureheight,
tick align=outside,
x grid style={white!80.0!black},
y grid style={white!80.0!black},
axis line style={lightgray!20.0!black},
enlargelimits = false,
standard,
axis equal
]
\addplot [line width=0.7000000000000001pt, black, mark=*, mark size=2, mark options={solid}, only marks]
table {%
0.324 0.628
52.706 14.223
};
\addplot [line width=0.7000000000000001pt, black]
table {%
0.324 3.05943257386342
52.706 7.39484684158939
};
\addplot [line width=0.7000000000000001pt, black, dashed]
table {%
0 0
60 60
};
\nextgroupplot[
xmin=0, xmax=60,
ymin=0, ymax=60,
width=\figurewidth,
height=\figureheight,
tick align=outside,
x grid style={white!80.0!black},
y grid style={white!80.0!black},
axis line style={lightgray!20.0!black},
enlargelimits = false,
standard,
axis equal
]
\addplot [line width=0.7000000000000001pt, black, mark=*, mark size=2, mark options={solid}, only marks]
table {%
0.324 3.241
52.706 5.946
};
\addplot [line width=0.7000000000000001pt, black]
table {%
0.324 4.06077185448631

52.706 2.5181107790982
};
\addplot [line width=0.7000000000000001pt, black, dashed]
table {%
0 0
60 60
};
\nextgroupplot[
xmin=0, xmax=60,
ymin=0, ymax=60,
width=\figurewidth,
height=\figureheight,
tick align=outside,
x grid style={white!80.0!black},
y grid style={white!80.0!black},
axis line style={lightgray!20.0!black},
enlargelimits = false,
standard,
axis equal
]
\addplot [line width=0.7000000000000001pt, black, mark=*, mark size=2, mark options={solid}, only marks]
table {%
0.324 12.063
52.706 42.776
};
\addplot [line width=0.7000000000000001pt, black]
table {%
0.324 11.7510527712628
52.706 41.251917297554
};
\addplot [line width=0.7000000000000001pt, black, dashed]
table {%
0 0
60 60
};
\nextgroupplot[
xmin=0, xmax=60,
ymin=0, ymax=60,
width=\figurewidth,
height=\figureheight,
tick align=outside,
x grid style={white!80.0!black},
y grid style={white!80.0!black},
axis line style={lightgray!20.0!black},
enlargelimits = false,
standard,
axis equal
]
\addplot [line width=0.7000000000000001pt, black, mark=*, mark size=2, mark options={solid}, only marks]
table {%
0.324 1.654
52.706 20.3
};
\addplot [line width=0.7000000000000001pt, black]
table {%
0.324 1.34479027913101
52.706 20.3653860826401
};
\addplot [line width=0.7000000000000001pt, black, dashed]
table {%
0 0
60 60
};
\end{groupplot}
\node [anchor=center] at (2\figurewidth,0) {I want a common xlabel};
\end{tikzpicture}

Produced this:

enter image description here

Btw ylabel is also misplaced but that is for another question

Edit2: Solution adapted from the question linked by @percusse :

\node (title) at ($(group c2r1.center)!0.5!(group c3r1.center)+(0,-0.5\figureheight)$) {THE Title};
  • 1
    Could you please a MWE to show us, what you have tried already? – Jan Jan 11 '17 at 09:36
  • 1
    http://tex.stackexchange.com/questions/51002/how-can-a-title-be-placed-for-a-group-of-pgfplots – percusse Jan 11 '17 at 09:55
  • @percusse Thank you, worked fine. A newbie question: what do I now? Delete the question since it's a dupe, ask you to make an answer to get accepted, or just upvote all I can? – Hennadii Madan Jan 11 '17 at 10:07
  • Duplicate questions are typically closed as such, so I did that. This question will still be available, so if anyone ends up here through some search, they're pointed to where an answer can be found. – Torbjørn T. Jan 11 '17 at 10:13
  • @TorbjørnT. OK, then I oficially ask admins to close since is seems I son't have enough rep to do that – Hennadii Madan Jan 11 '17 at 10:19

0 Answers0