Skip to content

Instantly share code, notes, and snippets.

@darribas
Created February 4, 2021 12:21
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darribas/693117fc8f754d01f61cad53025436c9 to your computer and use it in GitHub Desktop.
Save darribas/693117fc8f754d01f61cad53025436c9 to your computer and use it in GitHub Desktop.
Contextily labels examples
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lucascunha1979
Copy link

Hi Daniel! this code is great, but I have a problem here to run it:

on lines 11 and 12 I get this message
"AttributeError: 'AxesImage' object has no property 'source' ", but the images still appear and on line 13 I get this message
" TypeError: __init __ () got an unexpected keyword argument 'source' " and the image does not appear. what could be happening? I updated all packages but the error remains.

in advance grateful, Lucas

@darribas
Copy link
Author

darribas commented Feb 5, 2021

what version of contextily are you using? We added source a couple of releases ago. I'd recommend to make sure you're on the latest (1.1.0) because otherwise the labels won't work. You should be able to upgrade by:

pip install -U contextily==1.1.0

Or conda:

conda install -c conda-forge contextily==1.1.0

@lucascunha1979
Copy link

Yeah ... yesterday it showed it for the "1.0rc2" update but today it shows it '1.1.0' ... now it worked and I can get the night views ... thanks a lot for your attention Daniel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment