Skip to content

Instantly share code, notes, and snippets.

@jayu108
Created May 22, 2015 06:40
Show Gist options
  • Save jayu108/57c587f71402c938bd6b to your computer and use it in GitHub Desktop.
Save jayu108/57c587f71402c938bd6b to your computer and use it in GitHub Desktop.
matplotlib -- 선형방정식 x축, y축 그리기
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