User Tools

Site Tools


wiki:python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:python [2023/11/29 07:16]
okazaki [cartopy]
wiki:python [2023/11/30 03:19] (current)
okazaki [colorbar]
Line 14: Line 14:
   clb.set_ticks(ticks)   clb.set_ticks(ticks)
   clb.set_ticklabels(ticklabels)   clb.set_ticklabels(ticklabels)
 +  
 +==== legend ====
 +https://www.yutaka-note.com/entry/matplotlib_legend
 +=== 位置 ===
 +  ax.legend(bbox_to_anchor=(1,1), loc='upper right', borderaxespad=0)
 +=== 枠線 ===
 +  ax.legend(frameon=False)
 +
 ===== cartopy ===== ===== cartopy =====
 ==== 緯度・経度線 ==== ==== 緯度・経度線 ====
-    gl = ax.gridlines(crs=ccrs.PlateCarree(),draw_labels=True,linewidth=0.5,linestyle='--',color='gray'+  gl = ax.gridlines(crs=ccrs.PlateCarree(),draw_labels=True,linewidth=0.5,linestyle='--',color='gray'
-    gl.xlocator = mticker.FixedLocator([130,135,140]) +  gl.xlocator = mticker.FixedLocator([130,135,140]) 
-    gl.ylocator = mticker.FixedLocator([35,40]) +  gl.ylocator = mticker.FixedLocator([35,40]) 
-    gl.top_labels = False +  gl.top_labels = False 
-    gl.right_labels = False +  gl.right_labels = False 
-    gl.xlabel_style = {'size':6} +  gl.xlabel_style = {'size':6} 
-    gl.ylabel_style = {'size':6}+  gl.ylabel_style = {'size':6}
wiki/python.1701242203.txt.gz · Last modified: 2023/11/29 07:16 by okazaki