Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132932 views
License: OTHER
1
\documentclass{article}
2
\usepackage[pdftex,active,tightpage]{preview}
3
\setlength\PreviewBorder{2mm}
4
5
\usepackage{pgfplots}
6
7
\begin{document}
8
\begin{preview}
9
\begin{tikzpicture}
10
\begin{axis}[
11
view = {120}{35},% important to draw x,y in increasing order
12
xmin = 0,
13
ymin = 0,
14
xmax = 4,
15
ymax = 4,
16
zmin = 0,
17
unbounded coords = jump,
18
colormap={pos}{color(0cm)=(white); color(6cm)=(blue)}
19
]
20
\addplot3[surf,mark=none] coordinates {
21
(0,0,0.0) (0,0,0.0) (0,1,0.0) (0,1,0.0) (0,2,0.0) (0,2,0.0) (0,3,0.0) (0,3,0.0) (0,4,0.0) (0,4,0.0)
22
23
(0,0,0.0) (0,0,2) (0,1,2) (0,1,3) (0,2,3) (0,2,1) (0,3,1) (0,3,0) (0,4,0) (0,4,0.0) (1,0,0.0)
24
25
(1,0,2) (1,1,2) (1,1,3) (1,2,3) (1,2,1) (1,3,1) (1,3,0) (1,4,0) (1,4,0.0)
26
27
(1,0,0.0) (1,0,0) (1,1,0) (1,1,6) (1,2,6) (1,2,0) (1,3,0) (1,3,0) (1,4,0) (1,4,0.0) (2,0,0.0)
28
29
(2,0,0) (2,1,0) (2,1,6) (2,2,6) (2,2,0) (2,3,0) (2,3,0) (2,4,0) (2,4,0.0)
30
31
(2,0,0.0) (2,0,1) (2,1,1) (2,1,0) (2,2,0) (2,2,0) (2,3,0) (2,3,4) (2,4,4) (2,4,0.0) (3,0,0.0)
32
33
(3,0,1) (3,1,1) (3,1,0) (3,2,0) (3,2,0) (3,3,0) (3,3,4) (3,4,4) (3,4,0.0)
34
35
(3,0,0.0) (3,0,0) (3,1,0) (3,1,0) (3,2,0) (3,2,0) (3,3,0) (3,3,0) (3,4,0) (3,4,0.0) (4,0,0.0)
36
37
(4,0,0) (4,1,0) (4,1,0) (4,2,0) (4,2,0) (4,3,0) (4,3,0) (4,4,0) (4,4,0.0)
38
39
(4,0,0.0) (4,0,0.0) (4,1,0.0) (4,1,0.0) (4,2,0.0) (4,2,0.0) (4,3,0.0) (4,3,0.0) (4,4,0.0) (4,4,0.0)
40
};
41
\end{axis}
42
\end{tikzpicture}
43
\end{preview}
44
\end{document}
45
46