Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I create a y = log10(x) plot in python in range x = 1 to 1000?

I’m trying to plot y = log10(x) – squareroot(x) in Jupyter notebook with x in range 1 to 1000, any ideas?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

import math
import matplotlib.pyplot as plt
x = [i for i in range(1,1001)]
y = [math.log10(i)-math.sqrt(i) for i in x]
plt.plot(x,y)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading