why does my colorbar have lines in it?

前端 未结 7 520
清歌不尽
清歌不尽 2020-12-03 02:25

Edit: Since this seems to be a popular post, here\'s the solution that seems to be working well for me. Thanks @gazzar and @mfra.

cbar.solid         


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-03 03:11

    I generally prefer to rasterize the colorbar contents to avoid this issue using Eric Firing's advice here by adding the following line.

    cbar.solids.set_rasterized(True) 
    

    This workaround supposedly fails for images with transparency, but for most normal cases it produces the desired result.

提交回复
热议问题