sympy / sympy

A computer algebra system written in pure Python
https://sympy.org/
Other
13.06k stars 4.47k forks source link

Problems with the y-axis in sympy.plot #18247

Open kolibril13 opened 4 years ago

kolibril13 commented 4 years ago
from sympy import symbols
from sympy.plotting import plot
symbols('y')
exp= y**2+8
plot(exp, (y, -5, 5))

Gives image Here it would be nice, to have the y axis cross the 0, because the 20 looks a little untidy. I tried it to solve it with axis_center

from sympy import symbols
from sympy.plotting import plot
symbols('y')
exp= y**2+8
plot(exp, (y, -5, 5), axis_center= (0,0))

However, here the y-axis does not reach until 0. image Maybe a bug :thinking:

povinsahu1909 commented 4 years ago

I tried for different functions also and after magnifying the output plot to a certain level this problem occur. I think this problem can be overcome by removing the y-axis limit that was applied and providing the full y-axis without limit.

CsatiZoltan commented 1 year ago

I confirm that the same behaviour persists with SymPy version 1.11.1.