teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

2

修正

2020/05/08 08:16

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -30,6 +30,8 @@
30
30
  x = np.arange(100)
31
31
  y = x ** 2
32
32
  fig, ax = plt.subplots(figsize=(w_inch, h_inch))
33
+ fig.subplots_adjust(left=0, right=1, top=1, bottom=0) # 図の周りの余白削除
34
+ ax.set_axis_off() # xy の目盛り軸削除
33
35
 
34
36
  roadshape = 'filename.shp'
35
37
  data = gpd.read_file(roadshape)

1

修正

2020/05/08 08:16

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -38,5 +38,5 @@
38
38
  out = BytesIO()
39
39
  fig.savefig(out, format='png')
40
40
  img = Image.open(out)
41
- img.save('3dPlot.tiff')
41
+ img.save('sample.tiff')
42
42
  ```