Compare commits

..

No commits in common. "177f481b7e3a6693a13240379c17308673e00e88" and "45224e1d3bc8699ea17f93c2fc4dab35c88e4e44" have entirely different histories.

2 changed files with 76 additions and 120 deletions

View File

@ -23,7 +23,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Data Manipulation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Graphics & Plotting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -72,17 +72,21 @@
}
}
%
% Styles
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Graphics & Plotting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfplotsset{
fancy marks/.style={
% TODO
}
}
%
% Colors
%
% KIT Colors
\definecolor{kit-green100}{rgb}{0,.59,.51}
\definecolor{kit-green70}{rgb}{.3,.71,.65}
\definecolor{kit-green50}{rgb}{.50,.79,.75}
@ -139,19 +143,6 @@
\colorlet{kit-cyanblue30}{KITcyanblue!30}
\colorlet{kit-cyanblue15}{KITcyanblue!15}
% Matplotlib Colors
\definecolor{Mpl1}{HTML}{1f77b4}
\definecolor{Mpl2}{HTML}{ff7f0e}
\definecolor{Mpl3}{HTML}{2ca02c}
\definecolor{Mpl4}{HTML}{d62728}
\definecolor{Mpl5}{HTML}{9467bd}
\definecolor{Mpl6}{HTML}{8c564b}
\definecolor{Mpl7}{HTML}{e377c2}
\definecolor{Mpl8}{HTML}{7f7f7f}
\definecolor{Mpl9}{HTML}{bcbd22}
\definecolor{Mpl10}{HTML}{17becf}
%
% Color Schemes
%
@ -189,11 +180,6 @@
color=(kit-green70);
color=(kit-yellow70!80!kit-orange70);
},
colormap={matplotlib}{
color=(blue!90!black);
color=(red!20!blue!20);
color=(red!90!black);
}
}
% Define cycle lists
@ -213,11 +199,8 @@
\pgfplotscreateplotcyclelist{cel}{%
[samples of colormap={4} of cel]%
}
\pgfplotscreateplotcyclelist{matplotlib}{%
{Mpl1},{Mpl2},{Mpl3},{Mpl4}
}
% Define 'scolX' colors
% Define individual colors
\makeatletter
@ -236,52 +219,40 @@
\makeatother
\def\setschemecolorsfrommap{
\def\setschemecolors{
\extractcolormapcolor{scol0}{0}
\extractcolormapcolor{scol1}{333}
\extractcolormapcolor{scol2}{666}
\extractcolormapcolor{scol3}{1000}
}
\newcommand{\setschemecolorsmanually}[4]{
\colorlet{scol0}{#1}
\colorlet{scol1}{#2}
\colorlet{scol2}{#3}
\colorlet{scol3}{#4}
}
% Define color schemes
\pgfplotsset{
/pgfplots/colorscheme/cel/.style={
colormap name={cel},
cycle list name={cel},
/utils/exec={\setschemecolorsfrommap},
/pgfplots/colorscheme/mako/.style={
colormap name={mako},
cycle list name={mako},
/utils/exec={\setschemecolors},
},
/pgfplots/colorscheme/rocket/.style={
colormap name={rocket},
cycle list name={rocket},
/utils/exec={\setschemecolorsfrommap},
},
/pgfplots/colorscheme/viridis/.style={
colormap name={viridis},
cycle list name={viridis},
/utils/exec={\setschemecolorsfrommap},
},
/pgfplots/colorscheme/mako/.style={
colormap name={mako},
cycle list name={mako},
/utils/exec={\setschemecolorsfrommap},
/utils/exec={\setschemecolors},
},
/pgfplots/colorscheme/cividis/.style={
colormap name={cividis},
cycle list name={cividis},
/utils/exec={\setschemecolorsfrommap},
/utils/exec={\setschemecolors},
},
/pgfplots/colorscheme/matplotlib/.style={
colormap name={matplotlib},
cycle list name={matplotlib},
/utils/exec={\setschemecolorsmanually{Mpl1}{Mpl2}{Mpl3}{Mpl4}},
/pgfplots/colorscheme/viridis/.style={
colormap name={viridis},
cycle list name={viridis},
/utils/exec={\setschemecolors},
},
/pgfplots/colorscheme/cel/.style={
colormap name={cel},
cycle list name={cel},
/utils/exec={\setschemecolors},
},
}

View File

@ -18,6 +18,7 @@
\input{common.tex}
\pgfplotsset{colorscheme/cel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -25,77 +26,61 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Colorschemes}
\author{}
\date{}
\begin{document}
\maketitle
\foreach \x in {cel, rocket, viridis, mako, cividis, matplotlib}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set colorscheme
\foreach \x in {cel, rocket, viridis, mako, cividis}{
\pgfplotsset{colorscheme/\x}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Preview colorscheme
\colorbox{gray!30}{\texttt{colorscheme/\x}}
\begin{figure}[H]
\centering
\noindent\begin{minipage}{\textwidth}
\colorbox{gray!30}{\texttt{colorscheme/\x}}
\begin{figure}[H]
\centering
\tikzstyle{colornode} = [draw, inner sep=0pt, minimum width=1cm, minimum height=0.5cm]
\pgfplotsset{scaled y ticks=false}
\tikzstyle{colornode} = [draw, inner sep=0pt, minimum width=1cm, minimum height=0.5cm]
\pgfplotsset{scaled y ticks=false}
\begin{subfigure}[c]{0.45\textwidth}
\begin{tikzpicture}
\begin{axis}[
domain=0:10,
view={0}{90},
yticklabel=\empty,xticklabel=\empty,
width=\textwidth,
height=0.75\textwidth,
]
\addplot3+[surf]
{x + y};
\end{axis}
\end{tikzpicture}
\end{subfigure}%
\begin{subfigure}[c]{0.45\textwidth}
\begin{tikzpicture}
\begin{axis}[
domain=0:10,
ymin=-1e4,ymax=1,
legend pos=south west,
yticklabel=\empty,xticklabel=\empty,
width=\textwidth,
height=0.75\textwidth,
]
\foreach \i in {1,2,4,8}{
\addplot+ [mark=none, line width=1pt]
{-\i*exp(x)};
%\expandafter\addlegendentry\expandafter{$e^{-\text{\i} x}$}
\addlegendentryexpanded{$e^{-\i x}$}
}
\end{axis}
\end{tikzpicture}
\end{subfigure}%
\begin{subfigure}[c]{0.1\textwidth}
\begin{tikzpicture}
\node[colornode, fill=scol3] (color3) {};
\node[colornode, fill=scol2, above=1mm of color3] (color2) {};
\node[colornode, fill=scol1, above=1mm of color2] (color1) {};
\node[colornode, fill=scol0, above=1mm of color1] (color0) {};
\end{tikzpicture}
\end{subfigure}%
\end{figure}
\vspace{\parskip}
\end{minipage}
\begin{subfigure}[c]{0.45\textwidth}
\begin{tikzpicture}
\begin{axis}[
domain=0:10,
view={0}{90},
yticklabel=\empty,xticklabel=\empty,
width=\textwidth,
height=0.75\textwidth,
]
\addplot3+[surf]
{x + y};
\end{axis}
\end{tikzpicture}
\end{subfigure}%
\begin{subfigure}[c]{0.45\textwidth}
\begin{tikzpicture}
\begin{axis}[
domain=0:10,
ymin=-1e4,ymax=1,
legend pos=south west,
yticklabel=\empty,xticklabel=\empty,
width=\textwidth,
height=0.75\textwidth,
]
\foreach \i in {1,2,4,8}{
\addplot+ [mark=none, line width=1pt]
{-\i*exp(x)};
%\expandafter\addlegendentry\expandafter{$e^{-\text{\i} x}$}
\addlegendentryexpanded{$e^{-\i x}$}
}
\end{axis}
\end{tikzpicture}
\end{subfigure}%
\begin{subfigure}[c]{0.1\textwidth}
\begin{tikzpicture}
\node[colornode, fill=scol3] (color3) {};
\node[colornode, fill=scol2, above=1mm of color3] (color2) {};
\node[colornode, fill=scol1, above=1mm of color2] (color1) {};
\node[colornode, fill=scol0, above=1mm of color1] (color0) {};
\end{tikzpicture}
\end{subfigure}%
\end{figure}
}