Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. X_cord=int(raw_input("Enter the x-coordinate"))
  2. Y_cord=int(raw_input("Enter the y-coordinate"))
  3.  
  4. import matplotlib.pyplot as plt # I include a module which contains the plotting functionality I need: https://docs.python.org/2/tutorial/modules.html
  5. plt.plot(X_cord, # here go the X coordinates
  6. Y_cord, # here go the Y coordinates
  7. marker='x', # as I'm plotting only one point here, I'd like to make it extra visible
  8. markersize=10 # by choosing a nice marker shape ('x') and large size
  9. )
  10. plt.show() # this shows the current plot in a pop-up window
  11.  
  12. plt.savefig("my_first_plot.pdf", bbox_inches='tight')
  13. plt.close()
  14.  
  15. X_cord = float( X_cord )
  16. Y_cord = float( Y_cord )
  17. plt.scatter( X_cord, Y_cord )
  18. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement