Skip to content

Export plot objects as plotly Figures #1

@BryanBaird

Description

@BryanBaird

This may be a simpler one, but the current plotting code includes multiple steps:

  1. Some helpful data munging
  2. Some aesthetic design options for the plots
  3. A call to plotly express show() the ultimately generated plot here: https://github.com/mozilla/mozaic-forecasting/blob/2becad6a9b372c8f0d732f91ee92f6b8d7b06fed/mozaic/plotting.py#L18C1-L40

By either just removing this fig.show() call, or setting up a different function call that outputs the plot object, it will still automatically render in most typical Jupyter/iPython/Notebook contexts. But it will have the benefit of being customizable after-the-fact, which the current approach is not--at least not without extensive workarounds.

Example: Wanting to manually specify the x-axis date range of the plot, or change the title/legends, or add an annotation region.

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