I have the following code and am trying to plot a contour plot of my data. I tried following some few example from the forum with no success. The plot I produce running this code is not really good. Any advice will be greatly appreciated. Thank you in advance for your assistance.
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import matplotlib.pyplot as plt
import numpy as np
import scipy.interpolate
N = 1000 # number of points for plotting/interpolation
FR = np.array([[0.763, 0.762, 0.954, 0.000, 0.835, 0.000],
[0.000, 1.052, 1.080, 1.176, 0.864, 0.811],
[1.179, 1.148, 1.368, 0.000, 1.147, 0.000],
[0.000, 1.279, 1.315, 1.434, 1.031, 0.880],
[1.176, 1.134, 1.355, 0.000, 1.131, 0.000],
[0.000, 1.008, 1.045, 1.092, 0.840, 0.724],
[0.672, 0.682, 0.755, 0.708, 0.643, 0.000]])
x = np.arange(1, 7)
y = np.arange(7, 1 + (-1), -1)
# Set up a regular grid of interpolation points
# xi, yi = np.linspace(x.min(), x.max(), N), np.linspace(y.min(), y.max(), N)
# xi, yi = np.meshgrid(xi, yi)
# Interpolate
# rbf = scipy.interpolate.Rbf(x, y, z, function='linear')
# zi = rbf(xi, yi)
# plt.imshow(zi, vmin=z.min(), vmax=z.max(), origin='lower',
# extent=[x.min(), x.max(), y.min(), y.max()])
# plt.scatter(x, y, c=z)
# plt.colorbar()
# plt.show()
# plt.imshow(FR, interpolation='nearest')
# xi = np.linspace(x.min(), x.max(), N)
# yi = np.linspace(y.min(), y.max(), N)
# zi = scipy.interpolate.griddata((x, y), z, (xi[None,:], yi[:,None]), method='cubic')
# fig = plt.figure()
# plt.contour(xi, yi, zi)
# plt.xlabel("X")
# plt.ylabel("Y")
# plt.show()
# plt.pcolor()
# plt.colorbar()
plt.contourf(FR)
plt.axis('off')
plt.grid()
plt.show()
