3d plot goes across limits python

The solution for “3d plot goes across limits python” can be found here. The following code will assist you in solving the problem.

`# trim the data
y = np.ones(PDF_x.shape)*PDF_x
y[y>95]= np.nan
y[y<75]= np.nan # plot the data fig = plt.figure() ax = fig.gca(projection='3d') for i in range(PDF_capacity.shape[1]): ax.plot(life[i]*np.ones((PDF_x.shape)),y,PDF_capacity[:,i], label='parametric curve') # set the axis limits ax.set_ylim(75,95) # add axis labels ax.set_xlabel('charge cycles to failure point of 75% capacity') ax.set_ylabel('capacity at 100 charge cycles') ax.set_zlabel('probability')`

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in