X Tutup
Skip to content

Rendering vector graphics: parsing polygons? #6258

@Makosak

Description

@Makosak
  • Matplotlib 1.5.1, Python 2.7.11, OSX 10.11.3
  • installed via pip, conda virtual env

Is the rendering of a map (or collection of polygons) in MatPlotLib hardcoded? I'd like to parse out the polygons for interaction, and was exploring ways do it with matplotlib and mpld3 extensions. Parsing out points in a scatter plot is no problem, but the polygons only show lat/long coordinates, where I'd like to hover on a specific polygon and pull its attributes and info. From mpl3d documentation there were some comments of hardcoding certain parameters, so perhaps that's the same issue? In other words, I'd like my vector graphics appear as vectors, not flattened rasters.

I also tried adding a line to force rendering as an SVG image, to potentially parse the polygons that way, but had the same result. (%config InlineBackend.figure_format = 'svg' ) It looks like a file i/o workflow would be required to get get around this, but ideally could visualize in matplotlib all the way (or at least in a way that could be easily pulled into mpld3).

screen shot 2016-04-01 at 10 44 43 am

screen shot 2016-04-01 at 10 44 33 am

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup