Last active
June 26, 2018 16:51
-
-
Save allatambov/ff69114a5eae450b76f80bd35e94b861 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 | |
% matplotlib inline | |
# создать простой график на основе двух списков | |
X = [-2, -0.5, 0, 2, 5, 8, 9, 10] | |
Y = [4, 0.25, 0, 4, 25, 64, 81, 100] | |
Z = [10, 9, 8, 5, 2, 0, -1, -2] | |
plt.plot(X,Y) | |
plt.plot(X, Y, 'lightblue') | |
plt.plot(X,Y,'lightblue', linestyle = '--') | |
plt.plot(X,Y,'red', linestyle = '-.') | |
plt.plot(X, Y, 'red', linewidth = 2) | |
plt.scatter(X, Y) | |
plt.scatter(X, Y, color ='red', marker = 'o') | |
plt.scatter(X, Y, color ='red', marker = '*') | |
plt.scatter(X, Y, color ='green', marker = '2') | |
# https://matplotlib.org/api/markers_api.html | |
plt.clf() | |
plt.plot(X,Y) | |
plt.plot(X, Y, 'lightblue') | |
plt.plot(Y, Z, 'red') | |
x = np.linspace(-100, 100, 100) | |
y = 1/x | |
plt.plot(x, y) | |
y = x ** 2 | |
z = x ** 3 | |
r = np.exp(x) | |
m = abs(x) | |
plt.figure(1) | |
plt.subplot(221) | |
plt.plot(x, y) | |
plt.title('parabola') | |
plt.grid(True) | |
plt.subplot(222) | |
plt.plot(x, z) | |
plt.title('hyperbola') | |
plt.grid(True) | |
plt.subplot(223) | |
plt.plot(x, r) | |
plt.title('exponent') | |
plt.grid(True) | |
plt.subplot(224) | |
plt.plot(x, m) | |
plt.title('abs') | |
plt.grid(True) | |
https://seaborn.pydata.org/ | |
# https://www.coursera.org/learn/ml-foundations/home/welcome | |
# GrapLab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment