Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13891

Why am I getting different plots for each run of same Python SymPy plotting code?

$
0
0

My code (Linux Mint 21.2, Python 3.10):

import sympyprint(sympy.__version__) # '1.9'from sympy import symbols, sinfrom sympy.plotting import plott = symbols('t')plotP = plot(  50*sin(t/30)+30*sin(1.3*t/30)+20*sin(2.7*t/30)+25*sin(3.7*t/30), (t, 24800 , 35800) )

Four different runs, four different plots:

[Plot_1Plot_2Plot_1Plot_4

What could be the reason for getting this confusing results?

============

ADDED to clarify that the issue occurs also when the script is executed from a shell:

Plot_5

============

ADDED to show that upgrading to newest versions of sympy and matplotlib did not solve the issue:

Plot_6


Viewing all articles
Browse latest Browse all 13891

Trending Articles