Category : 3d

I am having issue in plotting a 3D graph. I have csv file consisting of 713 rows and 3 columns data = np.genfromtxt("graph-data.csv", delimiter=",", names=["x", "y","z"]) x, y, z = zip(*data) fig = plt.figure() ax = plt.axes(projection=’3d’) ax.set_xlabel(‘CPU availability(%)’) ax.set_ylabel(‘Memory availability(%)’) ax.set_zlabel(‘Frame Drop Rate(%)’) ax.plot_surface(np.array(x).reshape(712,3), np.array(y).reshape(712,3), np.array(z).reshape(712,3), cmap=’viridis’, edgecolor=’none’) #ax.plot_surface(x, y, z,cmap=’viridis’, edgecolor=’none’) plt.show() Error ..

Read more

I have made some code to draw a room with matplotlib. I am using something like this pseudocode: for i in range(totalwalls-1): rec=[(xa, ya, za), (xb, yb, zb), (xc, yc, zc), (xd, yd, zd), ] face = mp3d.art3d.Poly3DCollection([rec], linewidth=1) alpha = 0.12 face.set_facecolor((0.3,0.3,0.8) + (alpha,)) face.set_edgecolor((0.4,0.4,0.4,0.9)) ax.add_collection3d(face) I am able to draw any kind of ..

Read more

How to make the circle clear transparent? The desired result is a black edge and None colour to see the plots behind the circle. import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # 3d graph from mpl_toolkits.mplot3d import proj3d # 3d graph from matplotlib.patches import FancyArrowPatch from mpl_toolkits.mplot3d import proj3d, art3d from matplotlib.patches import Circle ..

Read more

How can I plot a 3D scatter plot (plt.plot), instead of just show it (plt.show)? Code snippet: fig = plt.figure(figsize=(12,10)) ax = fig.add_subplot(111, projection=’3d’) p1x = ax.scatter(xvardatasetcml1, yvardatasetcml1, datasetcml1, c=’red’, label = ‘Variance’, marker = ‘+’) p1y = ax.scatter(xassimdatasetcml1, yassimetriadatasetcml1, datasetcml1, c=’blue’, label = ‘Skewness’, marker = ‘+’) p1z = ax.scatter(xcurtdatasetcml1, ycurtdatasetcml1, datasetcml1, c=’green’, label ..

Read more

I have .asc files that are readouts from a detector with 128 x 128 pixels. I need to plot the pixel data (xValue, yValue, zValue) from this file. The code I have so far will open the file, read the X, Y, Z lines and convert to the correct integer/float arrays that I need: import ..

Read more