from matplotlib.pyplot import plot, show, grid, axhline, axvline, gca
import matplotlib.pyplot as plt

X = [x/10 for x in range(-50, 51)]
Y = [0.05*x**3 - 3*x + 1 for x in X]
Z = [-0.5*x**2 + x - 1 for x in X]

plot(X, Y)
plot(X, Z)
grid()
axhline(y=0, color='black', linestyle='-')
axvline(x=0, color='black', linestyle='-')

ax = gca()

ax.set_xlim(left=-5, right=5)
ax.set_ylim(bottom=-10, top=10)
ax.plot((1), (0), ls="", marker=">", ms=10, color="k", transform=ax.get_yaxis_transform(), clip_on=False)
ax.plot((0), (1), ls="", marker="^", ms=10, color="k", transform=ax.get_xaxis_transform(), clip_on=False)

show()
