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

Problem when plotting #108

Open
PeterKammLab opened this issue Feb 9, 2023 · 2 comments
Open

Problem when plotting #108

PeterKammLab opened this issue Feb 9, 2023 · 2 comments

Comments

@PeterKammLab
Copy link

I had a problems with importing prettymaps, that's solved now. However there is a specific problem now (see image):

import prettymaps
plot = prettymaps.plot('Stad van de Zon, Heerhugowaard, Netherlands')
C:\Users\pkoljensic\Anaconda3\envs\prettymaps\Lib\site-packages\osmnx\geocoder.py:110: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
gdf = gdf.append(_geocode_query_to_gdf(q, wr, by_osmid))
C:\Users\pkoljensic\Anaconda3\envs\prettymaps\Lib\site-packages\prettymaps\draw.py:109: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry.
layers = dict(zip(k, v))

AttributeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 plot = prettymaps.plot('Stad van de Zon, Heerhugowaard, Netherlands')

File ~\Anaconda3\envs\prettymaps\Lib\site-packages\prettymaps\draw.py:251, in plot(query, backup, postprocessing, radius, layers, drawing_kwargs, osm_credit, figsize, ax, title, vsketch, x, y, scale_x, scale_y, rotation)
244 ############
245 ### Plot ###
246 ############
247
248 # Matplot-specific stuff (only run if vsketch mode isn't activated)
249 if vsketch is None:
250 # Ajust axis
--> 251 ax.axis("off")
252 ax.axis("equal")
253 ax.autoscale()

AttributeError: 'NoneType' object has no attribute 'axis'

@finnharbeke
Copy link

I came across the same error when trying to install prettymaps. This is due to the vsketch dependency conflict I think. Anyways, the dev fixed it in the newest beta version which should soon be released officially. For now install prettymaps with pip like so:

pip install prettymaps==0.2b2

Hope this solves your problem!

@marceloprates
Copy link
Owner

I have released v1.0.0, you can install it with
pip install prettymaps

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