pandas - Python: (Seaborn?) heat map from irregular meshgrid -
lets have 2 given meshgrids (e.g. measured data):
- grid_1 ranges
x=(-10...10); y=(-10...10)step size of 1 - grid_2 ranges
x=(-30...-10) & x=(10...30); y=(-30...-10) & y=(10...30)step size of 5, has hole of size of grid_1 - i have z-values (
'dose') every pair ofxi, yiboth meshgrids , both datasets present tables 3 columnsx, y, dose
i tried draw heat map representation of data using seaborn's heatmap() function:
dm1 = df1.pivot('y', 'x', 'dose') opts = {'cmap': 'ylgnbu_r'} ax = sns.heatmap(dm1, **opts) ax.invert_yaxis() plt.savefig('dosemap-test-smooth.pdf') dm2 = df2.pivot('y', 'x', 'dose') ax = sns.heatmap(dm2, **opts) ax.invert_yaxis() plt.savefig('dosemap-test-coarse.pdf') df = df1.append(df2) dm = df.pivot('y', 'x', 'dose') ax = sns.heatmap(dm2, **opts) ax.invert_yaxis() plt.savefig('dosemap-test-total.pdf') drawing 2 meshgrids independent 1 works fine, drawing them breaks binning(?) of heatmap. question is: how can achieve draw heatmap(-like) representation of 'irregularly' distributed data using python? :)
thanks in advance help!


