1

I have a custom colormap going from red to transparent. When I plot a pcolormesh some darker color lines show between some boxes. What's causing the edge color and how can I get ride of it? (It's not the edgecolor option in pcolormesh)

import matplotlib.colors as mcolors
import matplotlib.pyplot as plt
import numpy as np

a = np.random.random([10,10])

colors = [(1,0,0,i) for i in np.linspace(0,1,15)]
cmap = mcolors.LinearSegmentedColormap.from_list('mycmap', colors, N=3)

plt.pcolormesh(a,cmap=cmap)
plt.colorbar() 

enter image description here

blaylockbk
  • 2,503
  • 2
  • 28
  • 43

0 Answers0