22 lines
808 B
Python
22 lines
808 B
Python
from lib.lib import read_xy_alt, read_load
|
|
import matplotlib as mpl
|
|
from mpl_toolkits.mplot3d import Axes3D
|
|
import numpy as np
|
|
import matplotlib.pyplot as plt
|
|
|
|
full_data = read_load("/Users/joshuacoles/Developer/checkouts/jc3091/CompB DLA/data-analysis/data/rust-3d", read_xy_alt)
|
|
run1 = full_data[full_data.run == '1']
|
|
|
|
max_actual_radius = max(run1.x.abs().max(), run1.y.abs().max(), run1.z.abs().max())
|
|
max_radius = int(np.exp2(np.floor(np.log2(max_actual_radius)) + 1))
|
|
data = np.zeros((max_radius * 2, max_radius * 2, max_radius * 2))
|
|
data[run1.x + max_radius, run1.y + max_radius, run1.z + max_radius] = 1
|
|
|
|
# %%
|
|
fig = plt.figure(figsize=(10, 10))
|
|
ax = fig.add_subplot(projection='3d')
|
|
ax.scatter(run1.x, run1.y, run1.z, c=run1.N)
|
|
|
|
fig.savefig("../figures/3d-eg.png")
|
|
fig.savefig("../figures/3d-eg.svg")
|