Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PolarAxesSubplot' object has no attribute 'flat #192

Closed
rs06085 opened this issue Jul 30, 2018 · 1 comment
Closed

PolarAxesSubplot' object has no attribute 'flat #192

rs06085 opened this issue Jul 30, 2018 · 1 comment

Comments

@rs06085
Copy link

rs06085 commented Jul 30, 2018

I am trying to run an example I found on this repo: osmnx-examples

The issue is with matplotlib

create figure and axes

n = len(places)
ncols = int(np.ceil(np.sqrt(n)))
nrows = int(np.ceil(n / ncols))
figsize = (ncols * 5, nrows * 5)
fig, axes = plt.subplots(nrows, ncols, figsize=figsize, subplot_kw={'projection':'polar'})

plot each city's polar histogram

for ax, place in zip(axes.flat, sorted(places.keys())):
polar_plot(ax, bearings[place].dropna(), title=place)

when I run this code, I receive the following error:
AttributeError: 'PolarAxesSubplot' object has no attribute 'flat'

I use Python 3.6

Thanks in advance!

@gboeing
Copy link
Owner

gboeing commented Jul 30, 2018

Can you provide a complete minimal working example for me to run? It would appear that you are not creating multiple subplots, but you are trying to flatten as though you were.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants