1

I would like to create a polar plot with a polar zoom. This is what I have done do far:

fig = plt.figure(figsize=(30, 15))
G = gridspec.GridSpec(1, 2)

axes_1 = plt.subplot(G[0],projection='polar')

axes_1.inset_axes(bounds=[0.0,0.0,0.1,0.1],projection='polar')


axes_2 = plt.subplot(G[1])

and here the error that I get:

'Axes' object has no property 'projection'

This is quite strange, because in the manual of inset_axes I have found the option projection (here).

There are some attempts here, but for me is totally unclear, or here, but this last it is not what I what. It is just another plot.

Thanks

diedro
  • 511
  • 1
  • 3
  • 15

1 Answers1

0

From version 3.6, matplotlib.axes.Axes.inset_axes accepts "polar" and "projection" parameters. If you use a older version, there is also a workaround using mpl_toolkits.axes_grid1.inset_locator.inset_axes() (see this answer).

Creating a rectangular zoom of a polar plot is not as straightforward, but this answer may help you.

hrgu
  • 11
  • 3