Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{minimal}
- usepackage{tikz}
- usetikzlibrary{matrix}
- begin{document}
- begin{tikzpicture}
- defx{2}
- defy{2}
- defz{3}
- defyscale{0.850000}
- defzslant{1.000000}
- defxlab{x}
- defylab{y}
- defzlab{z}
- defgridcol{black!80}
- defshadecolA{white}
- defshadecolB{black!20}
- tikzset{
- grid matrix/.style={
- nodes in empty cells,
- matrix of nodes,
- column sep=-pgflinewidth, row sep=-pgflinewidth,
- nodes={
- rectangle,
- draw=gray,
- minimum height=1cm,
- anchor=center,
- align=center,
- text width=1cm,
- text height=2ex,
- text depth=0.5ex,
- inner sep=0pt,
- outer sep=0pt,
- }
- },
- grid matrix/.default=1.2em
- }
- begin{scope}
- % top matrix
- begin{scope}[transform canvas={xslant=zslant, yscale=yscale, shift={(-0.5*z, 0.5 * x)}, },transform shape]
- draw[color=black, thick, ] (-0.5* z,-0.5* x) rectangle (0.5* z, 0.5* x);
- shade[bottom color=shadecolA, top color=shadecolB] (-0.5* z,-0.5* x) rectangle (0.5* z, 0.5* x);
- matrix (top) [grid matrix]{
- |[fill=none]| 4 & |[fill=none]| 8 & |[fill=none]| 12 \
- |[fill=none]| 2 & |[fill=none]| 4 & |[fill=green]| 6 \
- };
- node [above, rotate=90, text width=x * 1cm, align=center] at (top.west) {xlab};
- end{scope}
- % front matrix
- begin{scope}[shift={(-0.5*z, -0.5 * y)}]
- draw[color=black, thick, fill=shadecolA] (-0.5* z,-0.5* y) rectangle (0.5* z, 0.5* y);
- %shade[left color=gray!10, right color=black!60] (-0.5* z,-0.5* y) rectangle (0.5* z, 0.5* y);
- matrix (front) [grid matrix]{
- |[fill=none]| 1 & |[fill=none]| 2 & |[fill=green]| 3 \
- |[fill=red]| 1 & |[fill=red]| 2 & |[fill=red]| 3 \
- };
- node [below, text width=z * 1cm, align=center] at (front.south) {zlab};
- node [above, rotate=90, text width=y * 1cm, align=center] at (front.west) {ylab};
- end{scope}
- % side matrix
- begin{scope}[transform canvas={yslant=1/zslant, xscale=yscale*zslant, shift={(0.5*x,-0.5*y)}, },transform shape]
- draw[color=black, thick] (-0.5* x,-0.5* y) rectangle (0.5* x, 0.5* y);
- shade[left color=shadecolA, right color=shadecolB] (-0.5* x,-0.5* y) rectangle (0.5* x, 0.5* y);
- matrix (side) [grid matrix]{
- |[fill=green]| 1 & |[fill=none]| 2 \
- |[fill=red]| 3 & |[fill=red]| 4 \
- };
- end{scope}
- end{scope}
- end{tikzpicture}
- end{document}
Add Comment
Please, Sign In to add comment