diff --git a/plots/treeplot.png b/plots/treeplot.png index 8dc95f833144bbc447e59a7fbdaa5d29cce97a6d..ef6d5f568415f431cc3856a2988b4f77cff9504b 100644 Binary files a/plots/treeplot.png and b/plots/treeplot.png differ diff --git a/plots/treeplot.py b/plots/treeplot.py index 00398454797ca9639197523d4e1af086890f93f4..26a2dd14876b30c25f8426cd3f9a38dad45ce269 100644 --- a/plots/treeplot.py +++ b/plots/treeplot.py @@ -8,16 +8,23 @@ pos = np.loadtxt("../data/data.txt") x = pos[:,2] y = pos[:,3] +maxCoordinate = np.max(np.abs(pos[:,2:4])) +size = 1.5 + fig, ax = plt.subplots() # ax.scatter(tree[:,0], tree[:,1], color='r', s=0.1) -ax.scatter(x, y, color='b', edgecolor="none", s=1) +ax.scatter(x, y, color='b', edgecolor="none", s=0.33) +ax.set_xlim(-4/3*size, 4/3*size) +ax.set_ylim(-size, size) +ax.set_xlabel("x") +ax.set_ylabel("y") +ax.set_aspect('equal') for i in range(tree.shape[0]): size = tree[i,3] - ax.add_patch(Rectangle((tree[i,0] - size, tree[i,1] - size), 2*size, 2*size, linewidth=1, edgecolor='k', facecolor='none', alpha=0.5)) + ax.add_patch(Rectangle((tree[i,0] - size, tree[i,1] - size), 2*size, 2*size, linewidth=0.67, edgecolor='k', facecolor='none', alpha=0.5)) # ax.text(tree[i,0], tree[i,1], str(tree[i,4]), fontsize=8, horizontalalignment='center', verticalalignment='center') - ax.set_aspect('equal') plt.savefig("treeplot.png", dpi=300) plt.show() \ No newline at end of file