Created
March 15, 2018 15:41
-
-
Save tekknolagi/ebfd391503ab773dc12fff79f4f96b76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
from decimal import * | |
getcontext().prec = 1000 | |
e = Decimal(np.e) | |
def y1(x): | |
return np.log10(e**x * x**23) | |
three = Decimal(3) | |
def y2(x): | |
return np.log10(three**x) | |
if __name__ == '__main__': | |
f = plt.figure(1) | |
plt.grid(True) | |
xs = np.arange(10, 3000, 100, | |
dtype=np.dtype(Decimal)) | |
plt.plot(xs, y1(xs), | |
label=r'$log_{10}(e^x * x^{23})$') | |
plt.plot(xs, y2(xs), | |
label=r'$log_{10}(3^x)$') | |
plt.legend() | |
f.savefig('megan.png', dpi=300) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment