Created
May 22, 2015 06:40
-
-
Save jayu108/57c587f71402c938bd6b to your computer and use it in GitHub Desktop.
matplotlib -- 선형방정식 x축, y축 그리기
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 numpy as np | |
import matplotlib.pyplot as plt | |
plt.axvline(x=0, color = 'r') # draw x =0 axes | |
plt.axhline(y=0, color = 'r') # draw y =0 axes | |
x = np.arange(-10,10) | |
y = 2*x + 3 | |
plt.plot(x, y) # draw line | |
plt.plot(x, y, 'o') # draw dots | |
# plt.plot(x, y, x, y, 'o') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment