mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
fix labels warning, fix cbar extend warning
For the contourf function (last code block) the extend='both' parameter has to be passed into the contourf() function and removed from the colorbar() function in order to work and to not get a warning.
This commit is contained in:
parent
19bab374b9
commit
2e29d3b5ff
1 changed files with 3 additions and 3 deletions
|
@ -944,7 +944,7 @@
|
|||
" ax.set_extent(bbox)\n",
|
||||
" ax.coastlines(resolution='50m')\n",
|
||||
" gl = ax.gridlines(draw_labels=True)\n",
|
||||
" gl.xlabels_top = gl.ylabels_right = False\n",
|
||||
" gl.top_labels = gl.right_labels = False\n",
|
||||
" gl.xformatter = LONGITUDE_FORMATTER\n",
|
||||
" gl.yformatter = LATITUDE_FORMATTER\n",
|
||||
" return fig, ax\n",
|
||||
|
@ -987,8 +987,8 @@
|
|||
"source": [
|
||||
"fig2, ax2 = make_map(bbox=bbox)\n",
|
||||
"cs2 = ax2.contourf(lons, lats, data, 80, cmap=cmap,\n",
|
||||
" vmin=data.min(), vmax=data.max())\n",
|
||||
"cbar2 = fig2.colorbar(cs2, extend='both', shrink=0.5, orientation='horizontal')\n",
|
||||
" vmin=data.min(), vmax=data.max(), extend='both')\n",
|
||||
"cbar2 = fig2.colorbar(cs2, shrink=0.5, orientation='horizontal')\n",
|
||||
"cbar2.set_label(grid.getLocationName() +\" \" + grid.getLevel() + \" \" \\\n",
|
||||
" + grid.getParameter() + \" (\" + grid.getUnit() + \") \" \\\n",
|
||||
" + \"valid \" + str(grid.getDataTime().getRefTime()))"
|
||||
|
|
Loading…
Add table
Reference in a new issue