Last active
June 13, 2021 23:00
-
-
Save L-Kov/e20ffecca681255643afef09fb7006a0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
import math | |
## Define functions and set domain | |
x = np.arange(1, 2.0, .01) | |
y = x**2 -1 | |
z = np.log(x) | |
i = x*z | |
j = x -1 | |
## Plot the functions | |
plt.plot(x, y, 'r-') | |
plt.plot(x, z, 'b-') | |
plt.plot(x, i, 'c-') | |
plt.plot(x, j, 'g-') | |
## Configure the graph | |
plt.title('Network Effects') | |
plt.xlabel('X') | |
plt.ylabel('Y') | |
plt.grid(True) | |
plt.legend(['y = x^2', 'y = log(x)', 'y = xlog(x)', 'y = x'], loc='upper left') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment