import sympy
import matplotlib.pyplot as plt
from sympy import plot
x=sympy.symbols('x')
f=(x**2-4)**2/8-1
plot(f,(x,0,3),xlabel='x',ylabel='y',label='$f(x)$')
plt.scatter(2,-1,label="titik optimum",color="blue",marker="s",s=50)
plt.xlabel('x')
plt.ylabel('y')
plt.title('Metode Golden Search')
plt.legend()
plt.show()
I want to plot symbolic function and point in one figure. But the result is graph of symbolic function is separated with the point plot. Anyone know how to show plot symbolic function and point in one figure in python
?