0

I am plotting footprints in python in a Colab notebook with the osmnx plot module and it all works great until I add

edge_color='black'

which leads to the error:

TypeError: plot_footprints() got an unexpected keyword argument 'edge_color'

so this works:

ox.plot.plot_footprints(greens, color='green', bgcolor='white')

and this doesn't:

ox.plot.plot_footprints(greens, color='green', bgcolor='white', edge_color='black')

What is my mistake? (The same problem with for edge_linewidth).

  • What version of OSMnx are you using? – gboeing Jun 23 '22 at 14:51
  • This is how install it on Google Colab: `!apt install libspatialindex-dev !pip install osmnx` – JoScratcherJo Jun 23 '22 at 17:39
  • 1
    Nevertheless, what version are you using? Ensure it is the latest (1.2.1). – gboeing Jun 23 '22 at 19:49
  • Thank you @gboeing . Turns out [Google Colab][1] is on Python 3.7 with [no date set for an upgrade][2] and hence the latest OSMnx version available on Colab is 1.1.2. I don't think the [documentation for OSMnx 1.1.2][3] is still available for me to find a way to make edge_color work, is it? [1]: https://colab.research.google.com/ [2]: https://github.com/googlecolab/colabtools/issues/2165 [3]: https://readthedocs.org/projects/osmnx/versions/ – JoScratcherJo Jun 24 '22 at 09:11
  • 1
    Note that OSMnx only supports the three most recent versions of Python (since we don't conduct testing on older versions). The argument you want was introduced in the most recent OSMnx minor release, which is compatible with python 3.8+ https://github.com/gboeing/osmnx/blob/main/CHANGELOG.md#120-2022-05-23 – gboeing Jun 24 '22 at 15:28
  • 1
    See https://stackoverflow.com/questions/68657341/how-can-i-update-google-colabs-python-version for python versions on colab – gboeing Jun 24 '22 at 23:29
  • Yes, I saw that and tried (and I am out of my depth here), but this https://github.com/googlecolab/colabtools/issues/2165 suggests that upgrading Python on Google Colab isn't _really_ feasible because it _"[...] just adds a new Python version to your google colab and updates the default Pyhon. But your runtime packages such as sys are still running on the previous default python version. For your new installed Python, you need to install everything from scratch."_ as @Kaveh says in the comments... – JoScratcherJo Jun 25 '22 at 04:54

0 Answers0