Using Sympy Equations for Plotting
What is the best way to create a Sympy equation, do something like take the derivative, and then plot the results of that equation? I have my symbolic equation, but can't figure out how to make an array of values for plotting. Here's my code: from sympy import symbols import matplotlib.pyplot as mpl t = symbols('t') x = 0.05*t + 0.2/((t - 5)**2 + 2) nums = [] for i in range(1000): nums.append(t) t += 0.02 plotted = [x for t in nums] mpl.plot(plotted) mpl.ylabel("Speed") mpl.show() In my case I just calculated the derivative of that equation, and now I want to plot the speed x , so this is