import matplotlib.pyplot as plt def generate_graph(thickness, hole_diameter, force, max_stress, max_deformation): fig, ax = plt.subplots() ax.bar(["Thickness (mm)", "Hole Diameter (mm)", "Force (N)"], [thickness, hole_diameter, force], color=["#FFA07A", "#20B2AA", "#87CEEB"]) ax.set_title(f"Simulation Results: Stress={max_stress} Pa, Deformation={max_deformation} mm") plt.tight_layout() plt.savefig("dynamic_graph.png") plt.close(fig) return "dynamic_graph.png"