diff --git a/programming/lectures/images/badbarleft.png b/programming/lectures/images/badbarleft.png new file mode 100644 index 0000000..667e029 Binary files /dev/null and b/programming/lectures/images/badbarleft.png differ diff --git a/programming/lectures/images/badbarplot.jpg b/programming/lectures/images/badbarplot.jpg new file mode 100644 index 0000000..f9327de Binary files /dev/null and b/programming/lectures/images/badbarplot.jpg differ diff --git a/programming/lectures/images/badbarright.png b/programming/lectures/images/badbarright.png new file mode 100644 index 0000000..22f32dc Binary files /dev/null and b/programming/lectures/images/badbarright.png differ diff --git a/programming/lectures/images/comparison_properly_improperly_graph.png b/programming/lectures/images/comparison_properly_improperly_graph.png new file mode 100644 index 0000000..eaae9c2 Binary files /dev/null and b/programming/lectures/images/comparison_properly_improperly_graph.png differ diff --git a/programming/lectures/images/histogram.png b/programming/lectures/images/histogram.png new file mode 100755 index 0000000..8eaaa88 Binary files /dev/null and b/programming/lectures/images/histogram.png differ diff --git a/programming/lectures/images/histogrambad.png b/programming/lectures/images/histogrambad.png new file mode 100755 index 0000000..3ce2c65 Binary files /dev/null and b/programming/lectures/images/histogrambad.png differ diff --git a/programming/lectures/images/histogrambad2.png b/programming/lectures/images/histogrambad2.png new file mode 100755 index 0000000..a11dc47 Binary files /dev/null and b/programming/lectures/images/histogrambad2.png differ diff --git a/programming/lectures/images/improperly_scaled_graph.png b/programming/lectures/images/improperly_scaled_graph.png new file mode 100644 index 0000000..ac99274 Binary files /dev/null and b/programming/lectures/images/improperly_scaled_graph.png differ diff --git a/programming/lectures/images/line_graph1.png b/programming/lectures/images/line_graph1.png new file mode 100644 index 0000000..afce7a1 Binary files /dev/null and b/programming/lectures/images/line_graph1.png differ diff --git a/programming/lectures/images/line_graph1_3.png b/programming/lectures/images/line_graph1_3.png new file mode 100644 index 0000000..3a4a528 Binary files /dev/null and b/programming/lectures/images/line_graph1_3.png differ diff --git a/programming/lectures/images/line_graph1_4.png b/programming/lectures/images/line_graph1_4.png new file mode 100644 index 0000000..d13e30f Binary files /dev/null and b/programming/lectures/images/line_graph1_4.png differ diff --git a/programming/lectures/images/misleading_pie.png b/programming/lectures/images/misleading_pie.png new file mode 100644 index 0000000..3dae0cd Binary files /dev/null and b/programming/lectures/images/misleading_pie.png differ diff --git a/programming/lectures/images/nobelbad.png b/programming/lectures/images/nobelbad.png new file mode 100644 index 0000000..4602b7c Binary files /dev/null and b/programming/lectures/images/nobelbad.png differ diff --git a/programming/lectures/images/one_d_problem_c.pdf b/programming/lectures/images/one_d_problem_c.pdf new file mode 100644 index 0000000..31974db Binary files /dev/null and b/programming/lectures/images/one_d_problem_c.pdf differ diff --git a/programming/lectures/images/properly_scaled_graph.png b/programming/lectures/images/properly_scaled_graph.png new file mode 100644 index 0000000..1a5de32 Binary files /dev/null and b/programming/lectures/images/properly_scaled_graph.png differ diff --git a/programming/lectures/images/sample_pie.png b/programming/lectures/images/sample_pie.png new file mode 100644 index 0000000..937a231 Binary files /dev/null and b/programming/lectures/images/sample_pie.png differ diff --git a/programming/lectures/plotting_spike_trains.tex b/programming/lectures/plotting_spike_trains.tex index cb85c51..13d9e06 100644 --- a/programming/lectures/plotting_spike_trains.tex +++ b/programming/lectures/plotting_spike_trains.tex @@ -86,6 +86,8 @@ \end{flushright} } +\newcommand{\code}[1]{\texttt{#1}} + \input{../../latex/environments.tex} \makeatother @@ -103,11 +105,259 @@ \begin{enumerate} \item Graphische Darstellung von Daten \item Spiketrain Analyse - \item \"Ubungen, \"Ubungen, \"Ubungen. \end{enumerate} \end{frame} +\begin{frame}[plain] + \huge{1. Graphische Darstellung von Daten}\pause + \begin{figure} + \includegraphics[width=0.9\columnwidth]{images/convincing} + \end{figure} +\end{frame} + +\begin{frame} + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Was soll ein Datenplot erreichen?} + + \begin{itemize} + \item Ist eine m\"oglichst neutrale Darstellung der Daten. + \item Soll dem Leser die Daten greifbar machen und die Aussagen der + Analyse darstellen. + \item Erlaubt dem Leser die gezeigten Effekte selbst zu beguachten + und zu validieren. + \item Muss vollst\"andig annotiert sein. + \item Folgt dem Prinzip der \textbf{ink minimization}. (Das + Verh\"altnis aus Tinte, die f\"ur die Darstellung der Daten + gebraucht wird und der Menge Tinte, die f\"ur die Graphik + ben\"otigt wird sollte m\"oglichst gro{\ss} sein ) + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Was sollte vermieden werden?} + + \begin{itemize} + \item Suggestive oder gar fehlleitende Darstellung. + \item Ablenkung durch unruhige oder \"uberm\"a{\ss}ige Effekte. + \item Comicartige Effekte... + \end{itemize}\pause + \begin{figure} + \includegraphics[width=0.35\columnwidth]{images/one_d_problem_c} + \end{figure}\pause + ... aus{\ss}er sie werden rein zur Illustration benutzt ohne einen + Anspruch auf Richtigkeit zu erheben. +\end{frame} + +\begin{frame} + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Suboptimale Beispiele} + \only <1> { + \begin{figure} + \includegraphics[width=0.5\columnwidth]{images/nobelbad} + \end{figure} + \vspace{0.25cm} + Aus Hafting et al., Nature, 2005 + } + \only <2> { + \begin{figure} + \includegraphics[width=0.7\columnwidth]{images/misleading_pie} + \end{figure} + \vspace{0.5cm} + \url{https://en.wikipedia.org/wiki/Misleading_graph} + } + \only <3> { + \begin{figure} + \includegraphics[width=0.7\columnwidth]{images/sample_pie} + \end{figure} + \vspace{0.5cm} + \url{https://en.wikipedia.org/wiki/Misleading_graph} + } + \only <4> { + \begin{figure} + \includegraphics[width=0.4\columnwidth]{images/badbarright} + \end{figure} + \vspace{0.5cm} + \url{https://en.wikipedia.org/wiki/Misleading_graph} + } + \only <5> { + \begin{figure} + \includegraphics[width=0.4\columnwidth]{images/badbarleft} + \end{figure} + \vspace{0.5cm} + \url{https://en.wikipedia.org/wiki/Misleading_graph} + } + \only <6> { + \begin{figure} + \includegraphics[width=0.8\columnwidth]{images/badbarplot} + \end{figure} + \vspace{0.5cm} + \url{https://en.wikipedia.org/wiki/Misleading_graph} + } + \only <7> { + Wahl der Zeichenfl\"ache kann den visuellen Eindruck beeinflu{\ss}en. + \begin{columns} + \begin{column}{4.cm} + \begin{figure} + \includegraphics[width=0.7\columnwidth]{images/line_graph1} + \end{figure} + \end{column} + + \begin{column}{4.cm} + \begin{figure} + \includegraphics[width=0.7\columnwidth]{images/line_graph1_3} + \end{figure} + \end{column} + + \begin{column}{4.cm} + \begin{figure} + \includegraphics[width=0.7\columnwidth]{images/line_graph1_4} + \end{figure} + \end{column} + \end{columns} + \vspace{0.5cm} + \url{https://en.wikipedia.org/wiki/Misleading_graph} + } + \only <8> { + Vorsicht bei der Skalierung von Symbolen! + \begin{columns} + \begin{column}{4.cm} + \begin{figure} + \includegraphics[width=0.7\columnwidth]{images/improperly_scaled_graph} + \end{figure} + \end{column} + + \begin{column}{4.cm} + \begin{figure} + \includegraphics[width=0.7\columnwidth]{images/properly_scaled_graph} + \end{figure} + \end{column} + + \begin{column}{4.cm} + \begin{figure} + \includegraphics[width=0.7\columnwidth]{images/comparison_properly_improperly_graph} + \end{figure} + \end{column} + \end{columns} + \vspace{0.5cm} + \url{https://en.wikipedia.org/wiki/Misleading_graph} + } +\end{frame} + +\begin{frame}[fragile] + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Plotting Interfaces in Matlab} + Es gibt zwei Wege Graphen zu bearbeiten: + \begin{enumerate} + \item Interaktiv \"uber das \textit{graphische User Interface}\pause + \item Die Kommandozeile bzw. in Skripten und Funktionen.\pause + \end{enumerate} + Beides hat seine Berechtigung und seine eigenen Vor- und Nachteile. Welche? +\end{frame} + + +\begin{frame} + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Ver\"anderung des Graphen \"uber die Kommandozeile} + \begin{itemize} + \item Erstellt ein Skript, dass einen Plot erstellt. + \item Dieser soll zwei Sinus unterschiedlicher Frequenz darstellen. + \end{itemize} + Wir werden jetzt die Kommandozeil bzw. das Skript verbessern um den + Plot ``sch\"oner'' zu machen. +\end{frame} + + +\begin{frame} + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Ver\"anderung des Graphen \"uber die Kommandozeile} + \begin{enumerate} + \item Einstellungen der Linienplots: + \begin{itemize} + \item St\"arke und Farbe. + \item Linienstil, Marker. + \end{itemize}\pause + \item Achsbeschriftung: + \begin{itemize} + \item \code{xlabel}, \code{ylabel}. + \item Schriftart und Gr\"o{\ss}e. + \end{itemize}\pause + \item Achsenskalierung und Ticks: + \begin{itemize} + \item Skalierung der Achsen (Minumum und Maxmimum, logarithmisch oder linear). + \item Manuelles Setzen der Ticks, ihrer Richtung und Beschriftung. + \item Grid or no Grid? + \end{itemize}\pause + \item Setzen von globalen Parametern: + \begin{itemize} + \item Einstellung der Papiergr\"o{\ss}e und plzieren der + Zeichenfl\"ache. + \item Box oder nicht? + \item Speichern der Abbildung als pdf. + \end{itemize} + \end{enumerate} +\end{frame} + + +\begin{frame} [fragile] + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Ver\"andern von Eigenschaften \"uber die Kommandozeile} + \vspace{-0.75em} + \scriptsize + \begin{lstlisting} +fig = figure(); +set(gcf, 'PaperUnits', 'centimeters', 'PaperSize', [11.7 9.0]); +set(gcf, 'PaperPosition',[0.0 0.0 11.7 9.0], 'Color', 'white') +hold on +plot(time, neuronal_data, 'color', [ 0.2 0.5 0.7], 'linewidth', 1.) +plot(spike_times, ones(size(spike_times))*threshold, 'ro', 'markersize', 4) +line([time(1) time(end)], [threshold threshold], 'linestyle', '--', + 'linewidth', 0.75, 'color', [0.9 0.9 0.9]) +ylim([0 35]) +xlim([0 2.25]) +box('off') +xlabel('time [s]', 'fontname', 'MyriadPro-Regular', 'fontsize', 10) +ylabel('potential [mV]', 'fontname', 'MyriadPro-Regular', 'fontsize', 10) +title('pyramidal cell', 'fontname', 'MyriadPro-Regular', 'fontsize', 12) +set(gca, 'TickDir','out', 'linewidth', 1.5, 'fontname', 'MyriadPro-Regular') +saveas(fig, 'spike_detection.pdf', 'pdf') +\end{lstlisting} +\end{frame} + + +\begin{frame} [fragile] + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Ver\"andern von Eigenschaften \"uber die Kommandozeile} + \begin{figure} + \centering + \includegraphics[width=0.75\columnwidth]{./images/spike_detection} + \end{figure} +\end{frame} + + +\begin{frame} [fragile] + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Welche Art Plot wof\"ur?} + \url{http://www.mathworks.de/discovery/gallery.html} +\end{frame} + + +\begin{frame} [fragile] + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Was macht einen guten Abbildung aus?} + \begin{enumerate} + \item Klarheit. + \item Vollstaendige Beschriftung. + \item Deutliche Unterscheidbarkeit von Kurven. + \item Keine suggestive Darstellung. + \item Ausgewogenheit von Linienst\"arken Schrift- und Plotgr\"o{\ss}e. + \item Vermeidung von Suggestiven Darstellungen. + \item Fehlerbalken, wenn sie angebracht sind. + \end{enumerate} +\end{frame} + + \begin{frame}[plain] \huge{2. Spiketrain Analyse I} \end{frame}