why does my colorbar have lines in it?

前端 未结 7 543
清歌不尽
清歌不尽 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 02:52

    Try:

    cbar = mymap.colorbar(sc, drawedges=False, location="bottom")
    

    It is now well documented on the web (that I could find), but

    *drawedges*   [ False | True ] If true, draw lines at color
                  boundaries.
    

    (pulled from matplotlib/lib/matplotlib/colorbar.py) I think by setting drawedges to True you are telling it to draw those lines.

提交回复
热议问题