In order to plot a very high resolution array (1440*720) in matplotlib, I have resorted to using the decimate method of scipy.
However when trialing the function, it appeared to show some odd behaviour, where the top row of the plots looked brighter than the subsequent duller rows.
The following is a minimal reproducible example that should show the strange behaviour.
What might I be doing wrong?
import matplotlib.pyplot as plt
import numpy as np
import scipy.signal as sp
n=8
data = np.random.rand(64,64)
fig, ax1 = plt.subplots(num=444, nrows=1, ncols=1, figsize=(8, 6))
p1 = ax1.pcolor(np.flipud(data))
fig.colorbar(p1, ax=ax1, orientation='vertical', format='%.1f')
ax1.set_xlabel("X")
ax1.set_title(data.shape);
data2 = sp.decimate(data, n, n=None, ftype='iir', axis=0, zero_phase=True)
fig, ax1 = plt.subplots(num=445, nrows=1, ncols=1, figsize=(8, 6))
p1 = ax1.pcolor(np.flipud(data2))
fig.colorbar(p1, ax=ax1, orientation='vertical', format='%.1f')
ax1.set_xlabel("X")
ax1.set_title(data2.shape);
data3 = sp.decimate(data2, n, n=None, ftype='iir', axis=1, zero_phase=True)
fig, ax1 = plt.subplots(num=446, nrows=1, ncols=1, figsize=(8, 6))
p1 = ax1.pcolor(np.flipud(data3))
fig.colorbar(p1, ax=ax1, orientation='vertical', format='%.0f')
ax1.set_xlabel("X")
ax1.set_title(data3.shape);