diff --git a/programming/lectures/data_structures.tex b/programming/lectures/data_structures.tex index b6ba252..fc29185 100644 --- a/programming/lectures/data_structures.tex +++ b/programming/lectures/data_structures.tex @@ -97,8 +97,100 @@ \titlepage % erzeugt Titelseite \end{frame} + \begin{frame}[plain] -\huge{1. Fortgeschrittene Datenstrukturen} +\huge{1. Graphische Darstellung von Daten} +\end{frame} + + +\begin{frame} [fragile] + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Was macht einen guten Plot aus?} + \begin{figure} + \centering + \includegraphics[width=0.9\columnwidth]{./images/convincing} + \end{figure} +\end{frame} + + +\begin{frame} [fragile] + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Was macht einen guten Plot 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. + \end{enumerate} + \begin{columns} + \begin{column}{4cm} + \begin{figure} + \includegraphics[width=0.9\columnwidth]{./images/bad_1.pdf} + \end{figure} + \end{column} + \begin{column}{4cm} + \begin{figure} + \includegraphics[width=0.9\columnwidth]{./images/bad_2.pdf} + \end{figure} + \end{column} + \begin{column}{4cm} + \begin{figure} + \includegraphics[width=0.9\columnwidth]{./images/bad_3.pdf} + \end{figure} + \end{column} + \end{columns} +\end{frame} + + +\begin{frame}[fragile] + \frametitle{Graphische Darstellung von Daten} + \framesubtitle{Plotting Interface} + Es gibt zwei Wege Graphen zu bearbeiten: + \begin{enumerate} + \item \"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} [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{Welche Art Plot wof\"ur?} + \url{http://www.mathworks.de/discovery/gallery.html} +\end{frame} + + + +\begin{frame}[plain] +\huge{2. Fortgeschrittene Datenstrukturen} \end{frame} \begin{frame} @@ -315,10 +407,43 @@ \framesubtitle{Tabellen} \scriptsize \begin{lstlisting} + data = tabelread('spreadsheet.xlsx'); + + % Anzahl Reihen + height(data) + + % Anzahl Spalten + width(data) + + % Zugriff auf eine Spalte ueber den Namen + data.name + % Auswahl mittels logischem Indexing + data.name(data.alter < 25); + \end{lstlisting} \end{frame} +\begin{frame} + \frametitle{Fortgeschrittene Datenstrukturen} + \framesubtitle{Tabellen} + \textbf{Vorteile:} + \begin{enumerate} + \item Sehr gut geeignet f\"ur Tabellenartige Daten. + \item Sehr intuitive Darstellung. + \item Bequemes Speichern und Laden solange Standardformate benutzt + werden. + \end{enumerate} + \pause + \vspace{1cm} + \textbf{Nachteile:} + \begin{enumerate} + \item Alle Spalten m\"ussen gleich gross sein. + \item Erfordert, sich auf ein Matlab eher untypisches Konzept einzulassen. + \item Komplexe Datenformate sind nicht einfach zu lesen (generelles + Matlab String parsing problem). + \end{enumerate} +\end{frame} \end{document} \ No newline at end of file diff --git a/programming/lectures/images/bad_1.pdf b/programming/lectures/images/bad_1.pdf new file mode 100644 index 0000000..d7c1a63 Binary files /dev/null and b/programming/lectures/images/bad_1.pdf differ diff --git a/programming/lectures/images/bad_2.pdf b/programming/lectures/images/bad_2.pdf new file mode 100644 index 0000000..f53f9e5 Binary files /dev/null and b/programming/lectures/images/bad_2.pdf differ diff --git a/programming/lectures/images/bad_3.pdf b/programming/lectures/images/bad_3.pdf new file mode 100644 index 0000000..0044d66 Binary files /dev/null and b/programming/lectures/images/bad_3.pdf differ diff --git a/programming/lectures/plotting_spike_trains.tex b/programming/lectures/plotting_spike_trains.tex index e9377d0..cb85c51 100644 --- a/programming/lectures/plotting_spike_trains.tex +++ b/programming/lectures/plotting_spike_trains.tex @@ -107,90 +107,6 @@ \end{enumerate} \end{frame} -\begin{frame}[plain] -\huge{1. Graphische Darstellung von Daten} -\end{frame} - - -\begin{frame}[fragile] - \frametitle{Graphische Darstellung von Daten} - \framesubtitle{Plotting Interface} - Es gibt zwei Wege Graphen zu bearbeiten: - \begin{enumerate} - \item Klickibunti \"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} [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 Plot aus?} - \begin{figure} - \centering - \includegraphics[width=0.9\columnwidth]{./images/convincing} - \end{figure} -\end{frame} - - -\begin{frame} [fragile] - \frametitle{Graphische Darstellung von Daten} - \framesubtitle{Was macht einen guten Plot 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. - \end{enumerate} -\end{frame} - - - \begin{frame}[plain] \huge{2. Spiketrain Analyse I}