diff --git a/tikz/color-blind-friendly-mesh-colormap/Makefile b/tikz/color-blind-friendly-mesh-colormap/Makefile new file mode 100644 index 0000000..92456a1 --- /dev/null +++ b/tikz/color-blind-friendly-mesh-colormap/Makefile @@ -0,0 +1,31 @@ +SOURCE = color-blind-friendly-mesh-colormap +DELAY = 80 +DENSITY = 300 +WIDTH = 512 + +make: + pdflatex $(SOURCE).tex -output-format=pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot *.gz *latexmk + +gif: + pdfcrop $(SOURCE).pdf + convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif + make clean + +png: + make + make svg + inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png + +transparentGif: + convert $(SOURCE).pdf -transparent white result.gif + make clean + +svg: + #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg + pdf2svg $(SOURCE).pdf $(SOURCE).svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg diff --git a/tikz/color-blind-friendly-mesh-colormap/Readme.md b/tikz/color-blind-friendly-mesh-colormap/Readme.md new file mode 100644 index 0000000..6f7d044 --- /dev/null +++ b/tikz/color-blind-friendly-mesh-colormap/Readme.md @@ -0,0 +1,3 @@ +Compiled example +---------------- +![Example](color-blind-friendly-mesh-colormap.png) diff --git a/tikz/color-blind-friendly-mesh-colormap/color-blind-friendly-mesh-colormap.png b/tikz/color-blind-friendly-mesh-colormap/color-blind-friendly-mesh-colormap.png new file mode 100644 index 0000000..029fffd Binary files /dev/null and b/tikz/color-blind-friendly-mesh-colormap/color-blind-friendly-mesh-colormap.png differ diff --git a/tikz/color-blind-friendly-mesh-colormap/color-blind-friendly-mesh-colormap.tex b/tikz/color-blind-friendly-mesh-colormap/color-blind-friendly-mesh-colormap.tex new file mode 100644 index 0000000..c081b50 --- /dev/null +++ b/tikz/color-blind-friendly-mesh-colormap/color-blind-friendly-mesh-colormap.tex @@ -0,0 +1,28 @@ +\documentclass[varwidth=true, border=2pt]{standalone} +\usepackage{pgfplots} +\pgfplotsset{compat=1.9} +\usepackage{tikz} +\usetikzlibrary{calc} + +\begin{document} + \pgfplotsset{ + colormap={whitered}{ + color(0cm)=(white); + color(1cm)=(orange!75!red) + } + } + \begin{tikzpicture} + \begin{axis}[ + colormap name=whitered, + title=Rectangle from matrix input, + colorbar, + colorbar style={ + at={(-0.3,0)}, + anchor=south west, + height=0.6*\pgfkeysvalueof{/pgfplots/parent axis height}, + title={$f(x,y)$} + }] + \addplot3[surf,samples=30] {x*y}; + \end{axis} + \end{tikzpicture} +\end{document} \ No newline at end of file