0

Based on the feature in the documentation

https://geopandas.org/en/stable/docs/user_guide/interactive_mapping.html

Does anyone know of a way to save these interactive plots as PNG or JPEG?

Tired save() but this didn't seem to work. Expected a replica of the interactive map produced in the notebook, but saved as a PNG to a directory.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
MB232
  • 33
  • 7
  • I think this is a duplicate of [Export a folium map as a png](https://stackoverflow.com/questions/53565979/export-a-folium-map-as-a-png) – mkrieger1 Apr 12 '23 at 08:56
  • 1
    But probably it would be easier to convert a "static plot" to an image than an "interactive map". Or, if you are doing this interactively anyway, you could just create a screenshot. – mkrieger1 Apr 12 '23 at 08:58
  • When doing `mb21_plot = mb21_plot._to_png(5) mb21_plot.save('my_map.png')`, I get the error `Message: 'geckodriver' executable needs to be in PATH. `. I considered screenshotting, but it just seems a little clunky and not very reproducible – MB232 Apr 12 '23 at 09:06

0 Answers0