[exercises] add a plotting task to logicalindexing exercise

This commit is contained in:
2018-10-22 17:26:11 +02:00
parent c2dfa9ab47
commit ab562915e1
2 changed files with 36 additions and 14 deletions

View File

@@ -191,19 +191,20 @@ the data was changed or the same kind of plot has to be created for a
number of datasets.
\begin{important}[Why manual editing should be avoided.]
On first glance the manual editing of a figure using common tools
like Corel draw, Illustrator, etc.\,appears some much more
convenient and less complex. This, however, is not entirely
true. What if the figure has to be re-drawn or updated? Then the
editing work starts all over again. Rather, there is a great risk
associated with this approach. Axes are shifted, fonts have not been
embedded into the final document, annotations have been copy pasted
between figures and are not valid. All of these mistakes can be
found in publications and then require an erratum, which is not
On first glance the manual editing of a figure using tools such as
Corel draw, Illustrator, etc.\,appears much more convenient and less
complex than coding everything into the analysis scripts. This,
however, is not entirely true. What if the figure has to be re-drawn
or updated? Then the editing work starts all over again. Rather,
there is a great risk associated with the manual editing
approach. Axes may be shifted, fonts have not been embedded into the
final document, annotations have been copy pasted between figures
and are not valid. All of these mistakes can be found in
publications and then require an erratum, which is not
desirable. Even if it appears more cumbersome in the beginning one
should always try to create publication-ready figures directly from
the data analysis tool using scripts or functions to properly
layout the plot.
the data analysis tool using scripts or functions to properly layout
the plot.
\end{important}
\subsection{Simple plotting}
@@ -259,6 +260,12 @@ additional options consult the help.
\end{tabular}
\end{table}
The following listing shows a simple line plot with axis labeling and a title
\lstinputlisting[caption={A simple plot showing a sinewave.},
label=niceplotlisting]{simple_plot.m}
\subsection{Changing properties of a line plot}
The properties of line plots can be changed by passing more arguments