|
10 | 10 | }, |
11 | 11 | { |
12 | 12 | "cell_type": "code", |
13 | | - "execution_count": 1, |
| 13 | + "execution_count": null, |
14 | 14 | "id": "1", |
15 | 15 | "metadata": {}, |
16 | | - "outputs": [ |
17 | | - { |
18 | | - "data": { |
19 | | - "text/plain": [ |
20 | | - "'\\nTutorial 4.\\n\\nAdd raw tikz code to the tikz subplot.\\n'" |
21 | | - ] |
22 | | - }, |
23 | | - "execution_count": 1, |
24 | | - "metadata": {}, |
25 | | - "output_type": "execute_result" |
26 | | - } |
27 | | - ], |
| 16 | + "outputs": [], |
28 | 17 | "source": [ |
29 | 18 | "\"\"\"\n", |
30 | 19 | "Tutorial 4.\n", |
|
35 | 24 | }, |
36 | 25 | { |
37 | 26 | "cell_type": "code", |
38 | | - "execution_count": 2, |
| 27 | + "execution_count": null, |
39 | 28 | "id": "2", |
40 | 29 | "metadata": {}, |
41 | 30 | "outputs": [], |
|
45 | 34 | }, |
46 | 35 | { |
47 | 36 | "cell_type": "code", |
48 | | - "execution_count": 3, |
| 37 | + "execution_count": null, |
49 | 38 | "id": "3", |
50 | 39 | "metadata": {}, |
51 | 40 | "outputs": [], |
|
56 | 45 | }, |
57 | 46 | { |
58 | 47 | "cell_type": "code", |
59 | | - "execution_count": 4, |
| 48 | + "execution_count": null, |
60 | 49 | "id": "4", |
61 | 50 | "metadata": { |
62 | 51 | "lines_to_next_cell": 2 |
63 | 52 | }, |
64 | | - "outputs": [ |
65 | | - { |
66 | | - "data": { |
67 | | - "text/plain": [ |
68 | | - "<tikzpics.node.Node at 0x10ce7b5c0>" |
69 | | - ] |
70 | | - }, |
71 | | - "execution_count": 4, |
72 | | - "metadata": {}, |
73 | | - "output_type": "execute_result" |
74 | | - } |
75 | | - ], |
| 53 | + "outputs": [], |
76 | 54 | "source": [ |
77 | 55 | "# Add nodes\n", |
78 | 56 | "tikz.add_node(0, 0, label=\"A\", shape=\"circle\", draw=\"black\", fill=\"blue\", layer=0)\n", |
|
83 | 61 | }, |
84 | 62 | { |
85 | 63 | "cell_type": "code", |
86 | | - "execution_count": 5, |
| 64 | + "execution_count": null, |
87 | 65 | "id": "5", |
88 | 66 | "metadata": {}, |
89 | | - "outputs": [ |
90 | | - { |
91 | | - "data": { |
92 | | - "text/plain": [ |
93 | | - "<tikzpics.path.Path at 0x113e4d940>" |
94 | | - ] |
95 | | - }, |
96 | | - "execution_count": 5, |
97 | | - "metadata": {}, |
98 | | - "output_type": "execute_result" |
99 | | - } |
100 | | - ], |
| 67 | + "outputs": [], |
101 | 68 | "source": [ |
102 | 69 | "# Add a line between nodes\n", |
103 | 70 | "tikz.draw(\n", |
|
112 | 79 | }, |
113 | 80 | { |
114 | 81 | "cell_type": "code", |
115 | | - "execution_count": 6, |
| 82 | + "execution_count": null, |
116 | 83 | "id": "6", |
117 | 84 | "metadata": {}, |
118 | 85 | "outputs": [], |
|
132 | 99 | }, |
133 | 100 | { |
134 | 101 | "cell_type": "code", |
135 | | - "execution_count": 8, |
| 102 | + "execution_count": null, |
136 | 103 | "id": "7", |
137 | 104 | "metadata": {}, |
138 | 105 | "outputs": [], |
139 | 106 | "source": [ |
140 | | - "# TODO: Not implemented in tikzpics yet\n", |
| 107 | + "# TODO: Not implemented in tikzfigure yet\n", |
141 | 108 | "# tikz.add_raw(raw_tikz)" |
142 | 109 | ] |
143 | 110 | }, |
144 | 111 | { |
145 | 112 | "cell_type": "code", |
146 | | - "execution_count": 9, |
| 113 | + "execution_count": null, |
147 | 114 | "id": "8", |
148 | 115 | "metadata": {}, |
149 | | - "outputs": [ |
150 | | - { |
151 | | - "data": { |
152 | | - "text/plain": [ |
153 | | - "<tikzpics.node.Node at 0x113ecba80>" |
154 | | - ] |
155 | | - }, |
156 | | - "execution_count": 9, |
157 | | - "metadata": {}, |
158 | | - "output_type": "execute_result" |
159 | | - } |
160 | | - ], |
| 116 | + "outputs": [], |
161 | 117 | "source": [ |
162 | 118 | "tikz.add_node(0.5, 0.5, content=\"Cube\", layer=10)" |
163 | 119 | ] |
|
167 | 123 | "execution_count": null, |
168 | 124 | "id": "9", |
169 | 125 | "metadata": {}, |
170 | | - "outputs": [ |
171 | | - { |
172 | | - "name": "stdout", |
173 | | - "output_type": "stream", |
174 | | - "text": [ |
175 | | - "\n", |
176 | | - "\n", |
177 | | - "\n", |
178 | | - "\n", |
179 | | - "% --------------------------------------------- %\n", |
180 | | - "% Tikzfigure generated by tikzpics v0.1.1 %\n", |
181 | | - "% https://github.com/max-models/tikzpics %\n", |
182 | | - "% --------------------------------------------- %\n", |
183 | | - "\\begin{tikzpicture}\n", |
184 | | - " \n", |
185 | | - " % Define the layers library\n", |
186 | | - " \\pgfdeclarelayer{0}\n", |
187 | | - " \\pgfdeclarelayer{1}\n", |
188 | | - " \\pgfdeclarelayer{10}\n", |
189 | | - " \\pgfdeclarelayer{2}\n", |
190 | | - " \\pgfsetlayers{0,1,10,2}\n", |
191 | | - " \n", |
192 | | - " % Layer 0\n", |
193 | | - " \\begin{pgfonlayer}{0}\n", |
194 | | - " \\node[shape=circle, draw=black, fill=blue] (A) at (0, 0) {};\n", |
195 | | - " \\node[shape=circle, draw=black, fill=blue] (B) at (10, 0) {};\n", |
196 | | - " \\node[shape=circle, draw=black, fill=blue] (C) at (10, 10) {};\n", |
197 | | - " \\end{pgfonlayer}{0}\n", |
198 | | - " \n", |
199 | | - " % Layer 2\n", |
200 | | - " \\begin{pgfonlayer}{2}\n", |
201 | | - " \\node[shape=circle, draw=black, fill=blue] (D) at (0, 10) {};\n", |
202 | | - " \\end{pgfonlayer}{2}\n", |
203 | | - " \n", |
204 | | - " % Layer 1\n", |
205 | | - " \\begin{pgfonlayer}{1}\n", |
206 | | - " \\draw[path actions=['draw', 'rounded corners'], fill=red, opacity=0.5] (A) to (B) to (C) to (D) -- cycle;\n", |
207 | | - " \\end{pgfonlayer}{1}\n", |
208 | | - " \n", |
209 | | - " % Layer 10\n", |
210 | | - " \\begin{pgfonlayer}{10}\n", |
211 | | - " \\node (node4) at (0.5, 0.5) {Cube};\n", |
212 | | - " \\end{pgfonlayer}{10}\n", |
213 | | - "\\end{tikzpicture}\n", |
214 | | - "\n" |
215 | | - ] |
216 | | - } |
217 | | - ], |
| 126 | + "outputs": [], |
218 | 127 | "source": [ |
219 | 128 | "# Generate the TikZ script\n", |
220 | 129 | "script = tikz.generate_tikz()\n", |
|
0 commit comments