Subcaptions in subfigures

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












6















So i need to put some subcaption in my figure. But till now I haven't figured how.



enter image description here



documentclass[12pt, openany]report

usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[french]babel
usepackagepgfplots
usepackageamsmath
usepackagegraphicx %inclusion de figures
usepackagepgf,tikz
usetikzlibrarybabel
usetikzlibrarycalc
usepgfplotslibrarygroupplots

pgfplotsset
tick label style = font = fontsize6 pt12 ptselectfont,
label style = font = fontsize8 pt12 ptselectfont,
legend style = font = fontsize8 pt12 ptselectfont,
title style = font = fontsize8 pt12 ptselectfont,

begindocument
begintikzpicture

definecolorcolor0rgb0.886274509803922,0.290196078431373,0.2
definecolorcolor1rgb0.203921568627451,0.541176470588235,0.741176470588235
definecolorcolor2rgb0.596078431372549,0.556862745098039,0.835294117647059

begingroupplot[group style=group size=2 by 2]
nextgroupplot[
title=textbfTime vs Temperature,
xlabel=Time[UTC],
ylabel=Temperature [$circ$C],
xmin=-0.05, xmax=1.01,
ymin=-34.0035, ymax=37.5,
ytick=-30,-15,...,15,30,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!115.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
%legend style=black,
%legend style=draw=white!80.0!black,
legend cell align=left,
legend entries=$T_1$,$T_2$,$T_3$,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addplot [semithick, color0]
table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=textbfTime vs Altitude,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
addplot [semithick, color0]
table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=textbfTime vs Altitude,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
addplot [semithick, color0]
table %data
path [draw=white, fill opacity=0] (axis cs:0,-1026.692)
--(axis cs:0,24734.252);

path [draw=white, fill opacity=0] (axis cs:1,-1026.692)
--(axis cs:1,24734.252);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);


I just put a part of the code beacause is very long and there is too much data.



Thanks in advance!










share|improve this question

















  • 1





    Probably use subcaption package?

    – andselisk
    Feb 20 at 3:34






  • 2





    Your code is not compilable. We we compile we get File ended while scanning use of pgfplotstablecollectoneargwithpreparecatcod es@end. <inserted text> . Please check the code.

    – subham soni
    Feb 20 at 3:59












  • Are you looking for tex.stackexchange.com/a/243981/121799 ?

    – marmot
    Feb 20 at 4:02











  • So what function is this subcaption supposed to fill?

    – John Kormylo
    Feb 20 at 4:33















6















So i need to put some subcaption in my figure. But till now I haven't figured how.



enter image description here



documentclass[12pt, openany]report

usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[french]babel
usepackagepgfplots
usepackageamsmath
usepackagegraphicx %inclusion de figures
usepackagepgf,tikz
usetikzlibrarybabel
usetikzlibrarycalc
usepgfplotslibrarygroupplots

pgfplotsset
tick label style = font = fontsize6 pt12 ptselectfont,
label style = font = fontsize8 pt12 ptselectfont,
legend style = font = fontsize8 pt12 ptselectfont,
title style = font = fontsize8 pt12 ptselectfont,

begindocument
begintikzpicture

definecolorcolor0rgb0.886274509803922,0.290196078431373,0.2
definecolorcolor1rgb0.203921568627451,0.541176470588235,0.741176470588235
definecolorcolor2rgb0.596078431372549,0.556862745098039,0.835294117647059

begingroupplot[group style=group size=2 by 2]
nextgroupplot[
title=textbfTime vs Temperature,
xlabel=Time[UTC],
ylabel=Temperature [$circ$C],
xmin=-0.05, xmax=1.01,
ymin=-34.0035, ymax=37.5,
ytick=-30,-15,...,15,30,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!115.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
%legend style=black,
%legend style=draw=white!80.0!black,
legend cell align=left,
legend entries=$T_1$,$T_2$,$T_3$,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addplot [semithick, color0]
table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=textbfTime vs Altitude,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
addplot [semithick, color0]
table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=textbfTime vs Altitude,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
addplot [semithick, color0]
table %data
path [draw=white, fill opacity=0] (axis cs:0,-1026.692)
--(axis cs:0,24734.252);

path [draw=white, fill opacity=0] (axis cs:1,-1026.692)
--(axis cs:1,24734.252);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);


I just put a part of the code beacause is very long and there is too much data.



Thanks in advance!










share|improve this question

















  • 1





    Probably use subcaption package?

    – andselisk
    Feb 20 at 3:34






  • 2





    Your code is not compilable. We we compile we get File ended while scanning use of pgfplotstablecollectoneargwithpreparecatcod es@end. <inserted text> . Please check the code.

    – subham soni
    Feb 20 at 3:59












  • Are you looking for tex.stackexchange.com/a/243981/121799 ?

    – marmot
    Feb 20 at 4:02











  • So what function is this subcaption supposed to fill?

    – John Kormylo
    Feb 20 at 4:33













6












6








6








So i need to put some subcaption in my figure. But till now I haven't figured how.



enter image description here



documentclass[12pt, openany]report

usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[french]babel
usepackagepgfplots
usepackageamsmath
usepackagegraphicx %inclusion de figures
usepackagepgf,tikz
usetikzlibrarybabel
usetikzlibrarycalc
usepgfplotslibrarygroupplots

pgfplotsset
tick label style = font = fontsize6 pt12 ptselectfont,
label style = font = fontsize8 pt12 ptselectfont,
legend style = font = fontsize8 pt12 ptselectfont,
title style = font = fontsize8 pt12 ptselectfont,

begindocument
begintikzpicture

definecolorcolor0rgb0.886274509803922,0.290196078431373,0.2
definecolorcolor1rgb0.203921568627451,0.541176470588235,0.741176470588235
definecolorcolor2rgb0.596078431372549,0.556862745098039,0.835294117647059

begingroupplot[group style=group size=2 by 2]
nextgroupplot[
title=textbfTime vs Temperature,
xlabel=Time[UTC],
ylabel=Temperature [$circ$C],
xmin=-0.05, xmax=1.01,
ymin=-34.0035, ymax=37.5,
ytick=-30,-15,...,15,30,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!115.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
%legend style=black,
%legend style=draw=white!80.0!black,
legend cell align=left,
legend entries=$T_1$,$T_2$,$T_3$,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addplot [semithick, color0]
table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=textbfTime vs Altitude,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
addplot [semithick, color0]
table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=textbfTime vs Altitude,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
addplot [semithick, color0]
table %data
path [draw=white, fill opacity=0] (axis cs:0,-1026.692)
--(axis cs:0,24734.252);

path [draw=white, fill opacity=0] (axis cs:1,-1026.692)
--(axis cs:1,24734.252);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);


I just put a part of the code beacause is very long and there is too much data.



Thanks in advance!










share|improve this question














So i need to put some subcaption in my figure. But till now I haven't figured how.



enter image description here



documentclass[12pt, openany]report

usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[french]babel
usepackagepgfplots
usepackageamsmath
usepackagegraphicx %inclusion de figures
usepackagepgf,tikz
usetikzlibrarybabel
usetikzlibrarycalc
usepgfplotslibrarygroupplots

pgfplotsset
tick label style = font = fontsize6 pt12 ptselectfont,
label style = font = fontsize8 pt12 ptselectfont,
legend style = font = fontsize8 pt12 ptselectfont,
title style = font = fontsize8 pt12 ptselectfont,

begindocument
begintikzpicture

definecolorcolor0rgb0.886274509803922,0.290196078431373,0.2
definecolorcolor1rgb0.203921568627451,0.541176470588235,0.741176470588235
definecolorcolor2rgb0.596078431372549,0.556862745098039,0.835294117647059

begingroupplot[group style=group size=2 by 2]
nextgroupplot[
title=textbfTime vs Temperature,
xlabel=Time[UTC],
ylabel=Temperature [$circ$C],
xmin=-0.05, xmax=1.01,
ymin=-34.0035, ymax=37.5,
ytick=-30,-15,...,15,30,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!115.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
%legend style=black,
%legend style=draw=white!80.0!black,
legend cell align=left,
legend entries=$T_1$,$T_2$,$T_3$,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addplot [semithick, color0]
table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=textbfTime vs Altitude,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
addplot [semithick, color0]
table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=textbfTime vs Altitude,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
addplot [semithick, color0]
table %data
path [draw=white, fill opacity=0] (axis cs:0,-1026.692)
--(axis cs:0,24734.252);

path [draw=white, fill opacity=0] (axis cs:1,-1026.692)
--(axis cs:1,24734.252);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);


I just put a part of the code beacause is very long and there is too much data.



Thanks in advance!







tikz-pgf subfig






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 20 at 3:28









Diego ValleDiego Valle

613




613







  • 1





    Probably use subcaption package?

    – andselisk
    Feb 20 at 3:34






  • 2





    Your code is not compilable. We we compile we get File ended while scanning use of pgfplotstablecollectoneargwithpreparecatcod es@end. <inserted text> . Please check the code.

    – subham soni
    Feb 20 at 3:59












  • Are you looking for tex.stackexchange.com/a/243981/121799 ?

    – marmot
    Feb 20 at 4:02











  • So what function is this subcaption supposed to fill?

    – John Kormylo
    Feb 20 at 4:33












  • 1





    Probably use subcaption package?

    – andselisk
    Feb 20 at 3:34






  • 2





    Your code is not compilable. We we compile we get File ended while scanning use of pgfplotstablecollectoneargwithpreparecatcod es@end. <inserted text> . Please check the code.

    – subham soni
    Feb 20 at 3:59












  • Are you looking for tex.stackexchange.com/a/243981/121799 ?

    – marmot
    Feb 20 at 4:02











  • So what function is this subcaption supposed to fill?

    – John Kormylo
    Feb 20 at 4:33







1




1





Probably use subcaption package?

– andselisk
Feb 20 at 3:34





Probably use subcaption package?

– andselisk
Feb 20 at 3:34




2




2





Your code is not compilable. We we compile we get File ended while scanning use of pgfplotstablecollectoneargwithpreparecatcod es@end. <inserted text> . Please check the code.

– subham soni
Feb 20 at 3:59






Your code is not compilable. We we compile we get File ended while scanning use of pgfplotstablecollectoneargwithpreparecatcod es@end. <inserted text> . Please check the code.

– subham soni
Feb 20 at 3:59














Are you looking for tex.stackexchange.com/a/243981/121799 ?

– marmot
Feb 20 at 4:02





Are you looking for tex.stackexchange.com/a/243981/121799 ?

– marmot
Feb 20 at 4:02













So what function is this subcaption supposed to fill?

– John Kormylo
Feb 20 at 4:33





So what function is this subcaption supposed to fill?

– John Kormylo
Feb 20 at 4:33










1 Answer
1






active

oldest

votes


















9














I copied the code from the answer to your previous question (to have a code that can be compiled). Then I applied the methods of this answer except that I moved the caption in the title. This is because I think that the title will make a nice caption, and the reason that you want to have things becoming a caption might be that you want to refer to the sub plots in the main text. If thats wrong, please let me know.



documentclass[12pt, openany]report
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackage[french]babel
usepackageamsmath
%usepackage[showframe]geometry
usepackagecaption,subcaption %for tables andfigures
usepackagepgfplots
usetikzlibrarybabel
usepgfplotslibrarygroupplots
captionsetup[subfigure]
font=footnotesize,bf,
justification=raggedright

pgfplotssetcompat=1.16,
tick label style = font = fontsize6pt12ptselectfont,
label style = font = fontsize8pt12ptselectfont,
legend style = font = fontsize8pt12ptselectfont,
title style = font = fontsize8pt12ptselectfont,
%xlabel style=yshift=-1.2em % if you do not like the newer compats

begindocument
begintikzpicture

definecolorcolor0rgb0.886274509803922,0.290196078431373,0.2
definecolorcolor1rgb0.203921568627451,0.541176470588235,0.741176470588235
definecolorcolor2rgb0.596078431372549,0.556862745098039,0.835294117647059

begingroupplot[group style=group size=2 by 2,vertical
sep=7em,horizontal sep=5.6em,width=0.45textwidth,
title style=text width=6cm]
nextgroupplot[
title=captionofsubfigureTime vs. Temperature.labelsubplot:one,
xlabel=Time[UTC],
ylabel=Temperature [$^circ$C],
xmin=-0.05, xmax=1.01,
ymin=-34.0035, ymax=37.5,
ytick=-30,-15,...,15,30,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!115.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
%legend style=black,
%legend style=draw=white!80.0!black,
legend cell align=left,
legend entries=$T_1$,$T_2$,$T_3$,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
% addplot [semithick, color0]
% table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=captionofsubfigureTime vs. Altitude.labelsubplot:two,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
% addplot [semithick, color0]
% table %
path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
--(axis cs:0,38.6735);

path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
--(axis cs:1,38.6735);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

nextgroupplot[
title=captionofsubfigureTime vs. Altitude.labelsubplot:three,
xlabel=Time [UTC],
ylabel=Altitude [m],
xmin=-0.05, xmax=1.05,
ymin=-1026.692, ymax=24734.252,
ytick=0,5000,10000,15000,20000,25000,
yticklabels=0,5000,10000,15000,20000,25000,
xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
tick align=outside,
xticklabel style = rotate=45,
tick pos=left,
xmajorgrids,
x grid style=lightgray!92.02614379084967!black,
ymajorgrids,
y grid style=lightgray!92.02614379084967!black,
%axis line style=white,
%axis background/.style=fill=white!89.80392156862746!black,
legend style=at=(0.03,0.97), anchor=north west,
legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
legend cell align=left,
scaled y ticks=false,
/pgf/number format/.cd,
1000 sep=,
grid=both,
minor tick num=1
]
addlegendimageno markers, color0
addlegendimageno markers, color1
addlegendimageno markers, color2
addlegendimageno markers, color0
addlegendimageno markers, color1
% addplot [semithick, color0]
% table %data
path [draw=white, fill opacity=0] (axis cs:0,-1026.692)
--(axis cs:0,24734.252);

path [draw=white, fill opacity=0] (axis cs:1,-1026.692)
--(axis cs:1,24734.252);

path [draw=white, fill opacity=0] (axis cs:-0.05,0)
--(axis cs:1.05,0);

path [draw=white, fill opacity=0] (axis cs:-0.05,1)
--(axis cs:1.05,1);

endgroupplot
endtikzpicture
enddocument


enter image description here






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "85"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475764%2fsubcaptions-in-subfigures%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    9














    I copied the code from the answer to your previous question (to have a code that can be compiled). Then I applied the methods of this answer except that I moved the caption in the title. This is because I think that the title will make a nice caption, and the reason that you want to have things becoming a caption might be that you want to refer to the sub plots in the main text. If thats wrong, please let me know.



    documentclass[12pt, openany]report
    usepackage[utf8]inputenc
    usepackage[T1]fontenc
    usepackage[french]babel
    usepackageamsmath
    %usepackage[showframe]geometry
    usepackagecaption,subcaption %for tables andfigures
    usepackagepgfplots
    usetikzlibrarybabel
    usepgfplotslibrarygroupplots
    captionsetup[subfigure]
    font=footnotesize,bf,
    justification=raggedright

    pgfplotssetcompat=1.16,
    tick label style = font = fontsize6pt12ptselectfont,
    label style = font = fontsize8pt12ptselectfont,
    legend style = font = fontsize8pt12ptselectfont,
    title style = font = fontsize8pt12ptselectfont,
    %xlabel style=yshift=-1.2em % if you do not like the newer compats

    begindocument
    begintikzpicture

    definecolorcolor0rgb0.886274509803922,0.290196078431373,0.2
    definecolorcolor1rgb0.203921568627451,0.541176470588235,0.741176470588235
    definecolorcolor2rgb0.596078431372549,0.556862745098039,0.835294117647059

    begingroupplot[group style=group size=2 by 2,vertical
    sep=7em,horizontal sep=5.6em,width=0.45textwidth,
    title style=text width=6cm]
    nextgroupplot[
    title=captionofsubfigureTime vs. Temperature.labelsubplot:one,
    xlabel=Time[UTC],
    ylabel=Temperature [$^circ$C],
    xmin=-0.05, xmax=1.01,
    ymin=-34.0035, ymax=37.5,
    ytick=-30,-15,...,15,30,
    xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
    xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
    tick align=outside,
    xticklabel style = rotate=45,
    tick pos=left,
    xmajorgrids,
    x grid style=lightgray!115.02614379084967!black,
    ymajorgrids,
    y grid style=lightgray!92.02614379084967!black,
    %axis line style=white,
    %axis background/.style=fill=white!89.80392156862746!black,
    %legend style=black,
    %legend style=draw=white!80.0!black,
    legend cell align=left,
    legend entries=$T_1$,$T_2$,$T_3$,
    scaled y ticks=false,
    /pgf/number format/.cd,
    1000 sep=,
    grid=both,
    minor tick num=1
    ]
    addlegendimageno markers, color0
    addlegendimageno markers, color1
    addlegendimageno markers, color2
    % addplot [semithick, color0]
    % table %
    path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
    --(axis cs:0,38.6735);

    path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
    --(axis cs:1,38.6735);

    path [draw=white, fill opacity=0] (axis cs:-0.05,0)
    --(axis cs:1.05,0);

    path [draw=white, fill opacity=0] (axis cs:-0.05,1)
    --(axis cs:1.05,1);

    nextgroupplot[
    title=captionofsubfigureTime vs. Altitude.labelsubplot:two,
    xlabel=Time [UTC],
    ylabel=Altitude [m],
    xmin=-0.05, xmax=1.05,
    ymin=-1026.692, ymax=24734.252,
    ytick=0,5000,10000,15000,20000,25000,
    yticklabels=0,5000,10000,15000,20000,25000,
    xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
    xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
    tick align=outside,
    xticklabel style = rotate=45,
    tick pos=left,
    xmajorgrids,
    x grid style=lightgray!92.02614379084967!black,
    ymajorgrids,
    y grid style=lightgray!92.02614379084967!black,
    %axis line style=white,
    %axis background/.style=fill=white!89.80392156862746!black,
    legend style=at=(0.03,0.97), anchor=north west,
    legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
    legend cell align=left,
    scaled y ticks=false,
    /pgf/number format/.cd,
    1000 sep=,
    grid=both,
    minor tick num=1
    ]
    addlegendimageno markers, color0
    addlegendimageno markers, color1
    addlegendimageno markers, color2
    addlegendimageno markers, color0
    addlegendimageno markers, color1
    % addplot [semithick, color0]
    % table %
    path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
    --(axis cs:0,38.6735);

    path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
    --(axis cs:1,38.6735);

    path [draw=white, fill opacity=0] (axis cs:-0.05,0)
    --(axis cs:1.05,0);

    path [draw=white, fill opacity=0] (axis cs:-0.05,1)
    --(axis cs:1.05,1);

    nextgroupplot[
    title=captionofsubfigureTime vs. Altitude.labelsubplot:three,
    xlabel=Time [UTC],
    ylabel=Altitude [m],
    xmin=-0.05, xmax=1.05,
    ymin=-1026.692, ymax=24734.252,
    ytick=0,5000,10000,15000,20000,25000,
    yticklabels=0,5000,10000,15000,20000,25000,
    xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
    xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
    tick align=outside,
    xticklabel style = rotate=45,
    tick pos=left,
    xmajorgrids,
    x grid style=lightgray!92.02614379084967!black,
    ymajorgrids,
    y grid style=lightgray!92.02614379084967!black,
    %axis line style=white,
    %axis background/.style=fill=white!89.80392156862746!black,
    legend style=at=(0.03,0.97), anchor=north west,
    legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
    legend cell align=left,
    scaled y ticks=false,
    /pgf/number format/.cd,
    1000 sep=,
    grid=both,
    minor tick num=1
    ]
    addlegendimageno markers, color0
    addlegendimageno markers, color1
    addlegendimageno markers, color2
    addlegendimageno markers, color0
    addlegendimageno markers, color1
    % addplot [semithick, color0]
    % table %data
    path [draw=white, fill opacity=0] (axis cs:0,-1026.692)
    --(axis cs:0,24734.252);

    path [draw=white, fill opacity=0] (axis cs:1,-1026.692)
    --(axis cs:1,24734.252);

    path [draw=white, fill opacity=0] (axis cs:-0.05,0)
    --(axis cs:1.05,0);

    path [draw=white, fill opacity=0] (axis cs:-0.05,1)
    --(axis cs:1.05,1);

    endgroupplot
    endtikzpicture
    enddocument


    enter image description here






    share|improve this answer



























      9














      I copied the code from the answer to your previous question (to have a code that can be compiled). Then I applied the methods of this answer except that I moved the caption in the title. This is because I think that the title will make a nice caption, and the reason that you want to have things becoming a caption might be that you want to refer to the sub plots in the main text. If thats wrong, please let me know.



      documentclass[12pt, openany]report
      usepackage[utf8]inputenc
      usepackage[T1]fontenc
      usepackage[french]babel
      usepackageamsmath
      %usepackage[showframe]geometry
      usepackagecaption,subcaption %for tables andfigures
      usepackagepgfplots
      usetikzlibrarybabel
      usepgfplotslibrarygroupplots
      captionsetup[subfigure]
      font=footnotesize,bf,
      justification=raggedright

      pgfplotssetcompat=1.16,
      tick label style = font = fontsize6pt12ptselectfont,
      label style = font = fontsize8pt12ptselectfont,
      legend style = font = fontsize8pt12ptselectfont,
      title style = font = fontsize8pt12ptselectfont,
      %xlabel style=yshift=-1.2em % if you do not like the newer compats

      begindocument
      begintikzpicture

      definecolorcolor0rgb0.886274509803922,0.290196078431373,0.2
      definecolorcolor1rgb0.203921568627451,0.541176470588235,0.741176470588235
      definecolorcolor2rgb0.596078431372549,0.556862745098039,0.835294117647059

      begingroupplot[group style=group size=2 by 2,vertical
      sep=7em,horizontal sep=5.6em,width=0.45textwidth,
      title style=text width=6cm]
      nextgroupplot[
      title=captionofsubfigureTime vs. Temperature.labelsubplot:one,
      xlabel=Time[UTC],
      ylabel=Temperature [$^circ$C],
      xmin=-0.05, xmax=1.01,
      ymin=-34.0035, ymax=37.5,
      ytick=-30,-15,...,15,30,
      xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
      xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
      tick align=outside,
      xticklabel style = rotate=45,
      tick pos=left,
      xmajorgrids,
      x grid style=lightgray!115.02614379084967!black,
      ymajorgrids,
      y grid style=lightgray!92.02614379084967!black,
      %axis line style=white,
      %axis background/.style=fill=white!89.80392156862746!black,
      %legend style=black,
      %legend style=draw=white!80.0!black,
      legend cell align=left,
      legend entries=$T_1$,$T_2$,$T_3$,
      scaled y ticks=false,
      /pgf/number format/.cd,
      1000 sep=,
      grid=both,
      minor tick num=1
      ]
      addlegendimageno markers, color0
      addlegendimageno markers, color1
      addlegendimageno markers, color2
      % addplot [semithick, color0]
      % table %
      path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
      --(axis cs:0,38.6735);

      path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
      --(axis cs:1,38.6735);

      path [draw=white, fill opacity=0] (axis cs:-0.05,0)
      --(axis cs:1.05,0);

      path [draw=white, fill opacity=0] (axis cs:-0.05,1)
      --(axis cs:1.05,1);

      nextgroupplot[
      title=captionofsubfigureTime vs. Altitude.labelsubplot:two,
      xlabel=Time [UTC],
      ylabel=Altitude [m],
      xmin=-0.05, xmax=1.05,
      ymin=-1026.692, ymax=24734.252,
      ytick=0,5000,10000,15000,20000,25000,
      yticklabels=0,5000,10000,15000,20000,25000,
      xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
      xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
      tick align=outside,
      xticklabel style = rotate=45,
      tick pos=left,
      xmajorgrids,
      x grid style=lightgray!92.02614379084967!black,
      ymajorgrids,
      y grid style=lightgray!92.02614379084967!black,
      %axis line style=white,
      %axis background/.style=fill=white!89.80392156862746!black,
      legend style=at=(0.03,0.97), anchor=north west,
      legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
      legend cell align=left,
      scaled y ticks=false,
      /pgf/number format/.cd,
      1000 sep=,
      grid=both,
      minor tick num=1
      ]
      addlegendimageno markers, color0
      addlegendimageno markers, color1
      addlegendimageno markers, color2
      addlegendimageno markers, color0
      addlegendimageno markers, color1
      % addplot [semithick, color0]
      % table %
      path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
      --(axis cs:0,38.6735);

      path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
      --(axis cs:1,38.6735);

      path [draw=white, fill opacity=0] (axis cs:-0.05,0)
      --(axis cs:1.05,0);

      path [draw=white, fill opacity=0] (axis cs:-0.05,1)
      --(axis cs:1.05,1);

      nextgroupplot[
      title=captionofsubfigureTime vs. Altitude.labelsubplot:three,
      xlabel=Time [UTC],
      ylabel=Altitude [m],
      xmin=-0.05, xmax=1.05,
      ymin=-1026.692, ymax=24734.252,
      ytick=0,5000,10000,15000,20000,25000,
      yticklabels=0,5000,10000,15000,20000,25000,
      xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
      xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
      tick align=outside,
      xticklabel style = rotate=45,
      tick pos=left,
      xmajorgrids,
      x grid style=lightgray!92.02614379084967!black,
      ymajorgrids,
      y grid style=lightgray!92.02614379084967!black,
      %axis line style=white,
      %axis background/.style=fill=white!89.80392156862746!black,
      legend style=at=(0.03,0.97), anchor=north west,
      legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
      legend cell align=left,
      scaled y ticks=false,
      /pgf/number format/.cd,
      1000 sep=,
      grid=both,
      minor tick num=1
      ]
      addlegendimageno markers, color0
      addlegendimageno markers, color1
      addlegendimageno markers, color2
      addlegendimageno markers, color0
      addlegendimageno markers, color1
      % addplot [semithick, color0]
      % table %data
      path [draw=white, fill opacity=0] (axis cs:0,-1026.692)
      --(axis cs:0,24734.252);

      path [draw=white, fill opacity=0] (axis cs:1,-1026.692)
      --(axis cs:1,24734.252);

      path [draw=white, fill opacity=0] (axis cs:-0.05,0)
      --(axis cs:1.05,0);

      path [draw=white, fill opacity=0] (axis cs:-0.05,1)
      --(axis cs:1.05,1);

      endgroupplot
      endtikzpicture
      enddocument


      enter image description here






      share|improve this answer

























        9












        9








        9







        I copied the code from the answer to your previous question (to have a code that can be compiled). Then I applied the methods of this answer except that I moved the caption in the title. This is because I think that the title will make a nice caption, and the reason that you want to have things becoming a caption might be that you want to refer to the sub plots in the main text. If thats wrong, please let me know.



        documentclass[12pt, openany]report
        usepackage[utf8]inputenc
        usepackage[T1]fontenc
        usepackage[french]babel
        usepackageamsmath
        %usepackage[showframe]geometry
        usepackagecaption,subcaption %for tables andfigures
        usepackagepgfplots
        usetikzlibrarybabel
        usepgfplotslibrarygroupplots
        captionsetup[subfigure]
        font=footnotesize,bf,
        justification=raggedright

        pgfplotssetcompat=1.16,
        tick label style = font = fontsize6pt12ptselectfont,
        label style = font = fontsize8pt12ptselectfont,
        legend style = font = fontsize8pt12ptselectfont,
        title style = font = fontsize8pt12ptselectfont,
        %xlabel style=yshift=-1.2em % if you do not like the newer compats

        begindocument
        begintikzpicture

        definecolorcolor0rgb0.886274509803922,0.290196078431373,0.2
        definecolorcolor1rgb0.203921568627451,0.541176470588235,0.741176470588235
        definecolorcolor2rgb0.596078431372549,0.556862745098039,0.835294117647059

        begingroupplot[group style=group size=2 by 2,vertical
        sep=7em,horizontal sep=5.6em,width=0.45textwidth,
        title style=text width=6cm]
        nextgroupplot[
        title=captionofsubfigureTime vs. Temperature.labelsubplot:one,
        xlabel=Time[UTC],
        ylabel=Temperature [$^circ$C],
        xmin=-0.05, xmax=1.01,
        ymin=-34.0035, ymax=37.5,
        ytick=-30,-15,...,15,30,
        xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
        xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
        tick align=outside,
        xticklabel style = rotate=45,
        tick pos=left,
        xmajorgrids,
        x grid style=lightgray!115.02614379084967!black,
        ymajorgrids,
        y grid style=lightgray!92.02614379084967!black,
        %axis line style=white,
        %axis background/.style=fill=white!89.80392156862746!black,
        %legend style=black,
        %legend style=draw=white!80.0!black,
        legend cell align=left,
        legend entries=$T_1$,$T_2$,$T_3$,
        scaled y ticks=false,
        /pgf/number format/.cd,
        1000 sep=,
        grid=both,
        minor tick num=1
        ]
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        addlegendimageno markers, color2
        % addplot [semithick, color0]
        % table %
        path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
        --(axis cs:0,38.6735);

        path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
        --(axis cs:1,38.6735);

        path [draw=white, fill opacity=0] (axis cs:-0.05,0)
        --(axis cs:1.05,0);

        path [draw=white, fill opacity=0] (axis cs:-0.05,1)
        --(axis cs:1.05,1);

        nextgroupplot[
        title=captionofsubfigureTime vs. Altitude.labelsubplot:two,
        xlabel=Time [UTC],
        ylabel=Altitude [m],
        xmin=-0.05, xmax=1.05,
        ymin=-1026.692, ymax=24734.252,
        ytick=0,5000,10000,15000,20000,25000,
        yticklabels=0,5000,10000,15000,20000,25000,
        xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
        xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
        tick align=outside,
        xticklabel style = rotate=45,
        tick pos=left,
        xmajorgrids,
        x grid style=lightgray!92.02614379084967!black,
        ymajorgrids,
        y grid style=lightgray!92.02614379084967!black,
        %axis line style=white,
        %axis background/.style=fill=white!89.80392156862746!black,
        legend style=at=(0.03,0.97), anchor=north west,
        legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
        legend cell align=left,
        scaled y ticks=false,
        /pgf/number format/.cd,
        1000 sep=,
        grid=both,
        minor tick num=1
        ]
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        addlegendimageno markers, color2
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        % addplot [semithick, color0]
        % table %
        path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
        --(axis cs:0,38.6735);

        path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
        --(axis cs:1,38.6735);

        path [draw=white, fill opacity=0] (axis cs:-0.05,0)
        --(axis cs:1.05,0);

        path [draw=white, fill opacity=0] (axis cs:-0.05,1)
        --(axis cs:1.05,1);

        nextgroupplot[
        title=captionofsubfigureTime vs. Altitude.labelsubplot:three,
        xlabel=Time [UTC],
        ylabel=Altitude [m],
        xmin=-0.05, xmax=1.05,
        ymin=-1026.692, ymax=24734.252,
        ytick=0,5000,10000,15000,20000,25000,
        yticklabels=0,5000,10000,15000,20000,25000,
        xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
        xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
        tick align=outside,
        xticklabel style = rotate=45,
        tick pos=left,
        xmajorgrids,
        x grid style=lightgray!92.02614379084967!black,
        ymajorgrids,
        y grid style=lightgray!92.02614379084967!black,
        %axis line style=white,
        %axis background/.style=fill=white!89.80392156862746!black,
        legend style=at=(0.03,0.97), anchor=north west,
        legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
        legend cell align=left,
        scaled y ticks=false,
        /pgf/number format/.cd,
        1000 sep=,
        grid=both,
        minor tick num=1
        ]
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        addlegendimageno markers, color2
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        % addplot [semithick, color0]
        % table %data
        path [draw=white, fill opacity=0] (axis cs:0,-1026.692)
        --(axis cs:0,24734.252);

        path [draw=white, fill opacity=0] (axis cs:1,-1026.692)
        --(axis cs:1,24734.252);

        path [draw=white, fill opacity=0] (axis cs:-0.05,0)
        --(axis cs:1.05,0);

        path [draw=white, fill opacity=0] (axis cs:-0.05,1)
        --(axis cs:1.05,1);

        endgroupplot
        endtikzpicture
        enddocument


        enter image description here






        share|improve this answer













        I copied the code from the answer to your previous question (to have a code that can be compiled). Then I applied the methods of this answer except that I moved the caption in the title. This is because I think that the title will make a nice caption, and the reason that you want to have things becoming a caption might be that you want to refer to the sub plots in the main text. If thats wrong, please let me know.



        documentclass[12pt, openany]report
        usepackage[utf8]inputenc
        usepackage[T1]fontenc
        usepackage[french]babel
        usepackageamsmath
        %usepackage[showframe]geometry
        usepackagecaption,subcaption %for tables andfigures
        usepackagepgfplots
        usetikzlibrarybabel
        usepgfplotslibrarygroupplots
        captionsetup[subfigure]
        font=footnotesize,bf,
        justification=raggedright

        pgfplotssetcompat=1.16,
        tick label style = font = fontsize6pt12ptselectfont,
        label style = font = fontsize8pt12ptselectfont,
        legend style = font = fontsize8pt12ptselectfont,
        title style = font = fontsize8pt12ptselectfont,
        %xlabel style=yshift=-1.2em % if you do not like the newer compats

        begindocument
        begintikzpicture

        definecolorcolor0rgb0.886274509803922,0.290196078431373,0.2
        definecolorcolor1rgb0.203921568627451,0.541176470588235,0.741176470588235
        definecolorcolor2rgb0.596078431372549,0.556862745098039,0.835294117647059

        begingroupplot[group style=group size=2 by 2,vertical
        sep=7em,horizontal sep=5.6em,width=0.45textwidth,
        title style=text width=6cm]
        nextgroupplot[
        title=captionofsubfigureTime vs. Temperature.labelsubplot:one,
        xlabel=Time[UTC],
        ylabel=Temperature [$^circ$C],
        xmin=-0.05, xmax=1.01,
        ymin=-34.0035, ymax=37.5,
        ytick=-30,-15,...,15,30,
        xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
        xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
        tick align=outside,
        xticklabel style = rotate=45,
        tick pos=left,
        xmajorgrids,
        x grid style=lightgray!115.02614379084967!black,
        ymajorgrids,
        y grid style=lightgray!92.02614379084967!black,
        %axis line style=white,
        %axis background/.style=fill=white!89.80392156862746!black,
        %legend style=black,
        %legend style=draw=white!80.0!black,
        legend cell align=left,
        legend entries=$T_1$,$T_2$,$T_3$,
        scaled y ticks=false,
        /pgf/number format/.cd,
        1000 sep=,
        grid=both,
        minor tick num=1
        ]
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        addlegendimageno markers, color2
        % addplot [semithick, color0]
        % table %
        path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
        --(axis cs:0,38.6735);

        path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
        --(axis cs:1,38.6735);

        path [draw=white, fill opacity=0] (axis cs:-0.05,0)
        --(axis cs:1.05,0);

        path [draw=white, fill opacity=0] (axis cs:-0.05,1)
        --(axis cs:1.05,1);

        nextgroupplot[
        title=captionofsubfigureTime vs. Altitude.labelsubplot:two,
        xlabel=Time [UTC],
        ylabel=Altitude [m],
        xmin=-0.05, xmax=1.05,
        ymin=-1026.692, ymax=24734.252,
        ytick=0,5000,10000,15000,20000,25000,
        yticklabels=0,5000,10000,15000,20000,25000,
        xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
        xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
        tick align=outside,
        xticklabel style = rotate=45,
        tick pos=left,
        xmajorgrids,
        x grid style=lightgray!92.02614379084967!black,
        ymajorgrids,
        y grid style=lightgray!92.02614379084967!black,
        %axis line style=white,
        %axis background/.style=fill=white!89.80392156862746!black,
        legend style=at=(0.03,0.97), anchor=north west,
        legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
        legend cell align=left,
        scaled y ticks=false,
        /pgf/number format/.cd,
        1000 sep=,
        grid=both,
        minor tick num=1
        ]
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        addlegendimageno markers, color2
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        % addplot [semithick, color0]
        % table %
        path [draw=white, fill opacity=0] (axis cs:0,-34.0035)
        --(axis cs:0,38.6735);

        path [draw=white, fill opacity=0] (axis cs:1,-34.0035)
        --(axis cs:1,38.6735);

        path [draw=white, fill opacity=0] (axis cs:-0.05,0)
        --(axis cs:1.05,0);

        path [draw=white, fill opacity=0] (axis cs:-0.05,1)
        --(axis cs:1.05,1);

        nextgroupplot[
        title=captionofsubfigureTime vs. Altitude.labelsubplot:three,
        xlabel=Time [UTC],
        ylabel=Altitude [m],
        xmin=-0.05, xmax=1.05,
        ymin=-1026.692, ymax=24734.252,
        ytick=0,5000,10000,15000,20000,25000,
        yticklabels=0,5000,10000,15000,20000,25000,
        xtick=-0.2,0,0.2,0.4,0.6,0.8,1,1.2,
        xticklabels=12:05:05,12:15:39,12:26:12,12:36:45,12:47:18,12:57:51,13:08:25,13:18:58,
        tick align=outside,
        xticklabel style = rotate=45,
        tick pos=left,
        xmajorgrids,
        x grid style=lightgray!92.02614379084967!black,
        ymajorgrids,
        y grid style=lightgray!92.02614379084967!black,
        %axis line style=white,
        %axis background/.style=fill=white!89.80392156862746!black,
        legend style=at=(0.03,0.97), anchor=north west,
        legend entries=GPS $[A_1]$,BMP180 $[A_2]$,
        legend cell align=left,
        scaled y ticks=false,
        /pgf/number format/.cd,
        1000 sep=,
        grid=both,
        minor tick num=1
        ]
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        addlegendimageno markers, color2
        addlegendimageno markers, color0
        addlegendimageno markers, color1
        % addplot [semithick, color0]
        % table %data
        path [draw=white, fill opacity=0] (axis cs:0,-1026.692)
        --(axis cs:0,24734.252);

        path [draw=white, fill opacity=0] (axis cs:1,-1026.692)
        --(axis cs:1,24734.252);

        path [draw=white, fill opacity=0] (axis cs:-0.05,0)
        --(axis cs:1.05,0);

        path [draw=white, fill opacity=0] (axis cs:-0.05,1)
        --(axis cs:1.05,1);

        endgroupplot
        endtikzpicture
        enddocument


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 20 at 4:20









        marmotmarmot

        109k5133252




        109k5133252



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475764%2fsubcaptions-in-subfigures%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay