| 1 |
% Copyright 2018 by Till Tantau |
| 2 |
% |
| 3 |
% This file may be distributed and/or modified |
| 4 |
% |
| 5 |
% 1. under the LaTeX Project Public License and/or |
| 6 |
% 2. under the GNU Free Documentation License. |
| 7 |
% |
| 8 |
% See the file doc/generic/pgf/licenses/LICENSE for more details. |
| 9 |
|
| 10 |
|
| 11 |
\section{Guidelines on Graphics} |
| 12 |
|
| 13 |
The present section is not about \pgfname\ or \tikzname, but about general |
| 14 |
guidelines and principles concerning the creation of graphics for scientific |
| 15 |
presentations, papers, and books. |
| 16 |
|
| 17 |
The guidelines in this section come from different sources. Many of them are |
| 18 |
just what I would like to claim is ``common sense'', some reflect my personal |
| 19 |
experience (though, hopefully, not my personal preferences), some come from |
| 20 |
books (the bibliography is still missing, sorry) on graphic design and |
| 21 |
typography. The most influential source are the brilliant books by Edward |
| 22 |
Tufte. While I do not agree with everything written in these books, many of |
| 23 |
Tufte's arguments are so convincing that I decided to repeat them in the |
| 24 |
following guidelines. |
| 25 |
|
| 26 |
The first thing you should ask yourself when someone presents a bunch of |
| 27 |
guidelines is: Should I really follow these guidelines? This is an important |
| 28 |
question, because there are good reasons not to follow general guidelines. The |
| 29 |
person who set up the guidelines may have had other objectives than you do. For |
| 30 |
example, a guideline might say ``use the color red for emphasis''. While this |
| 31 |
guideline makes perfect sense for, say, a presentation using a projector, red |
| 32 |
``color'' has the \emph{opposite} effect of ``emphasis'' when printed using a |
| 33 |
black-and-white printer. Guidelines were almost always set up to address a |
| 34 |
specific situation. If you are not in this situation, following a guideline can |
| 35 |
do more harm than good. |
| 36 |
|
| 37 |
The second thing you should be aware of is the basic rule of typography is: |
| 38 |
``Every rule can be broken, as long as you are \emph{aware} that you are |
| 39 |
breaking a rule.'' This rule also applies to graphics. Phrased differently, the |
| 40 |
basic rule states: ``The only mistakes in typography are things done in |
| 41 |
ignorance.'' When you are aware of a rule and when you decide that breaking the |
| 42 |
rule has a desirable effect, break the rule. |
| 43 |
|
| 44 |
|
| 45 |
\subsection{Planning the Time Needed for the Creation of Graphics} |
| 46 |
|
| 47 |
When you create a paper with numerous graphics, the time needed to create these |
| 48 |
graphics becomes an important factor. How much time should you calculate for |
| 49 |
the creation of graphics? |
| 50 |
|
| 51 |
As a general rule, assume that a graphic will need as much time to create as |
| 52 |
would a text of the same length. For example, when I write a paper, I need |
| 53 |
about one hour per page for the first draft. Later, I need between two and four |
| 54 |
hours per page for revisions. Thus, I expect to need about half an hour for the |
| 55 |
creation of \emph{a first draft} of a half page graphic. Later on, I expect |
| 56 |
another one to two hours before the final graphic is finished. |
| 57 |
|
| 58 |
In many publications, even in good journals, the authors and editors have |
| 59 |
obviously invested a lot of time on the text, but seem to have spend about |
| 60 |
five minutes to create all of the graphics. Graphics often seem to have been |
| 61 |
added as an ``afterthought'' or look like a screen shot of whatever the |
| 62 |
authors's statistical software shows them. As will be argued later on, the |
| 63 |
graphics that programs like \textsc{gnuplot} produce by default are of poor |
| 64 |
quality. |
| 65 |
|
| 66 |
Creating informative graphics that help the reader and that fit together with |
| 67 |
the main text is a difficult, lengthy process. |
| 68 |
% |
| 69 |
\begin{itemize} |
| 70 |
\item Treat graphics as first-class citizens of your papers. They deserve |
| 71 |
as much time and energy as the text does. Indeed, the creation of |
| 72 |
graphics might deserve \emph{even more} time than the writing of the |
| 73 |
main text since more attention will be paid to the graphics and they |
| 74 |
will be looked at first. |
| 75 |
\item Plan as much time for the creation and revision of a graphic as you |
| 76 |
would plan for text of the same size. |
| 77 |
\item Difficult graphics with a high information density may require even |
| 78 |
more time. |
| 79 |
\item Very simple graphics will require less time, but most likely you do |
| 80 |
not want to have ``very simple graphics'' in your paper, anyway; just |
| 81 |
as you would not like to have a ``very simple text'' of the same |
| 82 |
size. |
| 83 |
\end{itemize} |
| 84 |
|
| 85 |
|
| 86 |
\subsection{Workflow for Creating a Graphic} |
| 87 |
|
| 88 |
When you write a (scientific) paper, you will most likely follow the following |
| 89 |
pattern: You have some results/ideas that you would like to report about. The |
| 90 |
creation of the paper will typically start with compiling a rough outline. |
| 91 |
Then, the different sections are filled with text to create a first draft. This |
| 92 |
draft is then revised repeatedly until, often after substantial revision, a |
| 93 |
final paper results. In a good journal paper there is typically not be a single |
| 94 |
sentence that has survived unmodified from the first draft. |
| 95 |
|
| 96 |
Creating a graphics follows the same pattern: |
| 97 |
% |
| 98 |
\begin{itemize} |
| 99 |
\item Decide on what the graphic should communicate. Make this a |
| 100 |
conscious decision, that is, determine ``What is the graphic supposed |
| 101 |
to tell the reader?'' |
| 102 |
\item Create an ``outline'', that is, the rough overall ``shape'' of the |
| 103 |
graphic, containing the most crucial elements. Often, it is useful to |
| 104 |
do this using pencil and paper. |
| 105 |
\item Fill out the finer details of the graphic to create a first draft. |
| 106 |
\item Revise the graphic repeatedly along with the rest of the paper. |
| 107 |
\end{itemize} |
| 108 |
|
| 109 |
|
| 110 |
\subsection{Linking Graphics With the Main Text} |
| 111 |
|
| 112 |
Graphics can be placed at different places in a text. Either, they can be |
| 113 |
inlined, meaning they are somewhere ``in the middle of the text'' or they can |
| 114 |
be placed in stand-alone ``figures''. Since printers (the people) like to have |
| 115 |
their pages ``filled'', (both for aesthetic and economic reasons) stand-alone |
| 116 |
figures may traditionally be placed on pages in the document far away from the |
| 117 |
main text that refers to them. \LaTeX\ and \TeX\ tend to encourage this |
| 118 |
``drifting away'' of graphics for technical reasons. |
| 119 |
|
| 120 |
When a graphic is inlined, it will more or less automatically be linked with |
| 121 |
the main text in the sense that the labels of the graphic will be implicitly |
| 122 |
explained by the surrounding text. Also, the main text will typically make it |
| 123 |
clear what the graphic is about and what is shown. |
| 124 |
|
| 125 |
Quite differently, a stand-alone figure will often be viewed at a time when the |
| 126 |
main text that this graphic belongs to either has not yet been read or has been |
| 127 |
read some time ago. For this reason, you should follow the following guidelines |
| 128 |
when creating stand-alone figures: |
| 129 |
% |
| 130 |
\begin{itemize} |
| 131 |
\item Stand-alone figures should have a caption than should make them |
| 132 |
``understandable by themselves''. |
| 133 |
|
| 134 |
For example, suppose a graphic shows an example of the different |
| 135 |
stages of a quicksort algorithm. Then the figure's caption should, at |
| 136 |
the very least, inform the reader that ``the figure shows the |
| 137 |
different stages of the quicksort algorithm introduced on page xyz''. |
| 138 |
and not just ``Quicksort algorithm''. |
| 139 |
\item A good caption adds as much context information as possible. For |
| 140 |
example, you could say: ``The figure shows the different stages of |
| 141 |
the quicksort algorithm introduced on page xyz. In the first line, |
| 142 |
the pivot element 5 is chosen. This causes\dots'' While this |
| 143 |
information can also be given in the main text, putting it in the |
| 144 |
caption will ensure that the context is kept. Do not feel afraid of a |
| 145 |
5-line caption. (Your editor may hate you for this. Consider hating |
| 146 |
them back.) |
| 147 |
\item Reference the graphic in your main text as in ``for an example of |
| 148 |
quicksort `in action', see Figure~2.1 on page xyz''. |
| 149 |
\item Most books on style and typography recommend that you do not use |
| 150 |
abbreviations as in ``Fig.~2.1'' but write ``Figure~2.1''. |
| 151 |
|
| 152 |
The main argument against abbreviations is that ``a period is too |
| 153 |
valuable to waste it on an abbreviation''. The idea is that a period |
| 154 |
will make the reader assume that the sentence ends after ``Fig'' and |
| 155 |
it takes a ``conscious backtracking'' to realize that the sentence |
| 156 |
did not end after all. |
| 157 |
|
| 158 |
The argument in favor of abbreviations is that they save space. |
| 159 |
|
| 160 |
Personally, I am not really convinced by either argument. On the one |
| 161 |
hand, I have not yet seen any hard evidence that abbreviations slow |
| 162 |
readers down. On the other hand, abbreviating all ``Figure'' by |
| 163 |
``Fig.'' is most unlikely to save even a single line in most documents. |
| 164 |
I avoid abbreviations. |
| 165 |
\end{itemize} |
| 166 |
|
| 167 |
|
| 168 |
\subsection{Consistency Between Graphics and Text} |
| 169 |
|
| 170 |
Perhaps the most common ``mistake'' people do when creating graphics (remember |
| 171 |
that a ``mistake'' in design is always just ``ignorance'') is to have a |
| 172 |
mismatch between the way their graphics look and the way their text looks. |
| 173 |
|
| 174 |
It is quite common that authors use several different programs for creating the |
| 175 |
graphics of a paper. An author might produce some plots using \textsc{gnuplot}, |
| 176 |
a diagram using \textsc{xfig}, and include an |.eps| graphic a coauthor |
| 177 |
contributed using some unknown program. All these graphics will, most likely, |
| 178 |
use different line widths, different fonts, and have different sizes. In |
| 179 |
addition, authors often use options like |[height=5cm]| when including graphics |
| 180 |
to scale them to some ``nice size''. |
| 181 |
|
| 182 |
If the same approach were taken to writing the main text, every section would |
| 183 |
be written in a different font at a different size. In some sections all |
| 184 |
theorems would be underlined, in another they would be printed all in uppercase |
| 185 |
letters, and in another in red. In addition, the margins would be different on |
| 186 |
each page. Readers and editors would not tolerate a text if it were written in |
| 187 |
this fashion, but with graphics they often have to. |
| 188 |
|
| 189 |
To create consistency between graphics and text, stick to the following |
| 190 |
guidelines: |
| 191 |
% |
| 192 |
\begin{itemize} |
| 193 |
\item Do not scale graphics. |
| 194 |
|
| 195 |
This means that when generating graphics using an external program, |
| 196 |
create them ``at the right size''. |
| 197 |
\item Use the same font(s) both in graphics and the body text. |
| 198 |
\item Use the same line width in text and graphics. |
| 199 |
|
| 200 |
The ``line width'' for normal text is the width of the stem of letters |
| 201 |
like T{}. For \TeX, this is usually $0.4\,\mathrm{pt}$. However, some |
| 202 |
journals will not accept graphics with a normal line width below |
| 203 |
$0.5\,\mathrm{pt}$. |
| 204 |
\item When using colors, use a consistent color coding in the text and in |
| 205 |
graphics. For example, if red is supposed to alert the reader to |
| 206 |
something in the main text, use red also in graphics for important |
| 207 |
parts of the graphic. If blue is used for structural elements like |
| 208 |
headlines and section titles, use blue also for structural elements |
| 209 |
of your graphic. |
| 210 |
|
| 211 |
However, graphics may also use a logical intrinsic color |
| 212 |
coding. For example, no matter what colors you normally use, readers |
| 213 |
will generally assume, say, that the color green as ``positive, go, |
| 214 |
ok'' and red as ``alert, warning, action''. |
| 215 |
\end{itemize} |
| 216 |
|
| 217 |
Creating consistency when using different graphic programs is almost |
| 218 |
impossible. For this reason, you should consider sticking to a single graphics |
| 219 |
program. |
| 220 |
|
| 221 |
|
| 222 |
\subsection{Labels in Graphics} |
| 223 |
|
| 224 |
Almost all graphics will contain labels, that is, pieces of text that explain |
| 225 |
parts of the graphics. When placing labels, stick to the following guidelines: |
| 226 |
% |
| 227 |
\begin{itemize} |
| 228 |
\item Follow the rule of consistency when placing labels. You should do |
| 229 |
so in two ways: First, be consistent with the main text, that is, use |
| 230 |
the same font as the main text also for labels. Second, be consistent |
| 231 |
between labels, that is, if you format some labels in some particular |
| 232 |
way, format all labels in this way. |
| 233 |
\item In addition to using the same fonts in text and graphics, you |
| 234 |
should also use the same notation. For example, if you write $1/2$ in |
| 235 |
your main text, also use ``$1/2$'' as labels in graphics, not |
| 236 |
``0.5''. A $\pi$ is a ``$\pi$'' and not ``$3.141$''. Finally, |
| 237 |
$\mathrm e^{-\mathrm i \pi}$ is ``$\mathrm e^{-\mathrm i \pi}$'', not |
| 238 |
``$-1$'', let alone ``-1''. |
| 239 |
\item Labels should be legible. They should not only have a reasonably |
| 240 |
large size, they also should not be obscured by lines or other text. |
| 241 |
This also applies to labels of lines and text \emph{behind} the |
| 242 |
labels. |
| 243 |
\item Labels should be ``in place''. Whenever there is enough space, |
| 244 |
labels should be placed next to the thing they label. Only if |
| 245 |
necessary, add a (subdued) line from the label to the labeled object. |
| 246 |
Try to avoid labels that only reference explanations in external |
| 247 |
legends. Reader have to jump back and forth between the explanation and |
| 248 |
the object that is described. |
| 249 |
\item Consider subduing ``unimportant'' labels using, for example, a gray |
| 250 |
color. This will keep the focus on the actual graphic. |
| 251 |
\end{itemize} |
| 252 |
|
| 253 |
|
| 254 |
\subsection{Plots and Charts} |
| 255 |
|
| 256 |
One of the most frequent kind of graphics, especially in scientific papers, are |
| 257 |
\emph{plots}. They come in a large variety, including simple line plots, |
| 258 |
parametric plots, three dimensional plots, pie charts, and many more. |
| 259 |
|
| 260 |
Unfortunately, plots are notoriously hard to get right. Partly, the default |
| 261 |
settings of programs like \textsc{gnuplot} or Excel are to blame for this since |
| 262 |
these programs make it very convenient to create bad plots. |
| 263 |
|
| 264 |
The first question you should ask yourself when creating a plot is: Are there |
| 265 |
enough data points to merit a plot? If the answer is ``not really'', use a |
| 266 |
table. |
| 267 |
|
| 268 |
A typical situation where a plot is unnecessary is when people present a few |
| 269 |
numbers in a bar diagram. Here is a real-life example: At the end of a seminar |
| 270 |
a lecturer asked the participants for feedback. Of the 50 participants, 30 |
| 271 |
returned the feedback form. According to the feedback, three participants |
| 272 |
considered the seminar ``very good'', nine considered it ``good'', ten ``ok'', |
| 273 |
eight ``bad'', and no one thought that the seminar was ``very bad''. |
| 274 |
|
| 275 |
A simple way of summing up this information is the following table: |
| 276 |
|
| 277 |
\medskip |
| 278 |
\begin{tabular}{lp{3.75cm}r} |
| 279 |
\emph{Rating given} & \raggedright\emph{Participants (out of 50) who gave this rating} & |
| 280 |
\emph{Percentage} \\[1.75em] |
| 281 |
``very good'' & \hfil\hphantom{0}3\hfil & \hphantom{0}6\% \\ |
| 282 |
``good'' & \hfil\hphantom{0}9\hfil & 18\% \\ |
| 283 |
``ok'' & \hfil10\hfil & 20\% \\ |
| 284 |
``bad'' & \hfil\hphantom{0}8\hfil & 16\% \\ |
| 285 |
``very bad'' & \hfil\hphantom{0}0\hfil & \hphantom{0}0\% \\[2mm] |
| 286 |
none & \hfil20\hfil & 40\% \\ |
| 287 |
\end{tabular} |
| 288 |
|
| 289 |
\bigskip |
| 290 |
What the lecturer did was to visualize the data using a 3D bar diagram. It |
| 291 |
looked like this (except that in reality the numbers where typeset using some |
| 292 |
extremely low-resolution bitmap font and were near-unreadable): |
| 293 |
|
| 294 |
\bigskip |
| 295 |
\par |
| 296 |
\begin{tikzpicture}[y=0.03cm,z=3mm] |
| 297 |
\foreach \y in {0,20,40,60,80,100} |
| 298 |
\draw[dashed] (0,\y,0) node[left] {\y} -- (0,\y,1) -- (6,\y,1); |
| 299 |
|
| 300 |
\draw (0,0,0) -- (0,100,0) (0,0,1) -- (0,100,1); |
| 301 |
\draw (0,0,0) -- (6,0,0); |
| 302 |
|
| 303 |
\foreach \x/\xtext/\height in {1/very good/10,2/good/30,3/ok/33,4/bad/27,5/very bad/0} |
| 304 |
{ |
| 305 |
\draw (\x,0) node[rotate=90,anchor=east] {\xtext}; |
| 306 |
|
| 307 |
\begin{scope}[xshift=\x cm] |
| 308 |
|
| 309 |
\filldraw[fill=blue!50] (-.3,0,0) rectangle (.3,\height,0); |
| 310 |
\filldraw[fill=blue!30] (.3,0,0) -- (.3,0,1) -- (.3,\height,1) -- (.3,\height,0) --cycle; |
| 311 |
\filldraw[fill=blue!20] (-.3,\height,0) -- (.3,\height,0) -- |
| 312 |
(.3,\height,1) -- (-.3,\height,1) --cycle; |
| 313 |
\end{scope} |
| 314 |
} |
| 315 |
\end{tikzpicture} |
| 316 |
\bigskip |
| 317 |
|
| 318 |
Both the table and the ``plot'' have about the same size. If your first thought |
| 319 |
is ``the graphic looks nicer than the table'', try to answer the following |
| 320 |
questions based on the information in the table or in the graphic: |
| 321 |
% |
| 322 |
\begin{enumerate} |
| 323 |
\item How many participants were there? |
| 324 |
\item How many participants returned the feedback form? |
| 325 |
\item What percentage of the participants returned the feedback form? |
| 326 |
\item How many participants checked ``very good''? |
| 327 |
\item What percentage out of all participants checked ``very good''? |
| 328 |
\item Did more than a quarter of the participants check ``bad'' or ``very |
| 329 |
bad''? |
| 330 |
\item What percentage of the participants that returned the form checked |
| 331 |
``very good''? |
| 332 |
\end{enumerate} |
| 333 |
|
| 334 |
Sadly, the graphic does not allow us to answer \emph{a single one of these |
| 335 |
questions}. The table answers all of them directly, except for the last one. In |
| 336 |
essence, the information density of the graphic is very close to zero. The |
| 337 |
table has a much higher information density; despite the fact that it uses |
| 338 |
quite a lot of white space to present a few numbers. Here is the list of things |
| 339 |
that went wrong with the 3D-bar diagram: |
| 340 |
% |
| 341 |
\begin{itemize} |
| 342 |
\item The whole graphic is dominated by irritating background lines. |
| 343 |
\item It is not clear what the numbers at the left mean; presumably |
| 344 |
percentages, but it might also be the absolute number of |
| 345 |
participants. |
| 346 |
\item The labels at the bottom are rotated, making them hard to read. |
| 347 |
|
| 348 |
(In the real presentation that I saw, the text was rendered at a very |
| 349 |
low resolution with about 10 by 6 pixels per letter with wrong |
| 350 |
kerning, making the rotated text almost impossible to read.) |
| 351 |
\item The third dimension adds complexity to the graphic without adding |
| 352 |
information. |
| 353 |
\item The three dimensional setup makes it much harder to gauge the |
| 354 |
height of the bars correctly. Consider the ``bad'' bar. Is the number |
| 355 |
this bar stands for more than 20 or less? While the front of the bar |
| 356 |
is below the 20 line, the back of the bar (which counts) is above. |
| 357 |
\item It is impossible to tell which numbers are represented by the |
| 358 |
bars. Thus, the bars needlessly hide the information these bars are |
| 359 |
all about. |
| 360 |
\item What do the bar heights add up to? Is it 100\% or 60\%? |
| 361 |
\item Does the bar for ``very bad'' represent 0 or~1? |
| 362 |
\item Why are the bars blue? |
| 363 |
\end{itemize} |
| 364 |
|
| 365 |
You might argue that in the example the exact numbers are not important for the |
| 366 |
graphic. The important things is the ``message'', which is that there are more |
| 367 |
``very good'' and ``good'' ratings than ``bad'' and ``very bad''. However, to |
| 368 |
convey this message either use a sentence that says so or use a graphic that |
| 369 |
conveys this message more clearly: |
| 370 |
|
| 371 |
\medskip |
| 372 |
\par |
| 373 |
\begin{tikzpicture} |
| 374 |
\colorlet{good}{green!75!black} |
| 375 |
\colorlet{bad}{red} |
| 376 |
\colorlet{neutral}{black!60} |
| 377 |
\colorlet{none}{white} |
| 378 |
|
| 379 |
\node[align=center,text width=3cm]{Ratings given by 50~participants}; |
| 380 |
|
| 381 |
\begin{scope}[line width=4mm,rotate=270] |
| 382 |
\draw[good] (-123:2cm) arc (-123:-101:2cm); |
| 383 |
\draw[good!60!white] (-36:2cm) arc (-36:-101:2cm); |
| 384 |
\draw[neutral] (-36:2cm) arc (-36:36:2cm); |
| 385 |
\draw[bad!60!white] (36:2cm) arc (36:93:2cm); |
| 386 |
|
| 387 |
\newcount\mycount |
| 388 |
\foreach \angle in {0,72,...,3599} |
| 389 |
{ |
| 390 |
\mycount=\angle\relax |
| 391 |
\divide\mycount by 10\relax |
| 392 |
\draw[black!15,thick] (\the\mycount:18mm) -- (\the\mycount:22mm); |
| 393 |
} |
| 394 |
|
| 395 |
\draw (0:2.2cm) node[below] {``ok'': 10 (20\%)}; |
| 396 |
\draw (165:2.2cm) node[above] {none: 20 (40\%)}; |
| 397 |
\draw (-111:2.2cm) node[left] {``very good'': 3 (6\%)}; |
| 398 |
\draw (-68:2.2cm) node[left] {``good'': 9 (18\%)}; |
| 399 |
\draw (65:2.2cm) node[right] {``bad'': 8 (16\%)}; |
| 400 |
\draw (93:2.2cm) node[right] {``very bad'': 0 (0\%)}; |
| 401 |
\end{scope} |
| 402 |
\draw[gray] (0,0) circle (2.2cm) circle (1.8cm); |
| 403 |
\end{tikzpicture} |
| 404 |
|
| 405 |
\bigskip |
| 406 |
The above graphic has about the same information density as the table (about |
| 407 |
the same size and the same numbers are shown). In addition, one can directly |
| 408 |
``see'' that there are more good or very good ratings than bad ones. One can |
| 409 |
also ``see'' that the number of people who gave no rating at all is not |
| 410 |
negligible, which is quite common for feedback forms. |
| 411 |
|
| 412 |
Charts are not always a good idea. Let us look at an example that I redrew from |
| 413 |
a pie chart in \emph{Die Zeit}, June 4th, 2005: |
| 414 |
|
| 415 |
\bigskip |
| 416 |
\par |
| 417 |
\begin{tikzpicture} |
| 418 |
\begin{scope}[xscale=3.2,yscale=1.2] |
| 419 |
|
| 420 |
\sffamily |
| 421 |
\coordinate (right border) at (2.0cm,-1.7cm); |
| 422 |
\coordinate (left border) at (-2.5cm,2.1cm); |
| 423 |
|
| 424 |
\fill[black!25] ([xshift=-2mm,yshift=1.1cm]left border) rectangle ([xshift=2mm,yshift=-.3cm]right border); |
| 425 |
|
| 426 |
\node[below right,text width=10cm,inner sep=0pt] at ([yshift=.9cm,xshift=-1mm]left border) |
| 427 |
{ {\color{black!75} \Large Kohle ist am wichtigsten}\\ |
| 428 |
Energiemix bei der deutschen Stromerzeugung 2004}; |
| 429 |
|
| 430 |
\filldraw[draw=gray,fill=white] ([xshift=-1mm]left border) node[below right,black] |
| 431 |
{\footnotesize Gesamte Netto-Stromerzeugung in Prozent, in |
| 432 |
Milliarden Kilowattstunden (Mrd.\ kWh)} |
| 433 |
rectangle ([xshift=1mm]right border); |
| 434 |
|
| 435 |
% The 3D stuff |
| 436 |
\pgfdeclarehorizontalshading{zeit}{100bp} |
| 437 |
{color(0pt)=(black); |
| 438 |
color(25bp)=(black); |
| 439 |
color(37bp)=(white); |
| 440 |
color(50bp)=(black); |
| 441 |
color(62bp)=(white); |
| 442 |
color(75bp)=(black); |
| 443 |
color(100bp)=(black)} |
| 444 |
|
| 445 |
\shadedraw[very thin,shading=zeit,yshift=-1.5mm] (0,0) circle (1cm); |
| 446 |
|
| 447 |
\fill[green!20!gray] (0,0) -- (90:1cm) arc (90:-5:1cm); |
| 448 |
\fill[white!20!gray] (0,0) -- (-5:1cm) arc (-5:-105:1cm); |
| 449 |
\fill[orange!20!gray] (0,0) -- (-105:1cm) arc (-105:-180:1cm); |
| 450 |
\fill[orange!60!white] (0,0) -- (180:1cm) arc (180:150:1cm); |
| 451 |
\fill[black!75!white] (0,0) -- (150:1cm) arc (150:145:1cm); |
| 452 |
\fill[blue!90!white] (0,0) -- (145:1cm) arc (145:135:1cm); |
| 453 |
\fill[blue!50!white] (0,0) -- (135:1cm) arc (135:92:1cm); |
| 454 |
\fill[yellow!50!black] (0,0) -- (92:1cm) arc (92:90:1cm); |
| 455 |
|
| 456 |
\begin{scope}[very thin] |
| 457 |
\draw (0,0) -- (90:1cm); |
| 458 |
\draw (0,0) -- (-5:1cm); |
| 459 |
\draw (0,0) -- (-105:1cm); |
| 460 |
\draw (0,0) -- (-180:1cm); |
| 461 |
\draw (0,0) -- (150:1cm); |
| 462 |
\draw (0,0) -- (145:1cm); |
| 463 |
\draw (0,0) -- (135:1cm); |
| 464 |
\draw (0,0) -- (92:1cm); |
| 465 |
|
| 466 |
\draw(0,0) circle (1cm); |
| 467 |
\end{scope} |
| 468 |
|
| 469 |
\node (Regenerative) at (115:.75cm) {\bfseries 9,4\%}; |
| 470 |
\node (Kernenergie) at (30:.5cm) {\bfseries 27,8\%}; |
| 471 |
\node (Braunkohle) at (-45:.6cm) {\bfseries 25,6\%}; |
| 472 |
\node (Steinkohle) at (-135:.6cm) {\bfseries 22,3\%}; |
| 473 |
\node (Erdgas) at (168:.75cm) {\bfseries 10,4\%}; |
| 474 |
\coordinate (Mineral) at (147:.9cm); |
| 475 |
\coordinate (Sonstige) at (140:.9cm); |
| 476 |
|
| 477 |
\small |
| 478 |
\draw (Regenerative.north) |- ([yshift=.25cm]Regenerative.north -| right border) coordinate (Regenerative label); |
| 479 |
\draw (91:.9cm) |- (Regenerative label); |
| 480 |
\node[above left] at (Regenerative label) {Regenerative\ |
| 481 |
{\footnotesize (53,7 kWh)/davon} Wind \textbf{4,4\%} \footnotesize (25,0 kWh)}; |
| 482 |
|
| 483 |
\draw (Kernenergie.base east) -- (Kernenergie.base east -| right border) coordinate (Kernenergie label); |
| 484 |
\node[above left] at (Kernenergie label) {Kernenergie}; |
| 485 |
\node[below left] at (Kernenergie label) {\footnotesize (158,4 kWh)}; |
| 486 |
|
| 487 |
\draw (Braunkohle.south) |- ([yshift=-.75cm]Braunkohle.south -| right border) coordinate (Braunkohle label); |
| 488 |
\node[above left] at (Braunkohle label) {Braunkohle\ \ \footnotesize (146,0 kWh)}; |
| 489 |
|
| 490 |
\draw (Steinkohle.south) |- ([yshift=-.75cm]Steinkohle.south -| left border) coordinate (Steinkohle label); |
| 491 |
\node[above right] at (Steinkohle label) {Steinkohle\ \ \footnotesize (127,1 kWh)}; |
| 492 |
|
| 493 |
\draw (Erdgas.base west) -- (Erdgas.base west -| left border) coordinate (Erdgas label); |
| 494 |
\node[above right] at (Erdgas label) {Erdgas\ \ \footnotesize (59,2 kWh)}; |
| 495 |
|
| 496 |
\draw (Mineral) -- (Mineral -| left border) coordinate (Mineral label); |
| 497 |
\node[above right] at (Mineral label) {Mineral\"olprodukte\ \ |
| 498 |
\footnotesize (9,2 kWh) \ \ \normalsize\textbf{1,6\%}}; |
| 499 |
|
| 500 |
\draw (Sonstige) |- (Regenerative label -| left border) coordinate (Sonstige label); |
| 501 |
\node[above right] at (Sonstige label) {Sonstige\ \ |
| 502 |
\footnotesize (16,5 kWh) \hskip1.5cm\ |
| 503 |
\normalsize\textbf{2,9\%}}; |
| 504 |
\end{scope} |
| 505 |
\end{tikzpicture} |
| 506 |
|
| 507 |
This graphic has been redrawn in \tikzname, but the original looks almost |
| 508 |
exactly the same. |
| 509 |
|
| 510 |
At first sight, the graphic looks ``nice and informative'', but there are a lot |
| 511 |
of things that went wrong: |
| 512 |
% |
| 513 |
\begin{itemize} |
| 514 |
\item The chart is three dimensional. However, the shadings add nothing |
| 515 |
``information-wise'', at best, they distract. |
| 516 |
\item In a 3D-pie-chart the relative sizes are very strongly distorted. |
| 517 |
For example, the area taken up by the gray color of ``Braunkohle'' is |
| 518 |
larger than the area taken up by the green color of ``Kernenergie'' |
| 519 |
\emph{despite the fact that the percentage of Braunkohle is less than |
| 520 |
the percentage of Kernenergie}. |
| 521 |
\item The 3D-distortion gets worse for small areas. The area of |
| 522 |
``Regenerative'' somewhat larger than the area of ``Erdgas''. The |
| 523 |
area of ``Wind'' is slightly smaller than the area of |
| 524 |
``Mineral\"olprodukte'' \emph{although the percentage of Wind is |
| 525 |
nearly three times larger than the percentage of |
| 526 |
Mineral\"olprodukte.} |
| 527 |
|
| 528 |
In the last case, the different sizes are only partly due to |
| 529 |
distortion. The designer(s) of the original graphic have also made |
| 530 |
the ``Wind'' slice too small, even taking distortion into |
| 531 |
account. (Just compare the size of ``Wind'' to ``Regenerative'' in |
| 532 |
general.) |
| 533 |
\item According to its caption, this chart is supposed to inform us that |
| 534 |
coal was the most important energy source in Germany in 2004. |
| 535 |
Ignoring the strong distortions caused by the superfluous and |
| 536 |
misleading 3D-setup, it takes quite a while for this message to get |
| 537 |
across. |
| 538 |
|
| 539 |
Coal as an energy source is split up into two slices: one for |
| 540 |
``Steinkohle'' and one for ``Braunkohle'' (two different kinds of |
| 541 |
coal). When you add them up, you see that the whole lower half of |
| 542 |
the pie chart is taken up by coal. |
| 543 |
|
| 544 |
The two areas for the different kinds of coal are not visually |
| 545 |
linked at all. Rather, two different colors are used, the labels are |
| 546 |
on different sides of the graphic. By comparison, ``Regenerative'' |
| 547 |
and ``Wind'' are very closely linked. |
| 548 |
\item The color coding of the graphic follows no logical pattern at all. |
| 549 |
Why is nuclear energy green? Regenerative energy is light blue, |
| 550 |
``other sources'' are blue. It seems more like a joke that the area |
| 551 |
for ``Braunkohle'' (which literally translates to ``brown coal'') is |
| 552 |
stone gray, while the area for ``Steinkohle'' (which literally |
| 553 |
translates to ``stone coal'') is brown. |
| 554 |
\item The area with the lightest color is used for ``Erdgas''. This area |
| 555 |
stands out most because of the brighter color. However, for this |
| 556 |
chart ``Erdgas'' is not really important at all. |
| 557 |
\end{itemize} |
| 558 |
% |
| 559 |
Edward Tufte calls graphics like the above ``chart junk''. (I am happy to |
| 560 |
announce, however, that \emph{Die Zeit} has stopped using 3D pie charts and |
| 561 |
their information graphics have got somewhat better.) |
| 562 |
|
| 563 |
Here are a few recommendations that may help you avoid producing chart junk: |
| 564 |
% |
| 565 |
\begin{itemize} |
| 566 |
\item Do not use 3D pie charts. They are \emph{evil}. |
| 567 |
\item Consider using a table instead of a pie chart. |
| 568 |
\item Do not apply colors randomly; use them to direct the readers's |
| 569 |
focus and to group things. |
| 570 |
\item Do not use background patterns, like a crosshatch or diagonal |
| 571 |
lines, instead of colors. They distract. Background patterns in |
| 572 |
information graphics are \emph{evil}. |
| 573 |
\end{itemize} |
| 574 |
|
| 575 |
|
| 576 |
\subsection{Attention and Distraction} |
| 577 |
|
| 578 |
Pick up your favorite fiction novel and have a look at a typical page. You will |
| 579 |
notice that the page is very uniform. Nothing is there to distract the reader |
| 580 |
while reading; no large headlines, no bold text, no large white areas. Indeed, |
| 581 |
even when the author does wish to emphasize something, this is done using |
| 582 |
italic letters. Such letters blend nicely with the main text -- at a distance |
| 583 |
you will not be able to tell whether a page contains italic letters, but you |
| 584 |
would notice a single bold word immediately. The reason novels are typeset this |
| 585 |
way is the following paradigm: Avoid distractions. |
| 586 |
|
| 587 |
Good typography (like good organization) is something you do \emph{not} notice. |
| 588 |
The job of typography is to make reading the text, that is, ``absorbing'' its |
| 589 |
information content, as effortless as possible. For a novel, readers absorb the |
| 590 |
content by reading the text line-by-line, as if they were listening to someone |
| 591 |
telling the story. In this situation anything on the page that distracts the |
| 592 |
eye from going quickly and evenly from line to line will make the text harder |
| 593 |
to read. |
| 594 |
|
| 595 |
Now, pick up your favorite weekly magazine or newspaper and have a look at a |
| 596 |
typical page. You will notice that there is quite a lot ``going on'' on the |
| 597 |
page. Fonts are used at different sizes and in different arrangements, the text |
| 598 |
is organized in narrow columns, typically interleaved with pictures. The reason |
| 599 |
magazines are typeset in this way is another paradigm: Steer attention. |
| 600 |
|
| 601 |
Readers will not read a magazine like a novel. Instead of reading a magazine |
| 602 |
line-by-line, we use headlines and short abstracts to check whether we want to |
| 603 |
read a certain article or not. The job of typography is to steer our attention |
| 604 |
to these abstracts and headlines, first. Once we have decided that we want to |
| 605 |
read an article, however, we no longer tolerate distractions, which is why the |
| 606 |
main text of articles is typeset exactly the same way as a novel. |
| 607 |
|
| 608 |
The two principles ``avoid distractions'' and ``steer attention'' also apply to |
| 609 |
graphics. When you design a graphic, you should eliminate everything that will |
| 610 |
``distract the eye''. At the same time, you should try to actively help the |
| 611 |
reader ``through the graphic'' by using fonts/colors/line widths to highlight |
| 612 |
different parts. |
| 613 |
|
| 614 |
Here is a non-exhaustive list of things that can distract readers: |
| 615 |
% |
| 616 |
\begin{itemize} |
| 617 |
\item Strong contrasts will always be registered first by the eye. For |
| 618 |
example, consider the following two grids: |
| 619 |
|
| 620 |
\medskip\par |
| 621 |
\begin{tikzpicture}[x=40pt,y=40pt] |
| 622 |
\draw[step=10pt,gray] (0,0) grid +(1,1); |
| 623 |
\draw[step=2pt] (2,0) grid +(1,1); |
| 624 |
\end{tikzpicture} |
| 625 |
|
| 626 |
\medskip |
| 627 |
Even though the left grid comes first in English reading order, the |
| 628 |
right one is much more likely to be seen first: The white-to-black |
| 629 |
contrast is higher than the gray-to-white contrast. In addition, |
| 630 |
there are more ``places'' adding to the overall contrast in the right |
| 631 |
grid. |
| 632 |
|
| 633 |
Things like grids and, more generally, help lines usually should not |
| 634 |
grab the attention of the readers and, hence, should be typeset with |
| 635 |
a low contrast to the background. Also, a loosely-spaced grid is less |
| 636 |
distracting than a very closely-spaced grid. |
| 637 |
\item Dashed lines create many points at which there is black-to-white |
| 638 |
contrast. Dashed or dotted lines can be very distracting and, hence, |
| 639 |
should be avoided in general. |
| 640 |
|
| 641 |
Do not use different dashing patterns to differentiate curves in |
| 642 |
plots. You lose data points this way and the eye is not particularly |
| 643 |
good at ``grouping things according to a dashing pattern''. The eye |
| 644 |
is \emph{much} better at grouping things according to colors. |
| 645 |
\item Background patterns filling an area using diagonal lines or |
| 646 |
horizontal and vertical lines or just dots are almost always |
| 647 |
distracting and, usually, serve no real purpose. |
| 648 |
\item Background images and shadings distract and only seldom add |
| 649 |
anything of importance to a graphic. |
| 650 |
\item Cute little clip arts can easily draw attention away from the data. |
| 651 |
\end{itemize} |