Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
from mpl_toolkits.mplot3d import Axes3D | |
import mpl_toolkits.mplot3d.art3d as art3d | |
fig = plt.figure() | |
ax=fig.gca(projection='3d') | |
for i in ["x","y","z"]: | |
circle = Circle((0, 0), 1) | |
circle.set_clip_box(ax.bbox) |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
xs = [10, 20] | |
ys = [1250.0, 250.0] | |
zs = [1, 2] | |
fig = plt.figure() | |
ax = fig.add_subplot(111, projection = '3d') |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!