回答編集履歴

1

追記

2018/05/11 11:31

投稿

hayataka2049
hayataka2049

スコア30935

test CHANGED
@@ -11,3 +11,97 @@
11
11
 
12
12
 
13
13
  importできればmatplotlib側の設定でなんとかなる希望もなくはないです。
14
+
15
+
16
+
17
+ ### 追記
18
+
19
+ 手元で動かした結果、figure1~4の窓が出てきました。
20
+
21
+
22
+
23
+ ```python
24
+
25
+ import matplotlib.pyplot as plt
26
+
27
+ import numpy as np
28
+
29
+ T = np.arange(10)
30
+
31
+ E = np.arange(10)
32
+
33
+ SpcH = np.arange(10)
34
+
35
+ M = np.arange(10)
36
+
37
+ M_sus = np.arange(10)
38
+
39
+
40
+
41
+ plt.figure()
42
+
43
+ plt.plot(T, E, 'rx-')
44
+
45
+ plt.xlabel(r'Temperature $(\frac{J}{k_B})$')
46
+
47
+ plt.ylabel(r'$\langle E \rangle$ per site $(J)$')
48
+
49
+ plt.savefig("E8.pdf", format='pdf', bbox_inches='tight')
50
+
51
+
52
+
53
+ plt.figure()
54
+
55
+ plt.plot(T, SpcH, 'kx-')
56
+
57
+ plt.xlabel(r'Temperature $(\frac{J}{k_B})$')
58
+
59
+ plt.ylabel(r'$C_V$ per site $(\frac{J^2}{k_B^2})$')
60
+
61
+ plt.savefig("Cv8.pdf", format='pdf', bbox_inches='tight')
62
+
63
+
64
+
65
+ plt.figure()
66
+
67
+ plt.plot(T, M, 'bx-')
68
+
69
+ plt.xlabel(r'Temperature $(\frac{J}{k_B})$')
70
+
71
+ plt.ylabel(r'$\langle|M|\rangle$ per site $(\mu)$')
72
+
73
+ plt.savefig("M8.pdf", format='pdf', bbox_inches='tight')
74
+
75
+
76
+
77
+ plt.figure()
78
+
79
+ plt.plot(T, M_sus, 'gx-')
80
+
81
+ plt.xlabel(r'Temperature $(\frac{J}{k_B})$')
82
+
83
+ plt.ylabel(r'$\chi$ $(\frac{\mu}{k_B})$')
84
+
85
+ plt.savefig("chi8.pdf", format='pdf', bbox_inches='tight')
86
+
87
+
88
+
89
+ plt.tight_layout()
90
+
91
+ fig = plt.gcf()
92
+
93
+ plt.show()
94
+
95
+ ```
96
+
97
+
98
+
99
+ > In non-interactive mode, display all figures and block until the figures have been closed; in interactive mode it has no effect unless figures were created prior to a change from non-interactive to interactive mode (not recommended). In that case it displays the figures but does not block.
100
+
101
+ [matplotlib.pyplot.show — Matplotlib 2.2.2 documentation](https://matplotlib.org/api/_as_gen/matplotlib.pyplot.show.html)
102
+
103
+
104
+
105
+
106
+
107
+ まさかこの処理の前にインタラクティブモードとか使ってたりします?