If I have a function such as sin(1/x), I want to build and show close to 0, how would I smooth out the results in the plot? By default, the number of sample points is relatively small for what I'm trying to show.
sin(1/x)
Here is the code:
from sympy import symbols, plot, sin x = symbols('x') y = sin(1/x) plot(y, (x, 0, 0.5))
As it xapproaches 0, the line becomes more jagged and less sinuous. Is there any way to fix this?
x
You can set the number of points used manually:
plot(y, (x, 0.001, 0.5), adaptive=False, nb_of_points=300000)
. ZeroDivisionError - ( , x 0 -), (). , , adaptive=False, nb_of_points=300000, xmin (0.001).
adaptive=False, nb_of_points=300000
0.001
Source: https://habr.com/ru/post/1628755/More articles:Why doesn't height affect my divs? - htmlJquery event fired several times - jqueryUsing an enumeration in a structure results in an "unresolved name" error - rustWhen will you use the file for recording only? - securityPHPExcel проверяет, сохранен ли файл - phpCreating a Magic Wand tool in a photo editing application? (exactly the same as the application for Photoshop) - iosImgur OAuth2 Authentication and Download C # - c #Need XPath support - with function - xmlКак отправить значения attr и значения формы с помощью POST с помощью JQuery и PHP? - javascriptLoop to compare all string values of an array - javaAll Articles