Skip to content

Instantly share code, notes, and snippets.

@adash333
Created July 20, 2017 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adash333/09d5d5b0217ca8a91e61db60ceed9a1c to your computer and use it in GitHub Desktop.
Save adash333/09d5d5b0217ca8a91e61db60ceed9a1c to your computer and use it in GitHub Desktop.
# (x1, y1), (x2, y2)を結ぶ線分のグラフ
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot([x1, x2], [y1, y2], color='k', linestyle='-', linewidth=1)
# 例
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot([-2, 7], [10.375, -4.67], color='k', linestyle='-', linewidth=1)
plt.xlim([-4,8])
plt.ylim([-6,12])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment