Pyplot pcolormesh confused when alpha not 1

前端 未结 1 1002
Happy的楠姐
Happy的楠姐 2020-12-06 16:46

I am having some difficulty with pyplot\'s awesome drawing abilities. I have selected my very own colormap

n = 6
map = matplotlib.cm.get_cmap(\'Dark2\')
cmap         


        
1条回答
  •  失恋的感觉
    2020-12-06 17:09

    As a minor workaround in the meantime, I found you can get the image closer to what you want by messing with the edgecolor and linewidth attributes. For example, using the following input to pcolormesh:

        plt.pcolormesh(np.random.rand(10,10), cmap = cmapInv, edgecolor=(1.0, 1.0, 1.0, 0.3), linewidth=0.0015625)
    

    outputs the following image:

    enter image description here

    0 讨论(0)
提交回复
热议问题