mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
Added image for color blind
This commit is contained in:
parent
21e710de6f
commit
6fc736034a
4 changed files with 62 additions and 0 deletions
31
tikz/color-blind-friendly-mesh-colormap/Makefile
Normal file
31
tikz/color-blind-friendly-mesh-colormap/Makefile
Normal file
|
@ -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
|
3
tikz/color-blind-friendly-mesh-colormap/Readme.md
Normal file
3
tikz/color-blind-friendly-mesh-colormap/Readme.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
|
@ -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}
|
Loading…
Add table
Add a link
Reference in a new issue