8000 Write canonical example of how to use Matplotlib inside a webserver · Issue #12628 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Write canonical example of how to use Matplotlib inside a webserver #12628
Closed
@tacaswell

Description

@tacaswell

As shown by #11094 #12612 matplotlib is used inside of webservers to dynamically serve plots. The example should show:

  1. importance of picking a non-GUI backend (both by setting the backend and explicitly by not using pyplot). Given that these servers are multi-threaded, not using pyplot at all may be the best option to avoid any coupling between workers via pyplot and memory leaks due to pyplot holding references to figures forever. Should probably show use of new_figure_manager
  2. saving to a bytesIO buffer to avoid disk
  3. png, svg, and pdf
  4. be applicable to both django and flask (not sure off the top of my head what the differences are), bonus points for cherrypy, aiohttp, tornado, and pyramid

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationGood first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0