How to improve this table?
I'm looking for ideas to improve the layout of the following table.
- Is there a better way to separate ABC Metrics and XYZ Metrics (other than using separate table for each metric)?
- Should I convert Algorithms row into a column?
- Should I convert Dataset row into a column?
I would appreciate any ideas, thanks.
documentclass{article}
usepackage[margin=1in]{geometry}
usepackage{tabularx,ragged2e,booktabs}
begin{document}
begin{table*}[!ht]
caption{Evaluation results}
centering
setlength{tabcolsep}{4pt}
begin{tabularx}{textwidth}{>{hsize=1.9hsizebfseriesRaggedRight}X!{extracolsep{fill}}*{6}{>{centeringarraybackslashhsize=0.48hsize}X}}
toprule[1pt]midrule[0.3pt]
multicolumn{7}{c}{textbf{ABC Metrics}} \ midrule[0.3pt]
textbf{Algorithm}& multicolumn{2}{c}{textit{Algo 1}} & multicolumn{2}{c}{textit{Algo 2}} & multicolumn{2}{c}{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Dataset} & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
addlinespace%
{Matric 1} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
{Matric 2} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
{Matric 3} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace
{Matric 4} & 0 & 0 & 0 & 0 & 0 & 0 \
midrule
multicolumn{7}{c}{textbf{XYZ Metrics}} \ midrule[0.3pt]
textbf{Algorithm}& multicolumn{2}{c}{textit{Algo 1}} & multicolumn{2}{c}{textit{Algo 2}} & multicolumn{2}{c}{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Matric 5} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} \ addlinespace
{Matric 6} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} \
midrule[0.3pt]bottomrule[1pt]
end{tabularx}
end{table*}
end{document}
tables tabularx booktabs
add a comment |
I'm looking for ideas to improve the layout of the following table.
- Is there a better way to separate ABC Metrics and XYZ Metrics (other than using separate table for each metric)?
- Should I convert Algorithms row into a column?
- Should I convert Dataset row into a column?
I would appreciate any ideas, thanks.
documentclass{article}
usepackage[margin=1in]{geometry}
usepackage{tabularx,ragged2e,booktabs}
begin{document}
begin{table*}[!ht]
caption{Evaluation results}
centering
setlength{tabcolsep}{4pt}
begin{tabularx}{textwidth}{>{hsize=1.9hsizebfseriesRaggedRight}X!{extracolsep{fill}}*{6}{>{centeringarraybackslashhsize=0.48hsize}X}}
toprule[1pt]midrule[0.3pt]
multicolumn{7}{c}{textbf{ABC Metrics}} \ midrule[0.3pt]
textbf{Algorithm}& multicolumn{2}{c}{textit{Algo 1}} & multicolumn{2}{c}{textit{Algo 2}} & multicolumn{2}{c}{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Dataset} & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
addlinespace%
{Matric 1} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
{Matric 2} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
{Matric 3} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace
{Matric 4} & 0 & 0 & 0 & 0 & 0 & 0 \
midrule
multicolumn{7}{c}{textbf{XYZ Metrics}} \ midrule[0.3pt]
textbf{Algorithm}& multicolumn{2}{c}{textit{Algo 1}} & multicolumn{2}{c}{textit{Algo 2}} & multicolumn{2}{c}{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Matric 5} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} \ addlinespace
{Matric 6} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} \
midrule[0.3pt]bottomrule[1pt]
end{tabularx}
end{table*}
end{document}
tables tabularx booktabs
2
I think this is off-topic because it is subjective. You should ask how to make changes to a table, not opinions on what improvements can you do.
– manooooh
6 hours ago
4
@manooooh That's actually a good question for Meta, whether code review questions are accepted here.
– Henri Menke
4 hours ago
@HenriMenke: See Tagging "Please improve my code" posts and To what extent are code-review-style questions welcome?
– Werner
3 hours ago
add a comment |
I'm looking for ideas to improve the layout of the following table.
- Is there a better way to separate ABC Metrics and XYZ Metrics (other than using separate table for each metric)?
- Should I convert Algorithms row into a column?
- Should I convert Dataset row into a column?
I would appreciate any ideas, thanks.
documentclass{article}
usepackage[margin=1in]{geometry}
usepackage{tabularx,ragged2e,booktabs}
begin{document}
begin{table*}[!ht]
caption{Evaluation results}
centering
setlength{tabcolsep}{4pt}
begin{tabularx}{textwidth}{>{hsize=1.9hsizebfseriesRaggedRight}X!{extracolsep{fill}}*{6}{>{centeringarraybackslashhsize=0.48hsize}X}}
toprule[1pt]midrule[0.3pt]
multicolumn{7}{c}{textbf{ABC Metrics}} \ midrule[0.3pt]
textbf{Algorithm}& multicolumn{2}{c}{textit{Algo 1}} & multicolumn{2}{c}{textit{Algo 2}} & multicolumn{2}{c}{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Dataset} & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
addlinespace%
{Matric 1} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
{Matric 2} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
{Matric 3} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace
{Matric 4} & 0 & 0 & 0 & 0 & 0 & 0 \
midrule
multicolumn{7}{c}{textbf{XYZ Metrics}} \ midrule[0.3pt]
textbf{Algorithm}& multicolumn{2}{c}{textit{Algo 1}} & multicolumn{2}{c}{textit{Algo 2}} & multicolumn{2}{c}{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Matric 5} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} \ addlinespace
{Matric 6} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} \
midrule[0.3pt]bottomrule[1pt]
end{tabularx}
end{table*}
end{document}
tables tabularx booktabs
I'm looking for ideas to improve the layout of the following table.
- Is there a better way to separate ABC Metrics and XYZ Metrics (other than using separate table for each metric)?
- Should I convert Algorithms row into a column?
- Should I convert Dataset row into a column?
I would appreciate any ideas, thanks.
documentclass{article}
usepackage[margin=1in]{geometry}
usepackage{tabularx,ragged2e,booktabs}
begin{document}
begin{table*}[!ht]
caption{Evaluation results}
centering
setlength{tabcolsep}{4pt}
begin{tabularx}{textwidth}{>{hsize=1.9hsizebfseriesRaggedRight}X!{extracolsep{fill}}*{6}{>{centeringarraybackslashhsize=0.48hsize}X}}
toprule[1pt]midrule[0.3pt]
multicolumn{7}{c}{textbf{ABC Metrics}} \ midrule[0.3pt]
textbf{Algorithm}& multicolumn{2}{c}{textit{Algo 1}} & multicolumn{2}{c}{textit{Algo 2}} & multicolumn{2}{c}{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Dataset} & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
addlinespace%
{Matric 1} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
{Matric 2} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
{Matric 3} & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace
{Matric 4} & 0 & 0 & 0 & 0 & 0 & 0 \
midrule
multicolumn{7}{c}{textbf{XYZ Metrics}} \ midrule[0.3pt]
textbf{Algorithm}& multicolumn{2}{c}{textit{Algo 1}} & multicolumn{2}{c}{textit{Algo 2}} & multicolumn{2}{c}{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Matric 5} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} \ addlinespace
{Matric 6} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} & multicolumn{2}{c}{0} \
midrule[0.3pt]bottomrule[1pt]
end{tabularx}
end{table*}
end{document}
tables tabularx booktabs
tables tabularx booktabs
asked 6 hours ago
user3140972
1263
1263
2
I think this is off-topic because it is subjective. You should ask how to make changes to a table, not opinions on what improvements can you do.
– manooooh
6 hours ago
4
@manooooh That's actually a good question for Meta, whether code review questions are accepted here.
– Henri Menke
4 hours ago
@HenriMenke: See Tagging "Please improve my code" posts and To what extent are code-review-style questions welcome?
– Werner
3 hours ago
add a comment |
2
I think this is off-topic because it is subjective. You should ask how to make changes to a table, not opinions on what improvements can you do.
– manooooh
6 hours ago
4
@manooooh That's actually a good question for Meta, whether code review questions are accepted here.
– Henri Menke
4 hours ago
@HenriMenke: See Tagging "Please improve my code" posts and To what extent are code-review-style questions welcome?
– Werner
3 hours ago
2
2
I think this is off-topic because it is subjective. You should ask how to make changes to a table, not opinions on what improvements can you do.
– manooooh
6 hours ago
I think this is off-topic because it is subjective. You should ask how to make changes to a table, not opinions on what improvements can you do.
– manooooh
6 hours ago
4
4
@manooooh That's actually a good question for Meta, whether code review questions are accepted here.
– Henri Menke
4 hours ago
@manooooh That's actually a good question for Meta, whether code review questions are accepted here.
– Henri Menke
4 hours ago
@HenriMenke: See Tagging "Please improve my code" posts and To what extent are code-review-style questions welcome?
– Werner
3 hours ago
@HenriMenke: See Tagging "Please improve my code" posts and To what extent are code-review-style questions welcome?
– Werner
3 hours ago
add a comment |
2 Answers
2
active
oldest
votes
i only repair some inconsistencies in your column width calculation. the sum of the defined widths is 4.78. but it should be an integer number. all other is opinion based ...
my suggestion for your table code (with some opinion based changes and simplification of writing) is:
documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[skip=1ex]{caption}
usepackage{ragged2e}
usepackage{booktabs,tabularx}
newcommandmcc[1]{multicolumn{2}{c}{#1}}
begin{document}
begin{table}[!ht]
caption{Evaluation results}
centering
begin{tabularx}{textwidth}{
>{hsize=0.4hsizebfseriesRaggedRight}X
*{6}{>{hsize=0.1hsizecenteringarraybackslash}X}}
toprule
multicolumn{7}{c}{textbf{ABC Metrics}} \
midrule
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
Dataset & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
midrule
multicolumn{7}{c}{textbf{XYZ Metrics}} \ midrule[0.3pt]
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Matric 5} & mcc{0} & mcc{0} & mcc{0} \
addlinespace
{Matric 6} & mcc{0} & mcc{0} & mcc{0} \
bottomrule
end{tabularx}
end{table}
end{document}
which gives:
add a comment |
Some general observations and comments:
I don't understand why you're using 1
tabularx
environment for two structures that don't look all that much connected. I'd use two separate environments.Since there appears to be no line-wrapping whatsoever, I don't understand why you'd be using a
tabularx
environment to begin with. Why not use atabular*
environment? For that matter, why not usetabular
environments?
Some more specific comments:
Using bold-facing and/or italics in the header cells is a transparent attempt to compensate for the lack of clear visual structure. With such an approach, you are mostly going to come across as somebody who (a) isn't particularly well organized and (b) thinks it's ok to shout at people. The people I know, though, very much prefer not to be shouted at. Your experience may differ...
Based on the information you've provided, the material can easily be presented in two separate, side-by-side
tabular
environments.
The following solution tries to present the material without any shouting, while still trying to be visually "open" and inviting.
PS. What's a "matric"?
documentclass{article}
usepackage[margin=1in,letterpaper]{geometry}
usepackage[skip=0.5baselineskip]{caption} % optional
usepackage{array,booktabs}
begin{document}
begin{table}[!ht]
setlengthtabcolsep{10pt} % default: 6pt
caption{Evaluation results}
begin{tabular}[t]{@{} l *{6}{c} @{}}
multicolumn{7}{@{}l}{ABC Metrics, for datasets $D_1$ and $D_2$} \
toprule
& multicolumn{6}{c@{}}{Algorithm}\
cmidrule(l){2-7}
& multicolumn{2}{c}{Algo 1}
& multicolumn{2}{c}{Algo 2}
& multicolumn{2}{c@{}}{Algo 3} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(l){6-7}
& $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
bottomrule
end{tabular}
hspace{fill}
begin{tabular}[t]{@{} l ccc @{}}
multicolumn{4}{@{}l}{XYZ Metrics} \
toprule
& multicolumn{3}{c@{}}{Algorithm}\
cmidrule(l){2-4}
& Algo 1 & Algo 2 & Algo 3 \
midrule
Matric 5 & 0 & 0 & 0 \
Matric 6 & 0 & 0 & 0 \
bottomrule
end{tabular}
end{table}
end{document}
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%2f468355%2fhow-to-improve-this-table%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
i only repair some inconsistencies in your column width calculation. the sum of the defined widths is 4.78. but it should be an integer number. all other is opinion based ...
my suggestion for your table code (with some opinion based changes and simplification of writing) is:
documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[skip=1ex]{caption}
usepackage{ragged2e}
usepackage{booktabs,tabularx}
newcommandmcc[1]{multicolumn{2}{c}{#1}}
begin{document}
begin{table}[!ht]
caption{Evaluation results}
centering
begin{tabularx}{textwidth}{
>{hsize=0.4hsizebfseriesRaggedRight}X
*{6}{>{hsize=0.1hsizecenteringarraybackslash}X}}
toprule
multicolumn{7}{c}{textbf{ABC Metrics}} \
midrule
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
Dataset & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
midrule
multicolumn{7}{c}{textbf{XYZ Metrics}} \ midrule[0.3pt]
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Matric 5} & mcc{0} & mcc{0} & mcc{0} \
addlinespace
{Matric 6} & mcc{0} & mcc{0} & mcc{0} \
bottomrule
end{tabularx}
end{table}
end{document}
which gives:
add a comment |
i only repair some inconsistencies in your column width calculation. the sum of the defined widths is 4.78. but it should be an integer number. all other is opinion based ...
my suggestion for your table code (with some opinion based changes and simplification of writing) is:
documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[skip=1ex]{caption}
usepackage{ragged2e}
usepackage{booktabs,tabularx}
newcommandmcc[1]{multicolumn{2}{c}{#1}}
begin{document}
begin{table}[!ht]
caption{Evaluation results}
centering
begin{tabularx}{textwidth}{
>{hsize=0.4hsizebfseriesRaggedRight}X
*{6}{>{hsize=0.1hsizecenteringarraybackslash}X}}
toprule
multicolumn{7}{c}{textbf{ABC Metrics}} \
midrule
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
Dataset & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
midrule
multicolumn{7}{c}{textbf{XYZ Metrics}} \ midrule[0.3pt]
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Matric 5} & mcc{0} & mcc{0} & mcc{0} \
addlinespace
{Matric 6} & mcc{0} & mcc{0} & mcc{0} \
bottomrule
end{tabularx}
end{table}
end{document}
which gives:
add a comment |
i only repair some inconsistencies in your column width calculation. the sum of the defined widths is 4.78. but it should be an integer number. all other is opinion based ...
my suggestion for your table code (with some opinion based changes and simplification of writing) is:
documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[skip=1ex]{caption}
usepackage{ragged2e}
usepackage{booktabs,tabularx}
newcommandmcc[1]{multicolumn{2}{c}{#1}}
begin{document}
begin{table}[!ht]
caption{Evaluation results}
centering
begin{tabularx}{textwidth}{
>{hsize=0.4hsizebfseriesRaggedRight}X
*{6}{>{hsize=0.1hsizecenteringarraybackslash}X}}
toprule
multicolumn{7}{c}{textbf{ABC Metrics}} \
midrule
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
Dataset & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
midrule
multicolumn{7}{c}{textbf{XYZ Metrics}} \ midrule[0.3pt]
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Matric 5} & mcc{0} & mcc{0} & mcc{0} \
addlinespace
{Matric 6} & mcc{0} & mcc{0} & mcc{0} \
bottomrule
end{tabularx}
end{table}
end{document}
which gives:
i only repair some inconsistencies in your column width calculation. the sum of the defined widths is 4.78. but it should be an integer number. all other is opinion based ...
my suggestion for your table code (with some opinion based changes and simplification of writing) is:
documentclass{article}
usepackage[margin=1in]{geometry}
usepackage[skip=1ex]{caption}
usepackage{ragged2e}
usepackage{booktabs,tabularx}
newcommandmcc[1]{multicolumn{2}{c}{#1}}
begin{document}
begin{table}[!ht]
caption{Evaluation results}
centering
begin{tabularx}{textwidth}{
>{hsize=0.4hsizebfseriesRaggedRight}X
*{6}{>{hsize=0.1hsizecenteringarraybackslash}X}}
toprule
multicolumn{7}{c}{textbf{ABC Metrics}} \
midrule
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
Dataset & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace%
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
addlinespace
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
midrule
multicolumn{7}{c}{textbf{XYZ Metrics}} \ midrule[0.3pt]
textbf{Algorithm}
& mcc{textit{Algo 1}} & mcc{textit{Algo 2}} & mcc{textit{Algo 3}} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(lr){6-7}%
{Matric 5} & mcc{0} & mcc{0} & mcc{0} \
addlinespace
{Matric 6} & mcc{0} & mcc{0} & mcc{0} \
bottomrule
end{tabularx}
end{table}
end{document}
which gives:
answered 6 hours ago
Zarko
121k865156
121k865156
add a comment |
add a comment |
Some general observations and comments:
I don't understand why you're using 1
tabularx
environment for two structures that don't look all that much connected. I'd use two separate environments.Since there appears to be no line-wrapping whatsoever, I don't understand why you'd be using a
tabularx
environment to begin with. Why not use atabular*
environment? For that matter, why not usetabular
environments?
Some more specific comments:
Using bold-facing and/or italics in the header cells is a transparent attempt to compensate for the lack of clear visual structure. With such an approach, you are mostly going to come across as somebody who (a) isn't particularly well organized and (b) thinks it's ok to shout at people. The people I know, though, very much prefer not to be shouted at. Your experience may differ...
Based on the information you've provided, the material can easily be presented in two separate, side-by-side
tabular
environments.
The following solution tries to present the material without any shouting, while still trying to be visually "open" and inviting.
PS. What's a "matric"?
documentclass{article}
usepackage[margin=1in,letterpaper]{geometry}
usepackage[skip=0.5baselineskip]{caption} % optional
usepackage{array,booktabs}
begin{document}
begin{table}[!ht]
setlengthtabcolsep{10pt} % default: 6pt
caption{Evaluation results}
begin{tabular}[t]{@{} l *{6}{c} @{}}
multicolumn{7}{@{}l}{ABC Metrics, for datasets $D_1$ and $D_2$} \
toprule
& multicolumn{6}{c@{}}{Algorithm}\
cmidrule(l){2-7}
& multicolumn{2}{c}{Algo 1}
& multicolumn{2}{c}{Algo 2}
& multicolumn{2}{c@{}}{Algo 3} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(l){6-7}
& $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
bottomrule
end{tabular}
hspace{fill}
begin{tabular}[t]{@{} l ccc @{}}
multicolumn{4}{@{}l}{XYZ Metrics} \
toprule
& multicolumn{3}{c@{}}{Algorithm}\
cmidrule(l){2-4}
& Algo 1 & Algo 2 & Algo 3 \
midrule
Matric 5 & 0 & 0 & 0 \
Matric 6 & 0 & 0 & 0 \
bottomrule
end{tabular}
end{table}
end{document}
add a comment |
Some general observations and comments:
I don't understand why you're using 1
tabularx
environment for two structures that don't look all that much connected. I'd use two separate environments.Since there appears to be no line-wrapping whatsoever, I don't understand why you'd be using a
tabularx
environment to begin with. Why not use atabular*
environment? For that matter, why not usetabular
environments?
Some more specific comments:
Using bold-facing and/or italics in the header cells is a transparent attempt to compensate for the lack of clear visual structure. With such an approach, you are mostly going to come across as somebody who (a) isn't particularly well organized and (b) thinks it's ok to shout at people. The people I know, though, very much prefer not to be shouted at. Your experience may differ...
Based on the information you've provided, the material can easily be presented in two separate, side-by-side
tabular
environments.
The following solution tries to present the material without any shouting, while still trying to be visually "open" and inviting.
PS. What's a "matric"?
documentclass{article}
usepackage[margin=1in,letterpaper]{geometry}
usepackage[skip=0.5baselineskip]{caption} % optional
usepackage{array,booktabs}
begin{document}
begin{table}[!ht]
setlengthtabcolsep{10pt} % default: 6pt
caption{Evaluation results}
begin{tabular}[t]{@{} l *{6}{c} @{}}
multicolumn{7}{@{}l}{ABC Metrics, for datasets $D_1$ and $D_2$} \
toprule
& multicolumn{6}{c@{}}{Algorithm}\
cmidrule(l){2-7}
& multicolumn{2}{c}{Algo 1}
& multicolumn{2}{c}{Algo 2}
& multicolumn{2}{c@{}}{Algo 3} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(l){6-7}
& $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
bottomrule
end{tabular}
hspace{fill}
begin{tabular}[t]{@{} l ccc @{}}
multicolumn{4}{@{}l}{XYZ Metrics} \
toprule
& multicolumn{3}{c@{}}{Algorithm}\
cmidrule(l){2-4}
& Algo 1 & Algo 2 & Algo 3 \
midrule
Matric 5 & 0 & 0 & 0 \
Matric 6 & 0 & 0 & 0 \
bottomrule
end{tabular}
end{table}
end{document}
add a comment |
Some general observations and comments:
I don't understand why you're using 1
tabularx
environment for two structures that don't look all that much connected. I'd use two separate environments.Since there appears to be no line-wrapping whatsoever, I don't understand why you'd be using a
tabularx
environment to begin with. Why not use atabular*
environment? For that matter, why not usetabular
environments?
Some more specific comments:
Using bold-facing and/or italics in the header cells is a transparent attempt to compensate for the lack of clear visual structure. With such an approach, you are mostly going to come across as somebody who (a) isn't particularly well organized and (b) thinks it's ok to shout at people. The people I know, though, very much prefer not to be shouted at. Your experience may differ...
Based on the information you've provided, the material can easily be presented in two separate, side-by-side
tabular
environments.
The following solution tries to present the material without any shouting, while still trying to be visually "open" and inviting.
PS. What's a "matric"?
documentclass{article}
usepackage[margin=1in,letterpaper]{geometry}
usepackage[skip=0.5baselineskip]{caption} % optional
usepackage{array,booktabs}
begin{document}
begin{table}[!ht]
setlengthtabcolsep{10pt} % default: 6pt
caption{Evaluation results}
begin{tabular}[t]{@{} l *{6}{c} @{}}
multicolumn{7}{@{}l}{ABC Metrics, for datasets $D_1$ and $D_2$} \
toprule
& multicolumn{6}{c@{}}{Algorithm}\
cmidrule(l){2-7}
& multicolumn{2}{c}{Algo 1}
& multicolumn{2}{c}{Algo 2}
& multicolumn{2}{c@{}}{Algo 3} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(l){6-7}
& $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
bottomrule
end{tabular}
hspace{fill}
begin{tabular}[t]{@{} l ccc @{}}
multicolumn{4}{@{}l}{XYZ Metrics} \
toprule
& multicolumn{3}{c@{}}{Algorithm}\
cmidrule(l){2-4}
& Algo 1 & Algo 2 & Algo 3 \
midrule
Matric 5 & 0 & 0 & 0 \
Matric 6 & 0 & 0 & 0 \
bottomrule
end{tabular}
end{table}
end{document}
Some general observations and comments:
I don't understand why you're using 1
tabularx
environment for two structures that don't look all that much connected. I'd use two separate environments.Since there appears to be no line-wrapping whatsoever, I don't understand why you'd be using a
tabularx
environment to begin with. Why not use atabular*
environment? For that matter, why not usetabular
environments?
Some more specific comments:
Using bold-facing and/or italics in the header cells is a transparent attempt to compensate for the lack of clear visual structure. With such an approach, you are mostly going to come across as somebody who (a) isn't particularly well organized and (b) thinks it's ok to shout at people. The people I know, though, very much prefer not to be shouted at. Your experience may differ...
Based on the information you've provided, the material can easily be presented in two separate, side-by-side
tabular
environments.
The following solution tries to present the material without any shouting, while still trying to be visually "open" and inviting.
PS. What's a "matric"?
documentclass{article}
usepackage[margin=1in,letterpaper]{geometry}
usepackage[skip=0.5baselineskip]{caption} % optional
usepackage{array,booktabs}
begin{document}
begin{table}[!ht]
setlengthtabcolsep{10pt} % default: 6pt
caption{Evaluation results}
begin{tabular}[t]{@{} l *{6}{c} @{}}
multicolumn{7}{@{}l}{ABC Metrics, for datasets $D_1$ and $D_2$} \
toprule
& multicolumn{6}{c@{}}{Algorithm}\
cmidrule(l){2-7}
& multicolumn{2}{c}{Algo 1}
& multicolumn{2}{c}{Algo 2}
& multicolumn{2}{c@{}}{Algo 3} \
cmidrule(lr){2-3} cmidrule(lr){4-5} cmidrule(l){6-7}
& $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \
midrule
Matric 1 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 2 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 3 & 0 & 0 & 0 & 0 & 0 & 0 \
Matric 4 & 0 & 0 & 0 & 0 & 0 & 0 \
bottomrule
end{tabular}
hspace{fill}
begin{tabular}[t]{@{} l ccc @{}}
multicolumn{4}{@{}l}{XYZ Metrics} \
toprule
& multicolumn{3}{c@{}}{Algorithm}\
cmidrule(l){2-4}
& Algo 1 & Algo 2 & Algo 3 \
midrule
Matric 5 & 0 & 0 & 0 \
Matric 6 & 0 & 0 & 0 \
bottomrule
end{tabular}
end{table}
end{document}
answered 5 hours ago
Mico
274k30370756
274k30370756
add a comment |
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%2f468355%2fhow-to-improve-this-table%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
I think this is off-topic because it is subjective. You should ask how to make changes to a table, not opinions on what improvements can you do.
– manooooh
6 hours ago
4
@manooooh That's actually a good question for Meta, whether code review questions are accepted here.
– Henri Menke
4 hours ago
@HenriMenke: See Tagging "Please improve my code" posts and To what extent are code-review-style questions welcome?
– Werner
3 hours ago