\definecolor{mycolor1}{rgb}{0.00000,0.44700,0.74100}% \definecolor{mycolor2}{rgb}{0.85000,0.32500,0.09800}% \definecolor{mycolor3}{rgb}{0.92900,0.69400,0.12500}% % \begin{tikzpicture} \footnotesize \pgfplotsset{ plotstyle1/.style={color=mycolor1, forget plot}, plotstyle2/.style={color=mycolor2, forget plot}, plotstyle3/.style={color=mycolor3, forget plot} } \def\rows{1} \def\cols{3} \def\horzsep{1cm} \def\basepath{./figures/} \begin{groupplot}[% group style={rows = \rows, columns = \cols, horizontal sep = \horzsep}, scale only axis, width=1/\cols*0.7\textwidth -\horzsep, legend style={legend columns=2,legend to name=legendname, legend cell align=left,/tikz/every even column/.append style={column sep=0.5cm}} ] \nextgroupplot[xmin=-6.2,xmax=-3.8,ymin=-0.2,ymax=2.2] \input{\basepath mymatlabgroupfigure_11.tikz} \coordinate (top) at (rel axis cs:0,1); \nextgroupplot[xmin=-3.2,xmax=-0.8,ymin=-0.2,ymax=2.2] \input{\basepath mymatlabgroupfigure_12.tikz} \nextgroupplot[xmin=-0.2,xmax=2.2,ymin=-0.2,ymax=2.2] \input{\basepath mymatlabgroupfigure_13.tikz} \coordinate (bot) at (rel axis cs:1,0); \end{groupplot} \path (top|-current bounding box.south)--coordinate(legendpos)(bot|-current bounding box.south); \end{tikzpicture}%