How can I generate 3D plots in Mechanical?
Ayush Kumar
Member, Moderator, Employee Posts: 442
✭✭✭✭
Answers

By activating CPython in Mechanical and if you have
tcl
error, the following workaround should help: Tcl Error matplotlibA simple example:
from mpl_toolkits import mplot3d import numpy as np import matplotlib.pyplot as plt my_fig = plt.figure() axes = plt.axes(projection='3d') z = np.linspace(0, 1, 100) x = z * np.sin(30 * z) y = z * np.cos(30 * z) axes.plot3D(x, y, z, 'maroon') axes.set_title('3D line plot') plt.show()
0