Seaborn будет просто комментировать строки и столбцы графика pcolor (mesh).Чтобы добиться того же, здесь,
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
sample = pd.DataFrame.from_dict({'x': np.tile(np.arange(2,5),(1,5))[0],
'y': np.tile(np.arange(0,5),(1,3))[0],
'value': np.random.rand(15)
})
sample_pvt = sample.pivot_table(index='x',columns='y')
sample_pvt.columns = sample_pvt.columns.droplevel(0)
plt.pcolor(sample_pvt)
plt.xticks(np.arange(len(sample_pvt.columns))+0.5, sample_pvt.columns)
plt.yticks(np.arange(len(sample_pvt.index))+0.5, sample_pvt.index)
plt.show()

Чтобы вместо этого разместить пиксели в числовом правильном порядке, вам нужно сначала решить, если х иЗначения y на самом деле являются центрами или краями пикселей.Для центров:
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np; np.random.seed(42)
sample = pd.DataFrame.from_dict({'x': np.tile(np.arange(2,5),(1,5))[0],
'y': np.tile(np.arange(0,5),(1,3))[0],
'value': np.random.rand(15)
})
sample_pvt = sample.pivot_table(index='x',columns='y')
sample_pvt.columns = sample_pvt.columns.droplevel(0)
x = np.linspace(sample_pvt.columns[0]-0.5, sample_pvt.columns[-1]+0.5, len(sample_pvt.columns)+1)
y = np.linspace(sample_pvt.index[0]-0.5, sample_pvt.index[-1]+0.5, len(sample_pvt.index)+1)
plt.pcolor(x, y, sample_pvt)
plt.show()

Для краев
x = np.linspace(sample_pvt.columns[0], sample_pvt.columns[-1]+1, len(sample_pvt.columns)+1)
y = np.linspace(sample_pvt.index[0], sample_pvt.index[-1]+1, len(sample_pvt.index)+1)
plt.pcolor(x, y, sample_pvt)
