Non-Research Tips for Information
Science Researchers (Summer 2024)
May 1, 2024
Week 4: Tables and plots
https://non-research-tips.github.io/2024

Yusuke Matsui(UTokyo)1

Schedule
Date (2024)

Contents

Presented by

Week 1, Apr 10

Introduction. Review of fundamental concepts

Yusuke, Koya, Yuki, Jun

Week 2, Apr 17

Equations and pseudo-codes

Yusuke Matsui

Week 3, Apr 24

Presentation

Koya Narumi

Week 4, May 1

Tables and plots

Yusuke Matsui

Week 5, May 8

Figures

Koya Narumi

Week 6, May 22

VideosKoya Narumi

Week 7, May 29

Invited Talk 1

Dr. Yoshiaki Bando (AIST)

Week 8, June 5

Invited Talk 2

Prof. Katie Seaborn (Tokyo Tech)

Week 9, June 12

GitHub in depth

Yusuke Matsui

Week 10, June 19

Automation of research and research
dissemination (Web, Cloud, CI/CD)

Jun Kato

Week 11, June 26

Research community

Jun Kato

Week 12, July 3

3DCG illustrations

Yuki Koyama

Week 13, July 10

Final presentations-2

AuthorMy current table appears unprofessional. I wantto create a more visually appealing table…

3

AuthorMy current table appears unprofessional. I wantto create a more visually appealing table…

The table looks better! I often find this kinds oftables in top-conference papers.

4AuthorMy current table appears unprofessional. I wantto create a more visually appealing table…
Good job!
Keep doing!

The table looks better! I often find this kinds oftables in top-conference papers.

Reviewer 2

5

AuthorMy current table appears unprofessional. I wantto create a more visually appealing table…

1. Structure your table.
2. Use the booktabs package.

Good job!
Keep doing!

The table looks better! I often find this kinds oftables in top-conference papers.

Reviewer 2

6

Author

Whenever I display data, I always use
a bar graph, but I feel like it doesn't
provide enough information.

7

Author

Whenever I display data, I always use
a bar graph, but I feel like it doesn't
provide enough information.

Box plots seem better! Now, I can seethat DenseNet's scores are scattered.

8Author

Whenever I display data, I always use
a bar graph, but I feel like it doesn't
provide enough information.

Good job!
Keep doing!

Box plots seem better! Now, I can seethat DenseNet's scores are scattered.

Reviewer 2

9Author

Whenever I display data, I always use
a bar graph, but I feel like it doesn't
provide enough information.

Tips for good plots

Good job!
Keep doing!

Box plots seem better! Now, I can seethat DenseNet's scores are scattered.

Reviewer 2

10

Reference
booktabs➢ S. Fear, “Publication quality tables in LaTeX”, Official documentation for booktabs in CTAN, 2020.
http://mirrors.ctan.org/macros/latex/contrib/booktabs/booktabs.pdf➢ M. Püschel, “Small Guide to Making Nice Tables”, https://people.inf.ethz.ch/markusp/teaching/guides/guide-tables.pdf
Introduction of booktabs (I was inspired by this document.)

Boxplot➢ M. Streit and N. Gehlenborg, “Bar charts and box plots”, Nature Methods, 2014.
https://www.nature.com/articles/nmeth.2807
The original document for this lecture➢ 松井勇佑，”とにかくbooktabsを使おう”，GitHub, 2022. https://github.com/mti-lab/use_booktabs_anyway

I’d like to translate it into English,
but I have no time… PR welcome!

11

Powerpoint?
➢ The contents of today’s lecture are for rendering tables by TeX.
➢ When you want to render tables in Powerpoint, you can imitate
the TeX’s one, like:
But I don’t likethis space…

Name

Height (cm)Weight (kg)

LeBron James

206

113

Anthony Davis

208

115

➢ Or you can do it in other ways, like:

12Disclaimer➢ The contents of today’s lecture are based on Matsui’s rule of thumb.
➢ Please consider the contents as guidelines and apply them to yourfield at your discretion.
➢ If you have better tips, please always let me know!
➢ I would like to offer you helpful tips and enhance the quality of yourpapers. (All of you!)
Can we systematically overcome the typicalmistakes that beginners make?
I have been thinking about such a thing for
more than a decade ...
The review for my first
CVPR submission (2013)13

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc14

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc15

Basics➢ Follow the 5 steps below.
\begin{tabular}{|c|c|c|} \hline
Name & Height (cm) & Weight (kg) \\ \hline
LeBron James& 206 & 113 \\ \hline
Anthony Davis & 208 & 115 \\ \hline\end{tabular}\usepackage{booktabs}\begin{tabular}{@{}lll@{}} \toprule
Name & Height (cm) & Weight (kg) \\ \midrule
LeBron James& 206 & 113 \\Anthony Davis & 208 & 115 \\ \bottomrule\end{tabular}

16

Basics➢ Follow the 5 steps below.
\begin{tabular}{|c|c|c|} \hline
Name & Height (cm) & Weight (kg) \\ \hline
LeBron James& 206 & 113 \\ \hline
Anthony Davis & 208 & 115 \\ \hline\end{tabular}

Step 1: import the package.

\usepackage{booktabs}\begin{tabular}{@{}lll@{}} \toprule
Name & Height (cm) & Weight (kg) \\ \midrule
LeBron James& 206 & 113 \\Anthony Davis & 208 & 115 \\ \bottomrule\end{tabular}

17

Step 2: Delete all vertical lines.
➢ i.e., {|c|c|c|}{ccc}➢ If you table is well structured, you don’t need vertical lines.
Follow
steps➢➢If youthink5youneed vertical lines, I recommend splitting the table into smaller ones

Basics\begin{tabular}{|c|c|c|} \hline
Name & Height (cm) & Weight (kg) \\ \hline
LeBron James& 206 & 113 \\ \hline
Anthony Davis & 208 & 115 \\ \hline\end{tabular}\usepackage{booktabs}\begin{tabular}{@{}lll@{}} \toprule
Name & Height (cm) & Weight (kg) \\ \midrule
LeBron James& 206 & 113 \\Anthony Davis & 208 & 115 \\ \bottomrule\end{tabular}

18

Step 3: Align left.
➢ i.e., {ccc}{lll}➢ Left-align is beautiful (Remember “invisible lines” in Week 3!)➢➢If youhave5problems
Follow
steps with left alignment, try right or centeralignment.

Basics\begin{tabular}{|c|c|c|} \hline
Name & Height (cm) & Weight (kg) \\ \hline
LeBron James& 206 & 113 \\ \hline
Anthony Davis & 208 & 115 \\ \hline\end{tabular}\usepackage{booktabs}\begin{tabular}{@{}lll@{}} \toprule
Name & Height (cm) & Weight (kg) \\ \midrule
LeBron James& 206 & 113 \\Anthony Davis & 208 & 115 \\ \bottomrule\end{tabular}

19

Basics➢ Follow the 5 steps below.
\begin{tabular}{|c|c|c|} \hline
Name & Height (cm) & Weight (kg) \\ \hline
James& 206 & 113 \\ \hline
Step 4:LeBronPutamagicalspacer symbols, “@{}”Anthony Davis & 208 & 115 \\ \hline➢ \end{tabular}i.e., {lll}{@{}lll@{}}➢ This eliminates excess spaces.
➢ Many papers forget this.
\usepackage{booktabs}\begin{tabular}{@{}lll@{}} \toprule
Name & Height (cm) & Weight (kg) \\ \midrule
LeBron James& 206 & 113 \\Anthony Davis & 208 & 115 \\ \bottomrule\end{tabular}

20

Basics➢ Follow 5 steps
w/o “@{}”

w/ “@{}”\begin{tabular}{|c|c|c|}\hlineName & Height (cm) & Weight (kg) \\ \hline
James& 206 & 113 \\ \hline
Step LeBron4:
Putamagicalspacer symbols, @{}Anthony Davis & 208 & 115 \\ \hline➢\end{tabular}i.e., {lll}{@{}lll@{}}➢ This spacers eliminate excess margins.
➢ Many researchers forget this.

➢ Weird spaces…
\usepackage{booktabs}
No spaces. Beautiful!
➢ Remember “invisible lines” \begin{tabular}{@{}lll@{}} \toprule
Name & Height (cm) & Weight (kg) \\ \midrulein Week 3!
LeBron James
Anthony Davis\end{tabular}& 206 & 113 \\& 208 & 115 \\ \bottomrule21

Step 5: Use “top/mid/bottomrule”➢ i.e.,✓ The top \hline\toprule➢ Follow 5 steps✓ The next \hline\midrule✓ The bottom \hline\bottomrule\begin{tabular}{|c|c|c|} \hline✓ Other \hlines
Delete!
Name & Height (cm) & Weight (kg) \\ \hline➢ Well-structured tables require horizontal lines
justJamesa bit. & 206 & 113 \\ \hline
LeBronBasicsAnthony Davis\end{tabular}& 208 & 115 \\ \hline\usepackage{booktabs}\begin{tabular}{@{}lll@{}} \toprule
Name & Height (cm) & Weight (kg) \\ \midrule
LeBron James& 206 & 113 \\Anthony Davis & 208 & 115 \\ \bottomrule\end{tabular}

22

Basics➢ Follow the 5 steps below.
\begin{tabular}{|c|c|c|} \hline
Name & Height (cm) & Weight (kg) \\ \hline
LeBron James& 206 & 113 \\ \hline
Anthony Davis & 208 & 115 \\ \hline\end{tabular}\toprule\usepackage{booktabs}\midrule\begin{tabular}{@{}lll@{}} \toprule
Delete!
Name & Height (cm) & Weight (kg) \\ \midrule
LeBron James& 206 & 113 \\\bottomrule
Anthony Davis & 208 & 115 \\ \bottomrule\end{tabular}23

Basics➢ You can always apply these 5 steps, and your table will be much
more beautiful!
\begin{tabular}{|c|c|c|} \hline
Name & Height (cm) & Weight (kg) \\ \hline
LeBron James& 206 & 113 \\ \hline
Anthony Davis & 208 & 115 \\ \hline\end{tabular}\usepackage{booktabs}\begin{tabular}{@{}lll@{}} \toprule
Name & Height (cm) & Weight (kg) \\ \midrule
LeBron James& 206 & 113 \\Anthony Davis & 208 & 115 \\ \bottomrule\end{tabular}

24

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc25

Row-oriented structure➢ A table should be a stack of rows, i.e., row-oriented.
➢ The best structure: “header” + “row1” + “row2” + …
Header
Row1
Row2➢ Each row should besemantically same level➢ i.e., instances (rows) of
the same class (header)➢ Each row should be semantically interchangeable.
➢ Usually, rows are sorted
by some criteria.
➢ Yet, rows should beinterchangeable.

26

Row-oriented structure➢ A table should be a stack of rows, i.e., row-oriented.
➢ The best structure: “header” + “row1” + “row2” + …
Header
Row1
Row2➢ Each row should besemantically same level➢ i.e., instances (rows) of
the same class (header)class Person:➢ Each row should be semantically interchangeable.
def __init__(self, name, height, weight):
self.name = nameself.height = height
self.weight= weight rows are sorted➢ Usually,

by James',some criteria.
row1 = Person('LeBron
206, 113)
row2 = Person('Anthony
208, 115)➢ Yet,Davis',rows shouldbeinterchangeable.

27

Row-oriented structure➢ For each column,✓ The header defines the type, i.e., “int”.
✓ Each row shows the value, i.e., “34”.
➢ Seems obvious? But it’s not easy to strictly follow this principal.
Type

Value

28

Row-oriented
structure➢ From S. Ren+, “Faster R-CNN: Towards Real-Time Object Detection with Region

Networks”,
TPAMI 2017 (30K+ citation paper)➢Proposal
For eachcolumn,➢ Objectdetection
papersdo not➢ The
headerdefines
thefollow
type,thisi.e.,principal“int”. (because #class is ~20 and can
fit the paper, thus it’s possible to write everything one line).
➢ Each row shows the value, i.e., “34”.
➢ One may restructure this table clearer as we’ll show later, but it requires more spaces.
Seems obvious?
But it’s not easy to strictly follow this➢➢Everything
up to the situation!
principal.
Type

Value

29

Exceptional cases: e.g., average values➢ There are several exceptions, such as a row of average values➢ Such row is a special and cannot be swapped to other rows (usuallyplaced at the bottom).

The last row is for “average”.

You can use \midrule if you want.

➢ Creating tables: Following the row-oriented structure as muchas possible while aiming for the clearest presentation.

30

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc31

Row grouping➢ You can group rows to improve the readability.
A good table. Rows are interchangeable.

However, there are repetitive descriptions,which makes the table unnecessarily wordy.
32

Row grouping➢ You can group rows to improve the readability.

➢ You can simply group some rows.
➢ Delete unnecessary descriptions.
33

Row grouping➢ You can group rows to improve the readability.
➢ You can further draw a \midrule➢ You can combine rows if youwant.
➢ \multirow
34

Row grouping\multirow{2}{*}{XYZ}& 16 & 0.32 & 0.21 \\& 32 & 0.61 & 0.44 \\ \midrule\multirow{2}{*}{Ours} & 9 & 0.47 & 0.26 \\XYZ & 16 & 0.32 & 0.21 \\& 18 & 0.99 & 0.77 \\ \bottomrule➢ You
can group rows to improve the readability.
& 32 & 0.61 & 0.44 \\Ours & 9 & 0.47 & 0.26 \\& 18 & 0.99 & 0.77 \\ \bottomrule➢ You can further draw a \midrule➢ You can combine rows if you want.
➢ \multirow
35Row grouping➢ Many prefer the third one.
➢ Personally speaking, the second one is straightforward enough inmany cases (simpler is better).
➢ Choose what you like!

36

Multiple-level grouping➢ You can group rows recursively.

37

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc38

Row hierarchization➢ Row hierarchization = Deleting a row + Indentation✓ In other words, horizontally-longvertically-long➢ Row hierarchization may make a table easier to read.

A good table. Rows are interchangeable.
39

Row hierarchization➢ Row hierarchization = Deleting a row + Indentation✓ In other words, horizontally-longvertically-long➢ Row hierarchization may make a table easier to read.

Row grouping. Easier to read. Good.
40

Row hierarchization➢ Row hierarchization = Deleting a row + Indentation✓ In other words, horizontally-longvertically-long➢ Row hierarchization may make a table easier to read.

Indentation (add white spaces in TeX)

Row hierarchization. In this case,this one is also good.

41

Row
hierarchization\begin{tabular}{@{}lll@{}}\toprule
Item& Price ($\yen$) & Floor \\ \midrule
Meathierarchization
&
&
\\
➢ Row
= Deletinga row + Indentation~~Pork& 300& 2\\✓~~Beef
In other&words,
horizontally-longvertically-long
500
& 2
\\
Vegetables&➢ Rowhierarchization
may&make \\a table easier to read.
~~Tomato
& 100
& 3
\\
~~Corn& 200& 3\\~~Cabbage & 30
& 4\\ \bottomrule\end{tabular}

Indentation (add white spaces in TeX)

Row hierarchization. In this case,this one is also good.

42

Row hierarchization➢ Row hierarchization = Deleting a row + Indentation✓ In other words, horizontally-longvertically-long➢ Row hierarchization may make a table easier to read.

➢ Row-grouping and row-hierarchization are just for visualization➢ Semantically, one should be able to convert the table to the original“stack of rows” from easily.

43

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc44

Column hierarchization➢ Columns cannot be grouped. But can be hierarchically summarized.
➢ Ok. But there are multiple “error”s.
➢ Not only wordy, but also requires
spaces.
Columnhierarchization➢ Hierarchize “error”.
➢ No redundant information. Good!
➢ Again, this is for visualization. We canalways back to the original form.

45Column hierarchization\begin{tabular}{@{}llll@{}}➢Columns cannot be \toprulegrouped. But can be hierarchically summarized.
& \multicolumn{3}{c}{Error} \\ \cmidrule(l){2-4}
Method & Min. & Avg. & Max. \\ \midrule➢
Ok.&But
multiple“error”s.
Isomap0.23there& 0.44 are& 0.92\\
LLENot& only
0.10 &wordy,
0.73 & 1.82
\bottomrule➢but \\
also
requires spaces.
\end{tabular}\multicolumn\cmidruleColumnhierarchization➢ Hierarchize “error”.
➢ No redundant information. Good!
➢ Again, this is for visualization. We canalways back to the original form.

46

Multiple column-hierarchization➢ You can hierarchize columns multiple times.
With hierarchization, one needs to write
a unit just once, making the table shorter

It’s ok to mix usual columns andhierarchized columns

47

Multiple column-hierarchization\begin{tabular}{@{}lllllllll@{}} \toprule& \multicolumn{3}{c}{Temperature（$\mathrm{^\circ C}$）} & \multicolumn{2}{c}{Precipitation（mm）} & \multicolumn{2}{c}{Access} & \\ \cmidrule(lr){2-4} \cmidrule(lr){5-6} \cmidrule(lr){7-8}Prefecture & Max. & Avg. & Min. & August & December & By shinkansen & By plane & Density（persons/${km}^2$） \\ \midrule
Ishikawa & 32 & 20 & -1 & 179.8 & 304.7 & \checkmark & \checkmark & 267 \\Shizuoka & 27 & 23 & 5 & 250.9 & 63.0 & \checkmark & \checkmark & 461 \\Okinawa & 33 & 28 & 15 & 175.4 & 104.4 & & \checkmark & 643 \\ \bottomrule\end{tabular}➢ You can hierarchize columns multiple times.
With hierarchization, one needs to write
a unit just once, making the table shorter

It’s ok to mix usual columns andhierarchized columns

48Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc49

Partial horizontal line (cmidrule)➢ Partial horizontal line (cmidrule) has two parameters.
✓ Trims the ends of the line?: “l” (left) or “r” (right) or “lr” (both)✓ Range (e.g., “2-4”)➢ By setting these params correctly, the table becomes much beautiful.
Trim!
\begin{tabular}{@{}llll@{}} \toprule& \multicolumn{3}{c}{Error} \\ \cmidrule(l){2-4}
Method & Min. & Avg. & Max. \\ \midrule
Isomap & 0.23 & 0.44 & 0.92 \\LLE& 0.10 & 0.73 & 1.82 \\ \bottomrule\end{tabular}
1

2

3

4

50

Partial horizontal line (cmidrule)

Trim left

Trim rightTrim left and right

Small differences… But god is in the details…
51

Partial horizontal line (cmidrule)w/ proper params

w/o proper params

52

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc53

Column to row➢ This is not recommended, but moving a column to a row often
makes the table clearer. Consider the following typical table.

➢ This table is good (rows are interchangeable), but…
✓ If we compare methods in the same dataset, the values are faraway (e.g., on MNIST, k-means (10.2) vs Ours (8.3)).
✓ With more methods/datasets, the table becomes more vertical.

54

Column to row➢ This is not recommended, but moving a column to a row often
makes the table clearer. Consider the following typical table.

➢ This table is good (rows are interchangeable), but…
✓ If we compare methods in the same dataset, the values are faraway (e.g., on MNIST, k-means (10.2) vs Ours (8.3)).
✓ With more methods/datasets, the table becomes more vertical.

55

Column to row➢ This is not recommended, but moving a column to a row often
makes the table clearer. Consider the following typical table.

➢ This table is good (rows are interchangeable), but…
✓ If we compare methods in the same dataset, the values are faraway (e.g., on MNIST, k-means (10.2) vs Ours (8.3)).
✓ With more methods/datasets, the table becomes more vertical.

56

Column to row
Restructure the problem.
➢ Each row is (method, dataset, runtime) to…
➢ Each row is (method, runtime for MNIST, runtime for ImageNet, runtime for Places)

Column-to-row

Columnhierarchization

Still wordy?

57

Column to row

Pattern 1:
Delete “Dataset=“

Pattern 2:
Move “Dataset“58Column to row

Pattern 1:
Delete “Dataset=“

Pattern 2:
Move “Dataset“➢ Seems clear. But there’s no descriptions for “Dataset”➢ This approach works only if it’s acceptable not to show “Dataset”

59Column to row

Pattern 1:
Delete “Dataset=“

Pattern 2:
Move “Dataset“➢ Seems perfect? But there’s no description for “Runtime”.
➢ You need to write “This table reports runtime (ms)” in the caption.
➢ If a table consists of only one type of value, you may clarify the table byremoving the type in the header and explaining the type in the caption.

60

Column to row

Pattern 1:
Delete“Dataset=“
Note that
this violates “row-oriented principal”. Thus
personally I don’t recommend this style, though.

Pattern 2:
Move “Dataset“➢ Seems perfect? But there’s no description for “Runtime”.
➢ You need to write “This table reports runtime (ms)” in the caption.
➢ If a table consists of only one type of value, you may clarify the table byremoving the type in the header and explaining the type in the caption.

61

Column to row
Pattern 1:
Delete “Dataset=“

Pattern 2:
Move “Dataset“Pattern 3: Plots➢ The original cause is that there are two factors to focus (Method and Dataset).
➢ If there are two factors to focus, the table would be “matrix-like”.
➢ In this case, plotting may be better (you can further improve this by box-plot!).

62

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc63

Flowchart➢ When you have trouble creating tables, then…
1. Break up the table until it becomes the “good” table (e.g., satisfying
stack-of-rows principal). It is OK if it is very vertically long.
2. Repeat the “row grouping” for the most important column. Do “rowhierarchization” as needed.
3. Perform “column grouping” as necessary.
4. If it still does not fit, do “move a column to a row” and then do “rowhierarchization”. Delete redundant descriptions.
5. If it still does not fit well, consider using a plot.

64

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc65

Basics➢ Three basic plots; line chart, box plot (bar chart), and scatter plot
➢ Try these basic plots first. In many cases, that will suffice.
➢ Avoid using overly complex/sophisticated plots, as reviewers may
have difficulty understanding them.

Line chart
Bar chat is more natural, but a bar chart canbe (and should be) converted to a box plot.

Box plot

Scatter plot66

Basics➢ Three basic plots; line chart, box plot (bar chart), and scatter plot
➢
Try
these
basic
plots
first.
In
many
cases,
thatwill
suffice.
➢ There exist discrete labels. (x-axis)
Several
2D instances➢
Avoid
overly observations.
complex/sophisticatedplots,➢ asreviewersmay➢ For
eachusinglabel, several(y-axis)have difficulty understanding them.

Line chart

Box plot➢ OneBarcontrol
parameter
chat is morenatural, but(aa continuous
bar chart can value, not discrete labels).
➢ Compareseveralof the parameter.
be (and shouldbe) functions
converted to(lines)
a box plot.

Scatter plot

67

Basics
LegendBe sure to separate the measured value (marker) and the line to becomplemented (do not use a polyline chart without markers).

MUST put xlabel
and ylabel.

Set different marker values anddifferent line types for each plot.

The font size should be large! Ideally, the same size as the main text.

68

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc69

Bar chart to box plot
➢ A bar chart is the first choice, however,✓ A bar chart with error bars is basically better.
✓ A box plot is further better.
➢ Considering the following observations.
Accuracy of AlexNet[ 0.14 0.06 0.05 0.11 0.14 0.08 0.2 0.14 0.1 0.08 0.07 0.15 0.09 0.01 0.08 0.15 0.04 0.04 0.11 0.11]
Accuracy of VGG[ 0.06 0.08 0.07 0.06 0.07 0.03 0.04 0.02 0.03 0.06 0.01 0.04 0.04 0.05 0.04 0.03 0.04 0.09 0.09 0.05]
Accuracy of ResNet[ 0.32 0.06 0.16 0.22 0.45 0.13 0.25 0.51 0.27 0.32 0.06 0.43 0.31 0.28 0.18 0.16 0.22 0.35 0.46 0.27]
Accuracy of DenseNet[ 0.42 0.36 0.39 0.43 0.55 0.

0.49 0.12 0.08 0.35 0.01 0.58 0.39 0.46 -0.05 0.37 0.34 0.06 0.05 0.44]

Accuracy of EfficientNet[ 0.1 0.21 0.17 0.12 0.28 0.25 0.11 0.01 0.09 0.12 0.21 0.3 0.11 0.23 0.18 0.21 0.05 0.12 0.07 0.1 ]70Bar chart to box plot
➢ A bar chart is the first choice, however,✓ A bar chart with error bars is basically better.
✓ A box plot is further better.
➢ Considering the following observations.
Accuracy of AlexNet[ 0.14 0.06 0.05 0.11 0.14 0.08 0.2 0.14 0.1 0.08 0.07 0.15 0.09 0.01 0.08 0.15 0.04 0.04 0.11 0.11]➢ Comparison over the discrete labels (methods).
Accuracy of VGG
So we don’t use a line chart.
[ 0.06 0.08 0.07 0.06 0.07 0.03 0.04 0.02 0.03 0.06 0.01 0.04 0.04 0.05 0.04 0.03 0.04 0.09 0.09 0.05]➢ Let’s consider a bar chart first.
Accuracy of ResNet[ 0.32 0.06 0.16 0.22 0.45 0.13 0.25 0.51 0.27 0.32 0.06 0.43 0.31 0.28 0.18 0.16 0.22 0.35 0.46 0.27]
Accuracy of DenseNet[ 0.42 0.36 0.39 0.43 0.55 0.

0.49 0.12 0.08 0.35 0.01 0.58 0.39 0.46 -0.05 0.37 0.34 0.06 0.05 0.44]

Accuracy of EfficientNet[ 0.1 0.21 0.17 0.12 0.28 0.25 0.11 0.01 0.09 0.12 0.21 0.3 0.11 0.23 0.18 0.21 0.05 0.12 0.07 0.1 ]71

Bar chart to box plot
➢ Comparison of the average values.
➢ That’s it. Not so much informative.

➢ By a box plot, we can see more
information with the same space!

➢ With error bars, we can see the variation of values.
➢ More informative with the same space (area)72

Bar chart to box plot
➢ Comparison of the average values.
➢ That’s it. Not so much informative.

➢ By a box plot, we can see more
information with the same space!

➢ With error bars, we can see the variation of values.
➢ More informative with the same space (area)73

Bar chart to box plot
➢ Comparison of the average values.
➢ That’s it. Not so much informative.

➢ By a box plot, we can see more
information with the same space!

➢ With error bars, we can see the variation of values.
➢ More informative with the same space (area)74

Box plot
OutlierMaximum

75th percentile
MedianMinimum

Average (optional)
25th percentile

Outlier area

1.5 * IQR
IQR(Interquartile range)
1.5 * IQR

75

Box plot
With a box plot, we canknow min/max!

A weakness of the box plot: itgets messy with lots of outliers.
M. Streit and N. Gehlenborg, “Bar charts and box plots”, Nature Methods, 2014. https://www.nature.com/articles/nmeth.2807

76

Violin plot?
Can be found in the seaborn package➢ A violin plot is considered as a more sophisticated visualization.
➢ We can visualize the distribution itself.
➢ I personally don’t recommend a violin plot much.

77

Violin plot: bad points➢ A violin plot automatically generates (interpolates) the distribution.
➢ It is dangerous, especially when #data is not enough.

Data: [1.0, 2.0]
What is thiscurve?
➢ The reviewers may not understand the violin plot anyway.
78

Violin plot: good points➢ If the data is bi-modal or multi-modal, a violin plot is the only option.
Data: [10.1, 9.9, 10.1, 9.8, 10.2, 10.0, 20.1, 20.2, 20.0, 19.9, 20.1]

We can see
two peaks???
79

Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc80

Control parameter➢ It often happens that we would like to show the two line-plots withthe same control parameter.

81

Control parameter➢ It often happens that we would like to show the two line-plots withthe same control parameter.
Inverse of runtime. Higher is better.

Accuracy. Higher is better.
➢ HNSW seems more accurate but slower.
➢ Can we know more information from these?

Control parameter 𝑇

82

Control parameter83

Control parameter➢ Informative plot with a less space!
➢ Trade-off between the two curves.

Strongly recommend plotting acontrol parameter for each dot!

Depending on the context, one may evaluate
the curve by AUC (area under the curve)

Runtime of NSG suddenly drops
around R@1=0.7
84Control parameter➢ Informative plot with a less space!
➢ Trade-off between the two curves.

for x, y, ctrl in zip(xs, ys, ctrls):
plt.annotate(text=f"T={ctrl}", xy=(x, y), xytext=(x, y+5))
Strongly recommend plotting acontrol parameter for each dot!

Depending on the context, one may evaluate
the curve by AUC (area under the curve)

Runtime of NSG suddenly drops
around R@1=0.785Precision-recall curve has the same structure
One dot is obtained by setting one parameter(e.g., top-k in the context of retrieval)

https://scikit-learn.org/stable/auto_examples/model_selection/plot_precision_recall.html

86Tables➢ Basics➢ Row-oriented structure➢ Row grouping➢ Row hierarchization➢ Column hierarchization➢ Partial horizontal line
(cmidrule)➢ Column to row➢ Flowchart

Plots➢ Basics➢ Bar chart to box plot
➢ Control parameter➢ Misc87

Put the grid on a logarithmic graphplt.grid(which="both")

Not clear yscale is log

Yscale is log!

88

Legend➢ The order of the methods in the legend should match the lines asmuch as possible.
OK!

NO!

89

Don’t use dangerous charts

Pie charts

Radar charts

3D bar charts

But recent LLM papers like radar charts….
https://matplotlib.org/stable/gallery/pie_and_polar_charts/pie_features.html#sphx-glr-gallery-pie-and-polar-charts-pie-features-py
https://en.wikipedia.org/wiki/Radar_chart
https://www.forbes.com/sites/naomirobbins/2012/06/07/trellis-plot-alternative-to-three-dimensional-bar-charts/?sh=7ed6126d7dab

90

Continuous parameter or discrete labels➢ Don’t draw a line for data of discrete labels.
➢ NO!
What is the meaning of these lines?
➢ When you draw a line, ask yourself: “Is there
any meaning between the dots?”91

What should we do to improve our paper?
➢ Do good research✓
Yes, of course! But we know it takes time.

➢ Improve a writing skill.
✓
Yes, of course! But we know it takes time.
➢ Improve English (if you’re a non-native English speaker).
✓
Yes, of course! But we know it takes time.
➢ Improve equations/tables/plots.
✓
This won't take much time – study for a few days andyou'll master it. So go ahead and do it!
92Schedule
Date (2024)

Contents

Presented by

Week 1, Apr 10

Introduction. Review of fundamental concepts

Yusuke, Koya, Yuki, Jun

Week 2, Apr 17

Equations and pseudo-codes

Yusuke Matsui

Week 3, Apr 24

Presentation

Koya Narumi

Week 4, May 1

Tables and plots

Yusuke Matsui

Week 5, May 8

Figures

Koya Narumi

Week 6, May 22

VideosKoya Narumi

Week 7, May 29

Invited Talk 1

Dr. Yoshiaki Bando (AIST)

Week 8, June 5

Invited Talk 2

Prof. Katie Seaborn (Tokyo Tech)

Week 9, June 12

GitHub in depth

Yusuke Matsui

Week 10, June 19

Automation of research and research
dissemination (Web, Cloud, CI/CD)

Jun Kato

Week 11, June 26

Research community

Jun Kato

Week 12, July 3

3DCG illustrations

Yuki Koyama

Week 13, July 10

Final presentations-

93