Improve TikZ

Wed, 06 Nov 2024 21:12:14 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Wed, 06 Nov 2024 21:12:14 -0500
changeset 23
b719a44b0b26
parent 22
cecdde4ff5c9
child 24
8b4b014277fa

Improve TikZ

visualisation/cube.tex file | annotate | diff | comparison | revisions
--- a/visualisation/cube.tex	Wed Nov 06 18:39:24 2024 -0500
+++ b/visualisation/cube.tex	Wed Nov 06 21:12:14 2024 -0500
@@ -40,12 +40,14 @@
         fill = none,
         font = \small
     },
-}
-
-\begin{tikzpicture}
-    \begin{axis}[
+    illustr3d/.style = {
+        axis equal,
+        width=5cm,
+        height=5cm,
+        scale only axis,
+        enlargelimits=false,
         colormap access=map,
-        colormap/Blues,%RdPu-6,
+        colormap/Blues,
         colorbar,
         point meta rel=axis wide,
         shader = interp,
@@ -63,8 +65,11 @@
             anchor = north,
             column sep = 1ex,
         },
-    ]
+    }
+}
 
+\begin{tikzpicture}
+    \begin{axis}[illustr3d]
         \addplot3[cube] coordinates {(0, 0, 0) (0, 1, 0) (0, 1, 1) };
         \addplot3[cube] coordinates {(0, 1, 0) (1, 1, 0) };
         \addplot3[backdata] table[x=x,y=y,z=z] {\datapath/data.csv};

mercurial