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

Accepted answer

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
plt.show()
```

Source:
stackoverflow.com

More Related questions

Cookie Warning

We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.