vertical space is different between subfigures
I'm trying to add groups of subfigures like below, and LaTex is following.
However, the second captions starts little below than others.
How can I fix it?
documentclass[twocolumn]{article}
usepackage[demo]{graphicx}
usepackage{subcaption}
begin{document}
begin{figure*}
centering
captionsetup[subfigure]{labelformat=empty}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Easy} [no duplicate]\
scriptsize
blah1\
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Middle} [two duplicate]\
scriptsize
blah2\
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Hard} [three duplicate]\
scriptsize
blah3
end{subfigure}
caption{sample1}
label{fig:3}
end{figure*}
end{document}

graphics subcaption
add a comment |
I'm trying to add groups of subfigures like below, and LaTex is following.
However, the second captions starts little below than others.
How can I fix it?
documentclass[twocolumn]{article}
usepackage[demo]{graphicx}
usepackage{subcaption}
begin{document}
begin{figure*}
centering
captionsetup[subfigure]{labelformat=empty}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Easy} [no duplicate]\
scriptsize
blah1\
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Middle} [two duplicate]\
scriptsize
blah2\
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Hard} [three duplicate]\
scriptsize
blah3
end{subfigure}
caption{sample1}
label{fig:3}
end{figure*}
end{document}

graphics subcaption
2
Welcome to TeX.SE! Please make your code snippet compilable!
– Kurt
Dec 15 at 9:07
1
I've taken the liberty of making your code minimally compilable.
– Mico
Dec 15 at 10:03
add a comment |
I'm trying to add groups of subfigures like below, and LaTex is following.
However, the second captions starts little below than others.
How can I fix it?
documentclass[twocolumn]{article}
usepackage[demo]{graphicx}
usepackage{subcaption}
begin{document}
begin{figure*}
centering
captionsetup[subfigure]{labelformat=empty}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Easy} [no duplicate]\
scriptsize
blah1\
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Middle} [two duplicate]\
scriptsize
blah2\
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Hard} [three duplicate]\
scriptsize
blah3
end{subfigure}
caption{sample1}
label{fig:3}
end{figure*}
end{document}

graphics subcaption
I'm trying to add groups of subfigures like below, and LaTex is following.
However, the second captions starts little below than others.
How can I fix it?
documentclass[twocolumn]{article}
usepackage[demo]{graphicx}
usepackage{subcaption}
begin{document}
begin{figure*}
centering
captionsetup[subfigure]{labelformat=empty}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_1.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_2.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/a_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/b_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_3.png}
end{subfigure}
begin{subfigure}[b]{.16linewidth}
includegraphics[width=linewidth]{figure/c_4.png}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Easy} [no duplicate]\
scriptsize
blah1\
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Middle} [two duplicate]\
scriptsize
blah2\
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
small textbf{Hard} [three duplicate]\
scriptsize
blah3
end{subfigure}
caption{sample1}
label{fig:3}
end{figure*}
end{document}

graphics subcaption
graphics subcaption
edited Dec 15 at 10:12
Mico
273k30369756
273k30369756
asked Dec 15 at 9:04
Mark Yoon
83
83
2
Welcome to TeX.SE! Please make your code snippet compilable!
– Kurt
Dec 15 at 9:07
1
I've taken the liberty of making your code minimally compilable.
– Mico
Dec 15 at 10:03
add a comment |
2
Welcome to TeX.SE! Please make your code snippet compilable!
– Kurt
Dec 15 at 9:07
1
I've taken the liberty of making your code minimally compilable.
– Mico
Dec 15 at 10:03
2
2
Welcome to TeX.SE! Please make your code snippet compilable!
– Kurt
Dec 15 at 9:07
Welcome to TeX.SE! Please make your code snippet compilable!
– Kurt
Dec 15 at 9:07
1
1
I've taken the liberty of making your code minimally compilable.
– Mico
Dec 15 at 10:03
I've taken the liberty of making your code minimally compilable.
– Mico
Dec 15 at 10:03
add a comment |
2 Answers
2
active
oldest
votes
For a quick fix of the issue you've encountered, you could change the final 3 instances of begin{subfigure}[b] to begin{subfigure}[t]. Better still, just omit the \ (double backslash) directives after blah1 and blah2: They're not needed, and they're messing up the vertical positioning of these subfigure enviroments.
That said, you may want to rethink your entire approach to using subfigure environments. Since you're not using caption directives with any of the 12+3= 15 subfigure environments, you could -- actually, should! -- replace all subfigure environments with minipage environments. In case you didn't know: a subfigure environment is nothing but a minipage environment that's been told what to do if it encounters a caption directive. Since there are no such caption directives, why incur the overhead?
Next, why even employ minipage environments to encase the 12 image files? It seems pointless to do so, as includegraphics lets you state the (relative) dimensions of the images directly.
Finally, since you have 12 includegraphics statements, it's a good idea to create a shortcut macro to automate the sizing of the images.

documentclass[twocolumn]{article}
usepackage[demo]{graphicx} % omit 'demo' option in real doc.
%% Handy shortcut macro:
newcommandinc[1]{includegraphics%
[width=0.15linewidth,height=0.15linewidth]{#1}}
begin{document}
begin{figure*}
%% First row of images:
inc{figure/a_1.png}hspace{0.005linewidth}
inc{figure/a_2.png}hspace{fill}
inc{figure/b_1.png}hspace{0.005linewidth}
inc{figure/b_2.png}hspace{fill}
inc{figure/c_1.png}hspace{0.005linewidth}
inc{figure/c_2.png}
smallskip
%% Second row of images:
inc{figure/a_3.png}hspace{0.005linewidth}
inc{figure/a_4.png}hspace{fill}
inc{figure/b_3.png}hspace{0.005linewidth}
inc{figure/b_4.png}hspace{fill}
inc{figure/c_3.png}hspace{0.005linewidth}
inc{figure/c_4.png}
smallskip
% Row of captions
begin{minipage}{.305linewidth} % 0.305=2*0.15+0.005
smalltextbf{Easy} [no duplicate]
scriptsize blah1
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Middle} [two duplicate]
scriptsize blah2
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Hard} [three duplicate]
scriptsize blah3
end{minipage}
caption{sample1}
label{fig:3}
end{figure*}
end{document}
add a comment |
i would use captions in subfigure environments and in one subfigure merge four your images:
documentclass[twocolumn]{article}
usepackage[demo]{graphicx}
usepackage{caption}
usepackage{subcaption}
begin{document}
begin{figure*}
captionsetup[subfigure]{labelformat=empty}
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/a_1.png}
includegraphics[width=0.48linewidth]{figure/a_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/a_3.png}
includegraphics[width=0.48linewidth]{figure/a_4.png}
caption{textbf{Easy} [no duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/b_1.png}
includegraphics[width=0.48linewidth]{figure/b_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/b_3.png}
includegraphics[width=0.48linewidth]{figure/b_4.png}
caption{textbf{Middle} [two duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/c_1.png}
includegraphics[width=0.48linewidth]{figure/c_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/c_3.png}
includegraphics[width=0.48linewidth]{figure/c_4.png}
caption{textbf{Hard} [three duplicate]newlinescriptsize
blah1}
end{subfigure}
caption{sample1}
label{fig:3}
end{figure*}
end{document}

@Mico, you are right. corrected! thank you very much!
– Zarko
Dec 15 at 13:48
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464948%2fvertical-space-is-different-between-subfigures%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
For a quick fix of the issue you've encountered, you could change the final 3 instances of begin{subfigure}[b] to begin{subfigure}[t]. Better still, just omit the \ (double backslash) directives after blah1 and blah2: They're not needed, and they're messing up the vertical positioning of these subfigure enviroments.
That said, you may want to rethink your entire approach to using subfigure environments. Since you're not using caption directives with any of the 12+3= 15 subfigure environments, you could -- actually, should! -- replace all subfigure environments with minipage environments. In case you didn't know: a subfigure environment is nothing but a minipage environment that's been told what to do if it encounters a caption directive. Since there are no such caption directives, why incur the overhead?
Next, why even employ minipage environments to encase the 12 image files? It seems pointless to do so, as includegraphics lets you state the (relative) dimensions of the images directly.
Finally, since you have 12 includegraphics statements, it's a good idea to create a shortcut macro to automate the sizing of the images.

documentclass[twocolumn]{article}
usepackage[demo]{graphicx} % omit 'demo' option in real doc.
%% Handy shortcut macro:
newcommandinc[1]{includegraphics%
[width=0.15linewidth,height=0.15linewidth]{#1}}
begin{document}
begin{figure*}
%% First row of images:
inc{figure/a_1.png}hspace{0.005linewidth}
inc{figure/a_2.png}hspace{fill}
inc{figure/b_1.png}hspace{0.005linewidth}
inc{figure/b_2.png}hspace{fill}
inc{figure/c_1.png}hspace{0.005linewidth}
inc{figure/c_2.png}
smallskip
%% Second row of images:
inc{figure/a_3.png}hspace{0.005linewidth}
inc{figure/a_4.png}hspace{fill}
inc{figure/b_3.png}hspace{0.005linewidth}
inc{figure/b_4.png}hspace{fill}
inc{figure/c_3.png}hspace{0.005linewidth}
inc{figure/c_4.png}
smallskip
% Row of captions
begin{minipage}{.305linewidth} % 0.305=2*0.15+0.005
smalltextbf{Easy} [no duplicate]
scriptsize blah1
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Middle} [two duplicate]
scriptsize blah2
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Hard} [three duplicate]
scriptsize blah3
end{minipage}
caption{sample1}
label{fig:3}
end{figure*}
end{document}
add a comment |
For a quick fix of the issue you've encountered, you could change the final 3 instances of begin{subfigure}[b] to begin{subfigure}[t]. Better still, just omit the \ (double backslash) directives after blah1 and blah2: They're not needed, and they're messing up the vertical positioning of these subfigure enviroments.
That said, you may want to rethink your entire approach to using subfigure environments. Since you're not using caption directives with any of the 12+3= 15 subfigure environments, you could -- actually, should! -- replace all subfigure environments with minipage environments. In case you didn't know: a subfigure environment is nothing but a minipage environment that's been told what to do if it encounters a caption directive. Since there are no such caption directives, why incur the overhead?
Next, why even employ minipage environments to encase the 12 image files? It seems pointless to do so, as includegraphics lets you state the (relative) dimensions of the images directly.
Finally, since you have 12 includegraphics statements, it's a good idea to create a shortcut macro to automate the sizing of the images.

documentclass[twocolumn]{article}
usepackage[demo]{graphicx} % omit 'demo' option in real doc.
%% Handy shortcut macro:
newcommandinc[1]{includegraphics%
[width=0.15linewidth,height=0.15linewidth]{#1}}
begin{document}
begin{figure*}
%% First row of images:
inc{figure/a_1.png}hspace{0.005linewidth}
inc{figure/a_2.png}hspace{fill}
inc{figure/b_1.png}hspace{0.005linewidth}
inc{figure/b_2.png}hspace{fill}
inc{figure/c_1.png}hspace{0.005linewidth}
inc{figure/c_2.png}
smallskip
%% Second row of images:
inc{figure/a_3.png}hspace{0.005linewidth}
inc{figure/a_4.png}hspace{fill}
inc{figure/b_3.png}hspace{0.005linewidth}
inc{figure/b_4.png}hspace{fill}
inc{figure/c_3.png}hspace{0.005linewidth}
inc{figure/c_4.png}
smallskip
% Row of captions
begin{minipage}{.305linewidth} % 0.305=2*0.15+0.005
smalltextbf{Easy} [no duplicate]
scriptsize blah1
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Middle} [two duplicate]
scriptsize blah2
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Hard} [three duplicate]
scriptsize blah3
end{minipage}
caption{sample1}
label{fig:3}
end{figure*}
end{document}
add a comment |
For a quick fix of the issue you've encountered, you could change the final 3 instances of begin{subfigure}[b] to begin{subfigure}[t]. Better still, just omit the \ (double backslash) directives after blah1 and blah2: They're not needed, and they're messing up the vertical positioning of these subfigure enviroments.
That said, you may want to rethink your entire approach to using subfigure environments. Since you're not using caption directives with any of the 12+3= 15 subfigure environments, you could -- actually, should! -- replace all subfigure environments with minipage environments. In case you didn't know: a subfigure environment is nothing but a minipage environment that's been told what to do if it encounters a caption directive. Since there are no such caption directives, why incur the overhead?
Next, why even employ minipage environments to encase the 12 image files? It seems pointless to do so, as includegraphics lets you state the (relative) dimensions of the images directly.
Finally, since you have 12 includegraphics statements, it's a good idea to create a shortcut macro to automate the sizing of the images.

documentclass[twocolumn]{article}
usepackage[demo]{graphicx} % omit 'demo' option in real doc.
%% Handy shortcut macro:
newcommandinc[1]{includegraphics%
[width=0.15linewidth,height=0.15linewidth]{#1}}
begin{document}
begin{figure*}
%% First row of images:
inc{figure/a_1.png}hspace{0.005linewidth}
inc{figure/a_2.png}hspace{fill}
inc{figure/b_1.png}hspace{0.005linewidth}
inc{figure/b_2.png}hspace{fill}
inc{figure/c_1.png}hspace{0.005linewidth}
inc{figure/c_2.png}
smallskip
%% Second row of images:
inc{figure/a_3.png}hspace{0.005linewidth}
inc{figure/a_4.png}hspace{fill}
inc{figure/b_3.png}hspace{0.005linewidth}
inc{figure/b_4.png}hspace{fill}
inc{figure/c_3.png}hspace{0.005linewidth}
inc{figure/c_4.png}
smallskip
% Row of captions
begin{minipage}{.305linewidth} % 0.305=2*0.15+0.005
smalltextbf{Easy} [no duplicate]
scriptsize blah1
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Middle} [two duplicate]
scriptsize blah2
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Hard} [three duplicate]
scriptsize blah3
end{minipage}
caption{sample1}
label{fig:3}
end{figure*}
end{document}
For a quick fix of the issue you've encountered, you could change the final 3 instances of begin{subfigure}[b] to begin{subfigure}[t]. Better still, just omit the \ (double backslash) directives after blah1 and blah2: They're not needed, and they're messing up the vertical positioning of these subfigure enviroments.
That said, you may want to rethink your entire approach to using subfigure environments. Since you're not using caption directives with any of the 12+3= 15 subfigure environments, you could -- actually, should! -- replace all subfigure environments with minipage environments. In case you didn't know: a subfigure environment is nothing but a minipage environment that's been told what to do if it encounters a caption directive. Since there are no such caption directives, why incur the overhead?
Next, why even employ minipage environments to encase the 12 image files? It seems pointless to do so, as includegraphics lets you state the (relative) dimensions of the images directly.
Finally, since you have 12 includegraphics statements, it's a good idea to create a shortcut macro to automate the sizing of the images.

documentclass[twocolumn]{article}
usepackage[demo]{graphicx} % omit 'demo' option in real doc.
%% Handy shortcut macro:
newcommandinc[1]{includegraphics%
[width=0.15linewidth,height=0.15linewidth]{#1}}
begin{document}
begin{figure*}
%% First row of images:
inc{figure/a_1.png}hspace{0.005linewidth}
inc{figure/a_2.png}hspace{fill}
inc{figure/b_1.png}hspace{0.005linewidth}
inc{figure/b_2.png}hspace{fill}
inc{figure/c_1.png}hspace{0.005linewidth}
inc{figure/c_2.png}
smallskip
%% Second row of images:
inc{figure/a_3.png}hspace{0.005linewidth}
inc{figure/a_4.png}hspace{fill}
inc{figure/b_3.png}hspace{0.005linewidth}
inc{figure/b_4.png}hspace{fill}
inc{figure/c_3.png}hspace{0.005linewidth}
inc{figure/c_4.png}
smallskip
% Row of captions
begin{minipage}{.305linewidth} % 0.305=2*0.15+0.005
smalltextbf{Easy} [no duplicate]
scriptsize blah1
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Middle} [two duplicate]
scriptsize blah2
end{minipage}%
hspace{fill}
begin{minipage}{.305linewidth}
smalltextbf{Hard} [three duplicate]
scriptsize blah3
end{minipage}
caption{sample1}
label{fig:3}
end{figure*}
end{document}
edited Dec 15 at 11:09
answered Dec 15 at 10:17
Mico
273k30369756
273k30369756
add a comment |
add a comment |
i would use captions in subfigure environments and in one subfigure merge four your images:
documentclass[twocolumn]{article}
usepackage[demo]{graphicx}
usepackage{caption}
usepackage{subcaption}
begin{document}
begin{figure*}
captionsetup[subfigure]{labelformat=empty}
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/a_1.png}
includegraphics[width=0.48linewidth]{figure/a_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/a_3.png}
includegraphics[width=0.48linewidth]{figure/a_4.png}
caption{textbf{Easy} [no duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/b_1.png}
includegraphics[width=0.48linewidth]{figure/b_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/b_3.png}
includegraphics[width=0.48linewidth]{figure/b_4.png}
caption{textbf{Middle} [two duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/c_1.png}
includegraphics[width=0.48linewidth]{figure/c_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/c_3.png}
includegraphics[width=0.48linewidth]{figure/c_4.png}
caption{textbf{Hard} [three duplicate]newlinescriptsize
blah1}
end{subfigure}
caption{sample1}
label{fig:3}
end{figure*}
end{document}

@Mico, you are right. corrected! thank you very much!
– Zarko
Dec 15 at 13:48
add a comment |
i would use captions in subfigure environments and in one subfigure merge four your images:
documentclass[twocolumn]{article}
usepackage[demo]{graphicx}
usepackage{caption}
usepackage{subcaption}
begin{document}
begin{figure*}
captionsetup[subfigure]{labelformat=empty}
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/a_1.png}
includegraphics[width=0.48linewidth]{figure/a_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/a_3.png}
includegraphics[width=0.48linewidth]{figure/a_4.png}
caption{textbf{Easy} [no duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/b_1.png}
includegraphics[width=0.48linewidth]{figure/b_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/b_3.png}
includegraphics[width=0.48linewidth]{figure/b_4.png}
caption{textbf{Middle} [two duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/c_1.png}
includegraphics[width=0.48linewidth]{figure/c_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/c_3.png}
includegraphics[width=0.48linewidth]{figure/c_4.png}
caption{textbf{Hard} [three duplicate]newlinescriptsize
blah1}
end{subfigure}
caption{sample1}
label{fig:3}
end{figure*}
end{document}

@Mico, you are right. corrected! thank you very much!
– Zarko
Dec 15 at 13:48
add a comment |
i would use captions in subfigure environments and in one subfigure merge four your images:
documentclass[twocolumn]{article}
usepackage[demo]{graphicx}
usepackage{caption}
usepackage{subcaption}
begin{document}
begin{figure*}
captionsetup[subfigure]{labelformat=empty}
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/a_1.png}
includegraphics[width=0.48linewidth]{figure/a_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/a_3.png}
includegraphics[width=0.48linewidth]{figure/a_4.png}
caption{textbf{Easy} [no duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/b_1.png}
includegraphics[width=0.48linewidth]{figure/b_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/b_3.png}
includegraphics[width=0.48linewidth]{figure/b_4.png}
caption{textbf{Middle} [two duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/c_1.png}
includegraphics[width=0.48linewidth]{figure/c_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/c_3.png}
includegraphics[width=0.48linewidth]{figure/c_4.png}
caption{textbf{Hard} [three duplicate]newlinescriptsize
blah1}
end{subfigure}
caption{sample1}
label{fig:3}
end{figure*}
end{document}

i would use captions in subfigure environments and in one subfigure merge four your images:
documentclass[twocolumn]{article}
usepackage[demo]{graphicx}
usepackage{caption}
usepackage{subcaption}
begin{document}
begin{figure*}
captionsetup[subfigure]{labelformat=empty}
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/a_1.png}
includegraphics[width=0.48linewidth]{figure/a_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/a_3.png}
includegraphics[width=0.48linewidth]{figure/a_4.png}
caption{textbf{Easy} [no duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/b_1.png}
includegraphics[width=0.48linewidth]{figure/b_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/b_3.png}
includegraphics[width=0.48linewidth]{figure/b_4.png}
caption{textbf{Middle} [two duplicate]newlinescriptsize
blah1}
end{subfigure}
hfill
begin{subfigure}[b]{.32linewidth}
includegraphics[width=0.48linewidth]{figure/c_1.png}
includegraphics[width=0.48linewidth]{figure/c_2.png}
smallskip
includegraphics[width=0.48linewidth]{figure/c_3.png}
includegraphics[width=0.48linewidth]{figure/c_4.png}
caption{textbf{Hard} [three duplicate]newlinescriptsize
blah1}
end{subfigure}
caption{sample1}
label{fig:3}
end{figure*}
end{document}

edited Dec 15 at 13:46
answered Dec 15 at 10:12
Zarko
120k865156
120k865156
@Mico, you are right. corrected! thank you very much!
– Zarko
Dec 15 at 13:48
add a comment |
@Mico, you are right. corrected! thank you very much!
– Zarko
Dec 15 at 13:48
@Mico, you are right. corrected! thank you very much!
– Zarko
Dec 15 at 13:48
@Mico, you are right. corrected! thank you very much!
– Zarko
Dec 15 at 13:48
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464948%2fvertical-space-is-different-between-subfigures%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
2
Welcome to TeX.SE! Please make your code snippet compilable!
– Kurt
Dec 15 at 9:07
1
I've taken the liberty of making your code minimally compilable.
– Mico
Dec 15 at 10:03