Matplotlib: How to adjust linewidth in colorbar for contour plot?

前端 未结 2 1761
深忆病人
深忆病人 2021-01-12 14:42

Here\'s a minimal example to generate a plot which illustrates my question:

import matplotlib.pylab as plt
import matplotlib.mpl as mpl
import numpy as np
         


        
2条回答
  •  孤独总比滥情好
    2021-01-12 15:12

    Use Axes.tick_params. As you use CB as the handle to the colorbar, the linewidth in colorbar can be set by:

    CB.ax.tick_params(size = your_size, width = your_width)
    

    size is the length of ticklines in the colorbar. width is the linewidth.

提交回复
热议问题