質問編集履歴
2
微修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,9 +18,7 @@
|
|
18
18
|
```
|
19
19
|
RuntimeError Traceback (most recent call last)
|
20
20
|
<ipython-input-52-9309a6af578d> in <module>
|
21
|
-
30
|
22
|
-
31 # plt.savefig("./DATA/EX1_sep.png",dpi=400,bbox_inches="tight")
|
23
|
-
---> 32 plt.savefig("./
|
21
|
+
---> 32 plt.savefig("./AAA.png",dpi=400,bbox_inches="tight")
|
24
22
|
|
25
23
|
python\python37\lib\site-packages\matplotlib\pyplot.py in savefig(*args, **kwargs)
|
26
24
|
720 def savefig(*args, **kwargs):
|
@@ -88,11 +86,8 @@
|
|
88
86
|
tmp[j] = axes[1].plot([1,2,3,4],data[0],color=colorlist[j],label=labels[j],marker=markers[j],linestyle = line[j])
|
89
87
|
j = j+1
|
90
88
|
|
91
|
-
tmp[2] = axes[0].plot([1,2,3,4],[0.
|
89
|
+
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])
|
92
|
-
mean_tmp=[0.851188502,0.849530127,0.847822615,0.848215712]
|
93
90
|
tmp[3] = axes[0].plot([1,2,3,4],mean_datas_AA2,color=colorlist[3],label=labels[3],marker=markers[3],linestyle=line[1])
|
94
|
-
min_datas_AA2 = [m-s for m,s in zip(mean_datas_AA2,std_datas_AA2)]
|
95
|
-
max_datas_AA2 = [m+s for m,s in zip(mean_datas_AA2,std_datas_AA2)]
|
96
91
|
|
97
92
|
axes[0].set_xlabel(u"k", fontname="MS Gothic")##x軸の目盛指定
|
98
93
|
axes[1].set_xlabel(u"k", fontname="MS Gothic")##x軸の目盛指定
|
@@ -102,7 +97,7 @@
|
|
102
97
|
axes[1].set_title(u"N", fontname="MS Gothic")
|
103
98
|
|
104
99
|
ticks = axes[0].set_xticks([1,2,3,4])
|
105
|
-
plt.ylim(0.
|
100
|
+
plt.ylim(0.7,1.0)
|
106
101
|
l=axes[0].set_xticklabels([1,3,5,10])#x軸の目盛の表記指定,rotation傾
|
107
102
|
plt.subplots_adjust(wspace=0.05,right=0.85)
|
108
103
|
axes[0].legend(loc="upper left", prop={"family":"MS Gothic","size":"14"})#,title=u"加工")
|
1
エラー文追記,該当ソースコード追記しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,10 +15,97 @@
|
|
15
15
|
The PostScript backend does not support transparency; partially transparent artists will be rendered opaque.
|
16
16
|
The PostScript backend does not currently support the selected font.
|
17
17
|
```
|
18
|
+
```
|
19
|
+
RuntimeError Traceback (most recent call last)
|
20
|
+
<ipython-input-52-9309a6af578d> in <module>
|
21
|
+
30
|
22
|
+
31 # plt.savefig("./DATA/EX1_sep.png",dpi=400,bbox_inches="tight")
|
23
|
+
---> 32 plt.savefig("./DATA/EX1_sep.eps",dpi=400,bbox_inches="tight")
|
18
24
|
|
25
|
+
python\python37\lib\site-packages\matplotlib\pyplot.py in savefig(*args, **kwargs)
|
26
|
+
720 def savefig(*args, **kwargs):
|
27
|
+
721 fig = gcf()
|
28
|
+
--> 722 res = fig.savefig(*args, **kwargs)
|
29
|
+
723 fig.canvas.draw_idle() # need this if 'transparent=True' to reset colors
|
30
|
+
724 return res
|
31
|
+
|
32
|
+
python\python37\lib\site-packages\matplotlib\figure.py in savefig(self, fname, transparent, **kwargs)
|
33
|
+
2178 self.patch.set_visible(frameon)
|
34
|
+
2179
|
35
|
+
-> 2180 self.canvas.print_figure(fname, **kwargs)
|
36
|
+
2181
|
37
|
+
2182 if frameon:
|
38
|
+
|
39
|
+
python\python37\lib\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, **kwargs)
|
40
|
+
2080 orientation=orientation,
|
41
|
+
2081 bbox_inches_restore=_bbox_inches_restore,
|
42
|
+
-> 2082 **kwargs)
|
43
|
+
2083 finally:
|
44
|
+
2084 if bbox_inches and restore_bbox:
|
45
|
+
|
46
|
+
python\python37\lib\site-packages\matplotlib\backends\backend_ps.py in print_eps(self, outfile, *args, **kwargs)
|
47
|
+
840
|
48
|
+
841 def print_eps(self, outfile, *args, **kwargs):
|
49
|
+
--> 842 return self._print_ps(outfile, 'eps', *args, **kwargs)
|
50
|
+
843
|
51
|
+
844 def _print_ps(self, outfile, format, *args,
|
52
|
+
|
53
|
+
python\python37\lib\site-packages\matplotlib\backends\backend_ps.py in _print_ps(self, outfile, format, papertype, dpi, facecolor, edgecolor, orientation, *args, **kwargs)
|
54
|
+
869 self._print_figure(outfile, format, dpi, facecolor, edgecolor,
|
55
|
+
870 orientation, isLandscape, papertype,
|
56
|
+
--> 871 **kwargs)
|
57
|
+
872
|
58
|
+
873 def _print_figure(
|
59
|
+
|
60
|
+
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)
|
61
|
+
1105 else:
|
62
|
+
1106 with open(outfile, 'w', encoding='latin-1') as fh:
|
63
|
+
-> 1107 print_figure_impl(fh)
|
64
|
+
1108
|
65
|
+
1109 def _print_figure_tex(
|
66
|
+
|
67
|
+
python\python37\lib\site-packages\matplotlib\backends\backend_ps.py in print_figure_impl(fh)
|
68
|
+
1044 try:
|
69
|
+
1045 convert_ttf_to_ps(os.fsencode(font_filename),
|
70
|
+
-> 1046 fh, fonttype, glyph_ids)
|
71
|
+
1047 except RuntimeError:
|
72
|
+
1048 _log.warning("The PostScript backend does not "
|
73
|
+
|
74
|
+
RuntimeError: TrueType font is missing table
|
75
|
+
```
|
76
|
+
|
19
77
|
### 該当のソースコード
|
20
78
|
|
21
79
|
```ここに言語名を入力
|
80
|
+
fig,axes = plt.subplots(1,2, sharex="all", sharey="all")
|
81
|
+
colorlist = ["g","m","g","m"]
|
82
|
+
markers=["o","v","o","v"]
|
83
|
+
labels=["1","2","1","2"]
|
84
|
+
line=["solid","dashed"]
|
85
|
+
tmp=["","","",""]
|
86
|
+
j = 0
|
87
|
+
for data in zip(mean_datas_N,std_datas_N,min_datas_N,max_datas_N):
|
88
|
+
tmp[j] = axes[1].plot([1,2,3,4],data[0],color=colorlist[j],label=labels[j],marker=markers[j],linestyle = line[j])
|
89
|
+
j = j+1
|
90
|
+
|
91
|
+
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])
|
92
|
+
mean_tmp=[0.851188502,0.849530127,0.847822615,0.848215712]
|
93
|
+
tmp[3] = axes[0].plot([1,2,3,4],mean_datas_AA2,color=colorlist[3],label=labels[3],marker=markers[3],linestyle=line[1])
|
94
|
+
min_datas_AA2 = [m-s for m,s in zip(mean_datas_AA2,std_datas_AA2)]
|
95
|
+
max_datas_AA2 = [m+s for m,s in zip(mean_datas_AA2,std_datas_AA2)]
|
96
|
+
|
97
|
+
axes[0].set_xlabel(u"k", fontname="MS Gothic")##x軸の目盛指定
|
98
|
+
axes[1].set_xlabel(u"k", fontname="MS Gothic")##x軸の目盛指定
|
99
|
+
|
100
|
+
axes[0].set_ylabel(u"a", fontname="MS Gothic")##y軸の目盛指定
|
101
|
+
axes[0].set_title(u"A", fontname="MS Gothic")
|
102
|
+
axes[1].set_title(u"N", fontname="MS Gothic")
|
103
|
+
|
104
|
+
ticks = axes[0].set_xticks([1,2,3,4])
|
105
|
+
plt.ylim(0.78,1.01)
|
106
|
+
l=axes[0].set_xticklabels([1,3,5,10])#x軸の目盛の表記指定,rotation傾
|
107
|
+
plt.subplots_adjust(wspace=0.05,right=0.85)
|
108
|
+
axes[0].legend(loc="upper left", prop={"family":"MS Gothic","size":"14"})#,title=u"加工")
|
22
109
|
plt.savefig("./AAA.eps",dpi=400,bbox_inches="tight")
|
23
110
|
```
|
24
111
|
|