• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

Saeto Jun 24th, 2019 (edited) 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. from pylab import *
2. import matplotlib.pyplot as plt
3. import numpy as np
4.
5.
6. data = ((57, 43), (59, 55), (61, 55),(76, 80))
7. color = ("red", "green", "blue", "black",)
8. groups = ("SAPA", "Hanoi", "Phu Quac", "Qhin Nhon",)
9. areas = (10, 20, 30, 40)
10.
11.
12. fig = plt.figure()
13. ax = fig.add_subplot(1, 1, 1)
14.
15. #for data, color, group in zip(data, colors, groups):
16. for data, color, group,area in zip(data, colors, groups,areas):
17.     x, y = data
18.     #plt.scatter(x, y, s=area, c=colors, alpha=0.5)
19.     #ax.scatter(x, y, alpha=0.8, c=color, edgecolors='none', s=30, label=group)
20. ax.spines['bottom'].set_position(('axes', 0.5))
21. ax.spines['left'].set_position(('axes', 0.5))
22.
23. ax.spines['right'].set_visible(False)
24. ax.spines['top'].set_visible(False)
25.
26. ax.set_xlim(0,100)
27. ax.set_ylim(0,100)
28.
29.
30. ax.set_title('FC Hostel Investment Analysis Vietnam', color="red", fontweight="bold", fontname="Times New Roman Bold")
31.
32. ax.set_xlabel("Hostel Market Share")
33. ax.set_ylabel("INDEX")
34.
35. plt.legend(loc=2)
36.
37. ax.xaxis.set_label_coords(0.50, -0.1)
38. ax.yaxis.set_label_coords(-0.1, 0.5)
39.
40.
41. left,right = ax.get_xlim()
42. low,high = ax.get_ylim()
43.
44. grid()
45.
46. show()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top