Compare commits
2 Commits
45224e1d3b
...
177f481b7e
| Author | SHA1 | Date | |
|---|---|---|---|
| 177f481b7e | |||
| db20f9c5d6 |
83
common.tex
83
common.tex
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% Graphics & Plotting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
% Data Manipulation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
|
||||||
@ -72,21 +72,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%
|
|
||||||
% Styles
|
|
||||||
%
|
|
||||||
|
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\pgfplotsset{
|
% Graphics & Plotting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
fancy marks/.style={
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% TODO
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
%
|
%
|
||||||
% Colors
|
% Colors
|
||||||
%
|
%
|
||||||
|
|
||||||
|
% KIT Colors
|
||||||
|
|
||||||
\definecolor{kit-green100}{rgb}{0,.59,.51}
|
\definecolor{kit-green100}{rgb}{0,.59,.51}
|
||||||
\definecolor{kit-green70}{rgb}{.3,.71,.65}
|
\definecolor{kit-green70}{rgb}{.3,.71,.65}
|
||||||
\definecolor{kit-green50}{rgb}{.50,.79,.75}
|
\definecolor{kit-green50}{rgb}{.50,.79,.75}
|
||||||
@ -143,6 +139,19 @@
|
|||||||
\colorlet{kit-cyanblue30}{KITcyanblue!30}
|
\colorlet{kit-cyanblue30}{KITcyanblue!30}
|
||||||
\colorlet{kit-cyanblue15}{KITcyanblue!15}
|
\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
|
% Color Schemes
|
||||||
%
|
%
|
||||||
@ -180,6 +189,11 @@
|
|||||||
color=(kit-green70);
|
color=(kit-green70);
|
||||||
color=(kit-yellow70!80!kit-orange70);
|
color=(kit-yellow70!80!kit-orange70);
|
||||||
},
|
},
|
||||||
|
colormap={matplotlib}{
|
||||||
|
color=(blue!90!black);
|
||||||
|
color=(red!20!blue!20);
|
||||||
|
color=(red!90!black);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
% Define cycle lists
|
% Define cycle lists
|
||||||
@ -199,8 +213,11 @@
|
|||||||
\pgfplotscreateplotcyclelist{cel}{%
|
\pgfplotscreateplotcyclelist{cel}{%
|
||||||
[samples of colormap={4} of cel]%
|
[samples of colormap={4} of cel]%
|
||||||
}
|
}
|
||||||
|
\pgfplotscreateplotcyclelist{matplotlib}{%
|
||||||
|
{Mpl1},{Mpl2},{Mpl3},{Mpl4}
|
||||||
|
}
|
||||||
|
|
||||||
% Define individual colors
|
% Define 'scolX' colors
|
||||||
|
|
||||||
\makeatletter
|
\makeatletter
|
||||||
|
|
||||||
@ -219,40 +236,52 @@
|
|||||||
|
|
||||||
\makeatother
|
\makeatother
|
||||||
|
|
||||||
\def\setschemecolors{
|
\def\setschemecolorsfrommap{
|
||||||
\extractcolormapcolor{scol0}{0}
|
\extractcolormapcolor{scol0}{0}
|
||||||
\extractcolormapcolor{scol1}{333}
|
\extractcolormapcolor{scol1}{333}
|
||||||
\extractcolormapcolor{scol2}{666}
|
\extractcolormapcolor{scol2}{666}
|
||||||
\extractcolormapcolor{scol3}{1000}
|
\extractcolormapcolor{scol3}{1000}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\newcommand{\setschemecolorsmanually}[4]{
|
||||||
|
\colorlet{scol0}{#1}
|
||||||
|
\colorlet{scol1}{#2}
|
||||||
|
\colorlet{scol2}{#3}
|
||||||
|
\colorlet{scol3}{#4}
|
||||||
|
}
|
||||||
|
|
||||||
% Define color schemes
|
% Define color schemes
|
||||||
|
|
||||||
\pgfplotsset{
|
\pgfplotsset{
|
||||||
/pgfplots/colorscheme/mako/.style={
|
/pgfplots/colorscheme/cel/.style={
|
||||||
colormap name={mako},
|
colormap name={cel},
|
||||||
cycle list name={mako},
|
cycle list name={cel},
|
||||||
/utils/exec={\setschemecolors},
|
/utils/exec={\setschemecolorsfrommap},
|
||||||
},
|
},
|
||||||
/pgfplots/colorscheme/rocket/.style={
|
/pgfplots/colorscheme/rocket/.style={
|
||||||
colormap name={rocket},
|
colormap name={rocket},
|
||||||
cycle list name={rocket},
|
cycle list name={rocket},
|
||||||
/utils/exec={\setschemecolors},
|
/utils/exec={\setschemecolorsfrommap},
|
||||||
},
|
|
||||||
/pgfplots/colorscheme/cividis/.style={
|
|
||||||
colormap name={cividis},
|
|
||||||
cycle list name={cividis},
|
|
||||||
/utils/exec={\setschemecolors},
|
|
||||||
},
|
},
|
||||||
/pgfplots/colorscheme/viridis/.style={
|
/pgfplots/colorscheme/viridis/.style={
|
||||||
colormap name={viridis},
|
colormap name={viridis},
|
||||||
cycle list name={viridis},
|
cycle list name={viridis},
|
||||||
/utils/exec={\setschemecolors},
|
/utils/exec={\setschemecolorsfrommap},
|
||||||
},
|
},
|
||||||
/pgfplots/colorscheme/cel/.style={
|
/pgfplots/colorscheme/mako/.style={
|
||||||
colormap name={cel},
|
colormap name={mako},
|
||||||
cycle list name={cel},
|
cycle list name={mako},
|
||||||
/utils/exec={\setschemecolors},
|
/utils/exec={\setschemecolorsfrommap},
|
||||||
|
},
|
||||||
|
/pgfplots/colorscheme/cividis/.style={
|
||||||
|
colormap name={cividis},
|
||||||
|
cycle list name={cividis},
|
||||||
|
/utils/exec={\setschemecolorsfrommap},
|
||||||
|
},
|
||||||
|
/pgfplots/colorscheme/matplotlib/.style={
|
||||||
|
colormap name={matplotlib},
|
||||||
|
cycle list name={matplotlib},
|
||||||
|
/utils/exec={\setschemecolorsmanually{Mpl1}{Mpl2}{Mpl3}{Mpl4}},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
|
|
||||||
\input{common.tex}
|
\input{common.tex}
|
||||||
\pgfplotsset{colorscheme/cel}
|
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
@ -26,61 +25,77 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
|
||||||
|
\title{Colorschemes}
|
||||||
|
\author{}
|
||||||
|
\date{}
|
||||||
|
|
||||||
|
|
||||||
\begin{document}
|
\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}
|
\pgfplotsset{colorscheme/\x}
|
||||||
|
|
||||||
\colorbox{gray!30}{\texttt{colorscheme/\x}}
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\begin{figure}[H]
|
% Preview colorscheme
|
||||||
\centering
|
|
||||||
|
|
||||||
\tikzstyle{colornode} = [draw, inner sep=0pt, minimum width=1cm, minimum height=0.5cm]
|
\noindent\begin{minipage}{\textwidth}
|
||||||
\pgfplotsset{scaled y ticks=false}
|
\colorbox{gray!30}{\texttt{colorscheme/\x}}
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
|
||||||
\begin{subfigure}[c]{0.45\textwidth}
|
\tikzstyle{colornode} = [draw, inner sep=0pt, minimum width=1cm, minimum height=0.5cm]
|
||||||
\begin{tikzpicture}
|
\pgfplotsset{scaled y ticks=false}
|
||||||
\begin{axis}[
|
|
||||||
domain=0:10,
|
\begin{subfigure}[c]{0.45\textwidth}
|
||||||
view={0}{90},
|
\begin{tikzpicture}
|
||||||
yticklabel=\empty,xticklabel=\empty,
|
\begin{axis}[
|
||||||
width=\textwidth,
|
domain=0:10,
|
||||||
height=0.75\textwidth,
|
view={0}{90},
|
||||||
]
|
yticklabel=\empty,xticklabel=\empty,
|
||||||
\addplot3+[surf]
|
width=\textwidth,
|
||||||
{x + y};
|
height=0.75\textwidth,
|
||||||
\end{axis}
|
]
|
||||||
\end{tikzpicture}
|
\addplot3+[surf]
|
||||||
\end{subfigure}%
|
{x + y};
|
||||||
\begin{subfigure}[c]{0.45\textwidth}
|
\end{axis}
|
||||||
\begin{tikzpicture}
|
\end{tikzpicture}
|
||||||
\begin{axis}[
|
\end{subfigure}%
|
||||||
domain=0:10,
|
\begin{subfigure}[c]{0.45\textwidth}
|
||||||
ymin=-1e4,ymax=1,
|
\begin{tikzpicture}
|
||||||
legend pos=south west,
|
\begin{axis}[
|
||||||
yticklabel=\empty,xticklabel=\empty,
|
domain=0:10,
|
||||||
width=\textwidth,
|
ymin=-1e4,ymax=1,
|
||||||
height=0.75\textwidth,
|
legend pos=south west,
|
||||||
]
|
yticklabel=\empty,xticklabel=\empty,
|
||||||
\foreach \i in {1,2,4,8}{
|
width=\textwidth,
|
||||||
\addplot+ [mark=none, line width=1pt]
|
height=0.75\textwidth,
|
||||||
{-\i*exp(x)};
|
]
|
||||||
%\expandafter\addlegendentry\expandafter{$e^{-\text{\i} x}$}
|
\foreach \i in {1,2,4,8}{
|
||||||
\addlegendentryexpanded{$e^{-\i x}$}
|
\addplot+ [mark=none, line width=1pt]
|
||||||
}
|
{-\i*exp(x)};
|
||||||
\end{axis}
|
%\expandafter\addlegendentry\expandafter{$e^{-\text{\i} x}$}
|
||||||
\end{tikzpicture}
|
\addlegendentryexpanded{$e^{-\i x}$}
|
||||||
\end{subfigure}%
|
}
|
||||||
\begin{subfigure}[c]{0.1\textwidth}
|
\end{axis}
|
||||||
\begin{tikzpicture}
|
\end{tikzpicture}
|
||||||
\node[colornode, fill=scol3] (color3) {};
|
\end{subfigure}%
|
||||||
\node[colornode, fill=scol2, above=1mm of color3] (color2) {};
|
\begin{subfigure}[c]{0.1\textwidth}
|
||||||
\node[colornode, fill=scol1, above=1mm of color2] (color1) {};
|
\begin{tikzpicture}
|
||||||
\node[colornode, fill=scol0, above=1mm of color1] (color0) {};
|
\node[colornode, fill=scol3] (color3) {};
|
||||||
\end{tikzpicture}
|
\node[colornode, fill=scol2, above=1mm of color3] (color2) {};
|
||||||
\end{subfigure}%
|
\node[colornode, fill=scol1, above=1mm of color2] (color1) {};
|
||||||
\end{figure}
|
\node[colornode, fill=scol0, above=1mm of color1] (color0) {};
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{subfigure}%
|
||||||
|
\end{figure}
|
||||||
|
\vspace{\parskip}
|
||||||
|
\end{minipage}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user