diff --git a/demo/demo.tex b/demo/demo.tex index 9bf64d0e..276012a3 100644 --- a/demo/demo.tex +++ b/demo/demo.tex @@ -1,6 +1,8 @@ \documentclass[10pt]{beamer} \usetheme{moloch} +\AtEndPreamble{\pgfplotsset{compat=1.15}} +\usefonttheme{professionalfonts} \usepackage{appendixnumberbeamer} \usepackage{booktabs} @@ -17,7 +19,6 @@ \date{\today} \author{Matthias Vogelgesang} \institute{Center for modern beamer themes} -% \titlegraphic{\hfill\includegraphics[height=1.5cm]{logo.pdf}} \begin{document} @@ -212,48 +213,13 @@ \section{Elements} \end{exampleblock} \end{frame} + \begin{frame}{Math} \begin{equation*} e = \lim_{n\to \infty} \left(1 + \frac{1}{n}\right)^n \end{equation*} \end{frame} -\begin{frame}{Line plots} - \begin{figure} - \begin{tikzpicture} - \begin{axis}[ - mlineplot, - width=0.9\textwidth, - height=6cm, - ] - - \addplot {sin(deg(x))}; - \addplot+[samples=100] {sin(deg(2*x))}; - \end{axis} - \end{tikzpicture} - \end{figure} -\end{frame} -\begin{frame}{Bar charts} - \begin{figure} - \begin{tikzpicture} - \begin{axis}[ - mbarplot, - xlabel={Foo}, - ylabel={Bar}, - width=0.9\textwidth, - height=6cm, - ] - - \addplot plot coordinates {(1, 20) (2, 25) (3, 22.4) (4, 12.4)}; - \addplot plot coordinates {(1, 18) (2, 24) (3, 23.5) (4, 13.2)}; - \addplot plot coordinates {(1, 10) (2, 19) (3, 25) (4, 15.2)}; - - \legend{lorem, ipsum, dolor} - - \end{axis} - \end{tikzpicture} - \end{figure} -\end{frame} \begin{frame}{Quotes} \begin{quote} Veni, Vidi, Vici diff --git a/doc/moloch.tex b/doc/moloch.tex index ccd3389a..fa11168c 100644 --- a/doc/moloch.tex +++ b/doc/moloch.tex @@ -367,47 +367,6 @@ \subsubsection{Standout frames} \end{frame} \end{lstlisting} - - -\section{\texttt{pgfplots} integration} - -\themename comes with a set of pre-defined pgfplots styles and a color theme -based on Paul Tol's color scheme. - - -\subsection{Styles} - -Pass the following style keys to the axis environment to get the appropriate -effect: - -\begin{macro}{mlineplot} - Plot regular line charts with reduced axis frames, less intrusive legend and - subdued grid. -\end{macro} -\begin{macro}{mbarplot} - Plot vertical bar charts in a similar way as |mlineplot| but reduce grid usage. -\end{macro} -\begin{macro}{horizontal mbarplot} - Plot horizontal bar charts. -\end{macro} -\begin{macro}{disable thousands separator} - Helper style to remove thousands separator. -\end{macro} - - -\subsection{Paul Tol colors} - -A good presentation uses colors that are distinct from each other as much as -possible as well as from black and white, can be discerned item under different -lighting and display environments and by color-blind viewers, while matching -well together. - -In a \href{https://personal.sron.nl/~pault/data/colourschemes.pdf}{technical note} -for SRON, Paul Tol proposed a palette of colors satisfying these constraints. -The sub-package |pgfplotsthemetol| defines palettes for |pgfplots| charts -based on Tol's work. - - \section{Tips \& Tricks} \subsection{Backup Slides} @@ -568,6 +527,5 @@ \section{Implementation} \DocInput{beamerouterthememoloch.dtx} \DocInput{beamerfontthememoloch.dtx} \DocInput{beamercolorthememoloch.dtx} -\DocInput{pgfplotsthemetol.dtx} \end{document} diff --git a/src/beamerthememoloch.dtx b/src/beamerthememoloch.dtx index dda96e3e..07835e65 100644 --- a/src/beamerthememoloch.dtx +++ b/src/beamerthememoloch.dtx @@ -146,18 +146,6 @@ \usefonttheme{moloch} % \end{macrocode} % -% The |tol| theme for |pgfplots| is only loaded if |pgfplots| is used. -% -% \begin{macrocode} -\AtEndPreamble{% - \@ifpackageloaded{pgfplots}{% - \RequirePackage{pgfplotsthemetol} - }{} -} -% \end{macrocode} -% -% -% % \subsubsection{Custom commands} % % The parent theme defines custom commands as their proper usage may depend diff --git a/src/beamerthememoloch.ins b/src/beamerthememoloch.ins index 39402915..c7d3c3ef 100644 --- a/src/beamerthememoloch.ins +++ b/src/beamerthememoloch.ins @@ -25,6 +25,5 @@ \generate{\file{beamerouterthememoloch.sty}{\from{beamerouterthememoloch.dtx}{package}}} \generate{\file{beamerfontthememoloch.sty}{\from{beamerfontthememoloch.dtx}{package}}} \generate{\file{beamercolorthememoloch.sty}{\from{beamercolorthememoloch.dtx}{package}}} -\generate{\file{pgfplotsthemetol.sty}{\from{pgfplotsthemetol.dtx}{package}}} \endbatchfile diff --git a/src/pgfplotsthemetol.dtx b/src/pgfplotsthemetol.dtx deleted file mode 100644 index 275324ec..00000000 --- a/src/pgfplotsthemetol.dtx +++ /dev/null @@ -1,189 +0,0 @@ -% \iffalse meta-comment ------------------------------------------------------- -% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of -% contributors can be found at -% -% https://github.com/matze/mtheme/graphs/contributors -% -% and these colors were inspired by the Paul Tol 21-color Salute by Peter Carl. -% -% http://www.r-bloggers.com/the-paul-tol-21-color-salute/ -% -% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 -% International License (https://creativecommons.org/licenses/by-sa/4.0/). -% ------------------------------------------------------------------------- \fi -% \iffalse -% \ProvidesFile{pgfplotsthemetol.dtx} -%<*package> -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{pgfplotsthemetol}[2024-01-12 v0.1.0 PGFplots colors based on Paul Tol's SRON technical note] % x-release-please-version -% -% \documentclass{ltxdoc} -% \usepackage{pgfplotsthemetol} -% \begin{document} -% \DocInput{pgfplotsthemetol.dtx} -% \end{document} -% \fi -% \CheckSum{0} -% \StopEventually{} -% \iffalse -%<*package> -% ------------------------------------------------------------------------- \fi -% -% \subsection{Tol \texttt{pgfplots} theme} -% -% Paul Tol's 12-color palette\footnote{Tol actually describes several -% palettes; these colours are taken from the bottom row of Figure 3 in his -% technical note.} is as follows: -% -% \begin{macrocode} -\definecolor{TolDarkPurple}{HTML}{332288} -\definecolor{TolDarkBlue}{HTML}{6699CC} -\definecolor{TolLightBlue}{HTML}{88CCEE} -\definecolor{TolLightGreen}{HTML}{44AA99} -\definecolor{TolDarkGreen}{HTML}{117733} -\definecolor{TolDarkBrown}{HTML}{999933} -\definecolor{TolLightBrown}{HTML}{DDCC77} -\definecolor{TolDarkRed}{HTML}{661100} -\definecolor{TolLightRed}{HTML}{CC6677} -\definecolor{TolLightPink}{HTML}{AA4466} -\definecolor{TolDarkPink}{HTML}{882255} -\definecolor{TolLightPurple}{HTML}{AA4499} -% \end{macrocode} -% -% To use these colors, we describe ``cycle lists'' from which PGF chooses -% styles for the different series in a chart. -% -% \begin{macro}{mbarplot cycle} -% Colors and styles intended for bar charts with up to 12 series. -% -% \begin{macrocode} -\pgfplotscreateplotcyclelist{mbarplot cycle}{% - {draw=TolDarkBlue, fill=TolDarkBlue!70}, - {draw=TolLightBrown, fill=TolLightBrown!70}, - {draw=TolLightGreen, fill=TolLightGreen!70}, - {draw=TolDarkPink, fill=TolDarkPink!70}, - {draw=TolDarkPurple, fill=TolDarkPurple!70}, - {draw=TolDarkRed, fill=TolDarkRed!70}, - {draw=TolDarkBrown, fill=TolDarkBrown!70}, - {draw=TolLightRed, fill=TolLightRed!70}, - {draw=TolLightPink, fill=TolLightPink!70}, - {draw=TolLightPurple, fill=TolLightPurple!70}, - {draw=TolLightBlue, fill=TolLightBlue!70}, - {draw=TolDarkGreen, fill=TolDarkGreen!70}, -} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{mlineplot cycle} -% Colors and styles intended for line charts with up to 4 series. -% \begin{macrocode} -\pgfplotscreateplotcyclelist{mlineplot cycle}{% - {TolDarkBlue, mark=*, mark size=1.5pt}, - {TolLightBrown, mark=square*, mark size=1.3pt}, - {TolLightGreen, mark=triangle*, mark size=1.5pt}, - {TolDarkBrown, mark=diamond*, mark size=1.5pt}, -} -% \end{macrocode} -% \end{macro} -% -% However, the above cycle lists are not applied automatically. We still need -% to define styles --- |mlineplot| and |mbarplot| --- that the user can apply -% to the axis of a |pgfplots| chart to use the colors. We'll also take the -% opportunity to adjust the display of chart axes when these styles are used. -% -% \begin{macrocode} -\pgfplotsset{ - compat=1.9, - % \end{macrocode} - % - % \begin{macro}{mlineplot} - % A style to apply to the axis of a PGF line plot. - % \begin{macrocode} - mlineplot/.style={ - mbaseplot, - xmajorgrids=true, - ymajorgrids=true, - major grid style={dotted}, - axis x line=bottom, - axis y line=left, - legend style={ - cells={anchor=west}, - draw=none - }, - cycle list name=mlineplot cycle, - }, - % \end{macrocode} - % \end{macro} - % \begin{macro}{mbarplot} - % \begin{macro}{horizontal mbarplot} - % A style to apply to the axis of a PGF bar chart. |mbarplot| uses vertical - % bars by default, while |horizontal mbarplot| has horizontal bars as the - % name implies. Their shared properties are factored out into the internal - % style |mbarplot base|. - % - % \begin{macrocode} - mbarplot base/.style={ - mbaseplot, - bar width=6pt, - axis y line*=none, - }, - mbarplot/.style={ - mbarplot base, - ybar, - xmajorgrids=false, - ymajorgrids=true, - area legend, - legend image code/.code={% - \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm); - }, - cycle list name=mbarplot cycle, - }, - horizontal mbarplot/.style={ - mbarplot base, - xmajorgrids=true, - ymajorgrids=false, - xbar stacked, - area legend, - legend image code/.code={% - \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm); - }, - cycle list name=mbarplot cycle, - }, - % \end{macrocode} - % \end{macro} - % \end{macro} - % \begin{macro}{mbaseplot} - % Adjusts the appearance of the axes in a PGF chart. - % \begin{macrocode} - mbaseplot/.style={ - legend style={ - draw=none, - fill=none, - cells={anchor=west}, - }, - x tick label style={ - font=\footnotesize - }, - y tick label style={ - font=\footnotesize - }, - legend style={ - font=\footnotesize - }, - major grid style={ - dotted, - }, - axis x line*=bottom, - }, - disable thousands separator/.style={ - /pgf/number format/.cd, - 1000 sep={} - }, -} -% \end{macrocode} -% \end{macro} -% \iffalse -% -% \fi -% \Finale -\endinput