first commit
This commit is contained in:
commit
a499d4e3ff
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
**.swp
|
||||||
|
__pycache__/
|
||||||
21
main.py
Normal file
21
main.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from math import log, log10
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
|
# If error ImportError: numpy.core.multiarray failed to import
|
||||||
|
# Unintall numpy: pip3 uninstall numpy
|
||||||
|
# Install version pip3 install "numpy<2"
|
||||||
|
|
||||||
|
|
||||||
|
fig, ax = plt.subplots()
|
||||||
|
x = list()
|
||||||
|
y = list()
|
||||||
|
for i in range(1, 100):
|
||||||
|
# print(log(i))
|
||||||
|
x.append(i)
|
||||||
|
y.append(log(i)) # By defualt, base e
|
||||||
|
|
||||||
|
ax.plot(x, y, linewidth=2, label=r"log")
|
||||||
|
ax.legend(fontsize=14)
|
||||||
|
plt.show()
|
||||||
Loading…
Reference in New Issue
Block a user