質問編集履歴
2
微修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,11 +38,7 @@
|
|
38
38
|
|
39
39
|
<ipython-input-52-9309a6af578d> in <module>
|
40
40
|
|
41
|
-
30
|
42
|
-
|
43
|
-
31 # plt.savefig("./DATA/EX1_sep.png",dpi=400,bbox_inches="tight")
|
44
|
-
|
45
|
-
---> 32 plt.savefig("./
|
41
|
+
---> 32 plt.savefig("./AAA.png",dpi=400,bbox_inches="tight")
|
46
42
|
|
47
43
|
|
48
44
|
|
@@ -178,16 +174,10 @@
|
|
178
174
|
|
179
175
|
|
180
176
|
|
181
|
-
tmp[2] = axes[0].plot([1,2,3,4],[0.8
|
177
|
+
tmp[2] = axes[0].plot([1,2,3,4],[0.8,0.8,0.8,0.8],color=colorlist[2],label=labels[2],marker=markers[2],linestyle=line[0])
|
182
|
-
|
183
|
-
mean_tmp=[0.851188502,0.849530127,0.847822615,0.848215712]
|
184
178
|
|
185
179
|
tmp[3] = axes[0].plot([1,2,3,4],mean_datas_AA2,color=colorlist[3],label=labels[3],marker=markers[3],linestyle=line[1])
|
186
180
|
|
187
|
-
min_datas_AA2 = [m-s for m,s in zip(mean_datas_AA2,std_datas_AA2)]
|
188
|
-
|
189
|
-
max_datas_AA2 = [m+s for m,s in zip(mean_datas_AA2,std_datas_AA2)]
|
190
|
-
|
191
181
|
|
192
182
|
|
193
183
|
axes[0].set_xlabel(u"k", fontname="MS Gothic")##x軸の目盛指定
|
@@ -206,7 +196,7 @@
|
|
206
196
|
|
207
197
|
ticks = axes[0].set_xticks([1,2,3,4])
|
208
198
|
|
209
|
-
plt.ylim(0.7
|
199
|
+
plt.ylim(0.7,1.0)
|
210
200
|
|
211
201
|
l=axes[0].set_xticklabels([1,3,5,10])#x軸の目盛の表記指定,rotation傾
|
212
202
|
|
1
エラー文追記,該当ソースコード追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,6 +32,122 @@
|
|
32
32
|
|
33
33
|
```
|
34
34
|
|
35
|
+
```
|
36
|
+
|
37
|
+
RuntimeError Traceback (most recent call last)
|
38
|
+
|
39
|
+
<ipython-input-52-9309a6af578d> in <module>
|
40
|
+
|
41
|
+
30
|
42
|
+
|
43
|
+
31 # plt.savefig("./DATA/EX1_sep.png",dpi=400,bbox_inches="tight")
|
44
|
+
|
45
|
+
---> 32 plt.savefig("./DATA/EX1_sep.eps",dpi=400,bbox_inches="tight")
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
python\python37\lib\site-packages\matplotlib\pyplot.py in savefig(*args, **kwargs)
|
50
|
+
|
51
|
+
720 def savefig(*args, **kwargs):
|
52
|
+
|
53
|
+
721 fig = gcf()
|
54
|
+
|
55
|
+
--> 722 res = fig.savefig(*args, **kwargs)
|
56
|
+
|
57
|
+
723 fig.canvas.draw_idle() # need this if 'transparent=True' to reset colors
|
58
|
+
|
59
|
+
724 return res
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
python\python37\lib\site-packages\matplotlib\figure.py in savefig(self, fname, transparent, **kwargs)
|
64
|
+
|
65
|
+
2178 self.patch.set_visible(frameon)
|
66
|
+
|
67
|
+
2179
|
68
|
+
|
69
|
+
-> 2180 self.canvas.print_figure(fname, **kwargs)
|
70
|
+
|
71
|
+
2181
|
72
|
+
|
73
|
+
2182 if frameon:
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
python\python37\lib\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, **kwargs)
|
78
|
+
|
79
|
+
2080 orientation=orientation,
|
80
|
+
|
81
|
+
2081 bbox_inches_restore=_bbox_inches_restore,
|
82
|
+
|
83
|
+
-> 2082 **kwargs)
|
84
|
+
|
85
|
+
2083 finally:
|
86
|
+
|
87
|
+
2084 if bbox_inches and restore_bbox:
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
python\python37\lib\site-packages\matplotlib\backends\backend_ps.py in print_eps(self, outfile, *args, **kwargs)
|
92
|
+
|
93
|
+
840
|
94
|
+
|
95
|
+
841 def print_eps(self, outfile, *args, **kwargs):
|
96
|
+
|
97
|
+
--> 842 return self._print_ps(outfile, 'eps', *args, **kwargs)
|
98
|
+
|
99
|
+
843
|
100
|
+
|
101
|
+
844 def _print_ps(self, outfile, format, *args,
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
python\python37\lib\site-packages\matplotlib\backends\backend_ps.py in _print_ps(self, outfile, format, papertype, dpi, facecolor, edgecolor, orientation, *args, **kwargs)
|
106
|
+
|
107
|
+
869 self._print_figure(outfile, format, dpi, facecolor, edgecolor,
|
108
|
+
|
109
|
+
870 orientation, isLandscape, papertype,
|
110
|
+
|
111
|
+
--> 871 **kwargs)
|
112
|
+
|
113
|
+
872
|
114
|
+
|
115
|
+
873 def _print_figure(
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
python\python37\lib\site-packages\matplotlib\backends\backend_ps.py in _print_figure(self, outfile, format, dpi, facecolor, edgecolor, orientation, isLandscape, papertype, metadata, dryrun, bbox_inches_restore, **kwargs)
|
120
|
+
|
121
|
+
1105 else:
|
122
|
+
|
123
|
+
1106 with open(outfile, 'w', encoding='latin-1') as fh:
|
124
|
+
|
125
|
+
-> 1107 print_figure_impl(fh)
|
126
|
+
|
127
|
+
1108
|
128
|
+
|
129
|
+
1109 def _print_figure_tex(
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
python\python37\lib\site-packages\matplotlib\backends\backend_ps.py in print_figure_impl(fh)
|
134
|
+
|
135
|
+
1044 try:
|
136
|
+
|
137
|
+
1045 convert_ttf_to_ps(os.fsencode(font_filename),
|
138
|
+
|
139
|
+
-> 1046 fh, fonttype, glyph_ids)
|
140
|
+
|
141
|
+
1047 except RuntimeError:
|
142
|
+
|
143
|
+
1048 _log.warning("The PostScript backend does not "
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
RuntimeError: TrueType font is missing table
|
148
|
+
|
149
|
+
```
|
150
|
+
|
35
151
|
|
36
152
|
|
37
153
|
### 該当のソースコード
|
@@ -40,6 +156,64 @@
|
|
40
156
|
|
41
157
|
```ここに言語名を入力
|
42
158
|
|
159
|
+
fig,axes = plt.subplots(1,2, sharex="all", sharey="all")
|
160
|
+
|
161
|
+
colorlist = ["g","m","g","m"]
|
162
|
+
|
163
|
+
markers=["o","v","o","v"]
|
164
|
+
|
165
|
+
labels=["1","2","1","2"]
|
166
|
+
|
167
|
+
line=["solid","dashed"]
|
168
|
+
|
169
|
+
tmp=["","","",""]
|
170
|
+
|
171
|
+
j = 0
|
172
|
+
|
173
|
+
for data in zip(mean_datas_N,std_datas_N,min_datas_N,max_datas_N):
|
174
|
+
|
175
|
+
tmp[j] = axes[1].plot([1,2,3,4],data[0],color=colorlist[j],label=labels[j],marker=markers[j],linestyle = line[j])
|
176
|
+
|
177
|
+
j = j+1
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
tmp[2] = axes[0].plot([1,2,3,4],[0.851188502,0.849530127,0.847822615,0.848215712],color=colorlist[2],label=labels[2],marker=markers[2],linestyle=line[0])
|
182
|
+
|
183
|
+
mean_tmp=[0.851188502,0.849530127,0.847822615,0.848215712]
|
184
|
+
|
185
|
+
tmp[3] = axes[0].plot([1,2,3,4],mean_datas_AA2,color=colorlist[3],label=labels[3],marker=markers[3],linestyle=line[1])
|
186
|
+
|
187
|
+
min_datas_AA2 = [m-s for m,s in zip(mean_datas_AA2,std_datas_AA2)]
|
188
|
+
|
189
|
+
max_datas_AA2 = [m+s for m,s in zip(mean_datas_AA2,std_datas_AA2)]
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
axes[0].set_xlabel(u"k", fontname="MS Gothic")##x軸の目盛指定
|
194
|
+
|
195
|
+
axes[1].set_xlabel(u"k", fontname="MS Gothic")##x軸の目盛指定
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
axes[0].set_ylabel(u"a", fontname="MS Gothic")##y軸の目盛指定
|
200
|
+
|
201
|
+
axes[0].set_title(u"A", fontname="MS Gothic")
|
202
|
+
|
203
|
+
axes[1].set_title(u"N", fontname="MS Gothic")
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
ticks = axes[0].set_xticks([1,2,3,4])
|
208
|
+
|
209
|
+
plt.ylim(0.78,1.01)
|
210
|
+
|
211
|
+
l=axes[0].set_xticklabels([1,3,5,10])#x軸の目盛の表記指定,rotation傾
|
212
|
+
|
213
|
+
plt.subplots_adjust(wspace=0.05,right=0.85)
|
214
|
+
|
215
|
+
axes[0].legend(loc="upper left", prop={"family":"MS Gothic","size":"14"})#,title=u"加工")
|
216
|
+
|
43
217
|
plt.savefig("./AAA.eps",dpi=400,bbox_inches="tight")
|
44
218
|
|
45
219
|
```
|