I want to create something like this:
By filling a rectangle.
NOTE: Ignore the borders of the image, I just want to give that texture to a tikz rectangle.
I want to create something like this:
By filling a rectangle.
NOTE: Ignore the borders of the image, I just want to give that texture to a tikz rectangle.
A brute-force attempt with pgfplots
: there are surely better ways. :-)
The "coarseness" of the texture can be adjusted using the samples
key value. For this fine of a texture, LuaLaTeX must be used (dynamic memory allocation). For samples=100
or fewer, any modern engine can be used.
\IfFileExists{luatex85.sty}{%
\RequirePackage{luatex85}%
}{}
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
view={0}{90},
hide axis=true,
samples=200,
colormap={papyrus}{
cmyk(0cm)=(0.00,0.08,0.24,0);
cmyk(1cm)=(0.00,0.08,0.24,0.05)
},
]
\addplot3[surf,shader=interp] {rand};
\end{axis}
\end{tikzpicture}
\end{document}
pgfplots
installed than 1.12.
Commented
Sep 23, 2015 at 19:52