Change the label size and tick label size of colorbar
See original GitHub issueMCVE Code Sample
# Your code here
import xarray as xr
airtemps = xr.tutorial.open_dataset('air_temperature')
air = airtemps.air - 273.15
air2d = air.isel(time=500)
air2d.plot.pcolormesh(add_colorbar=True, add_labels=True,
cbar_kwargs=dict(orientation='horizontal',
pad=0.15, shrink=1, label='Temperature ($^{\circ}$C)'))
Expected Output
Problem Description
Is it possible to change the label size and ticks label size of colorbar?
size
and labelsize
don’t work in cbar_kwargs
.
Output of xr.show_versions()
# Paste the output here xr.show_versions() here
INSTALLED VERSIONS
------------------
commit: None
python: 3.6.7 (default, Feb 28 2019, 07:28:18) [MSC v.1900 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
libhdf5: 1.10.4
libnetcdf: 4.6.2
xarray: 0.12.1 pandas: 0.24.2 numpy: 1.16.3 scipy: 1.2.1 netCDF4: 1.5.1.1 pydap: None h5netcdf: None h5py: 2.9.0 Nio: None zarr: None cftime: 1.0.3.4 nc_time_axis: None PseudonetCDF: None rasterio: 1.0.22 cfgrib: None iris: None bottleneck: None dask: 1.2.0 distributed: 1.27.1 matplotlib: 3.1.1 cartopy: 0.17.0 seaborn: None setuptools: 41.0.1 pip: 19.1 conda: None pytest: None IPython: 7.6.1 sphinx: None
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How do I change the font size of ticks of matplotlib.pyplot ...
Initialize a variable for fontsize to change the tick size of the colorbar. Use axis tick_params() method to set the tick size of...
Read more >Change the label size and tick label size of colorbar using ...
In this article, we will learn how to change the label size and tick label size of colorbar in Matplotlib using Python. Labels...
Read more >Python matplotlib decrease size of colorbar labels
I would like to set the label size of the colorbar labels (e.g. 0,10,20,...60) to size of 10 or smaller. This will probably...
Read more >Colorbar appearance and behavior - MATLAB - MathWorks
ColorBar properties control the appearance and behavior of a ColorBar object. ... TickLabelInterpreter — Tick label interpreter ... FontSize — Font size
Read more >How to modify label size in colorbar of seaborn clustermap?
position and I changed the yticks label with this command plt.tick_params(labelsize=15), but I'm not able to change the size of the label? Is ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dcherian Thanks! Figure out now:
@Ricbrag something like this should work: