[ACCEPTED]-Is it possible to display 2D array as polar plot using Matplotlib imshow()?-matplotlib

Accepted answer
Score: 15

After some research I discovered the pcolormesh() function, which 3 has proven to be significantly faster than using pcolor() and 2 comparable to the speed of imshow().

Here 1 is my solution:

import matplotlib.pyplot as plt
import numpy as np

#...some data processing

theta,rad = np.meshgrid(used_theta, used_rad) #rectangular plot of polar data
X = theta
Y = rad

fig = plt.figure()
ax = fig.add_subplot(111)
ax.pcolormesh(X, Y, data2D) #X,Y & data2D must all be same dimensions

More Related questions