Skip to content

Respect Page Margins for large figures/ dataframes in docs.Β #650

@r3kste

Description

@r3kste
  • optimagic version used, if any: v0.5.2 (stable)
  • Python version, if any: N/A
  • Operating System: N/A

What would you like to enhance and why? Is it related to an issue/problem?

Before #647, large figures and dataframes in the documentation were clipping outside the page margins. An example is shown below, where the legend entries of the plotly figure are cut off:

Image

As a temporary fix, #647 enabled myst-nb's nb_scroll_outputs in /docs/source/conf.py, which allows scrolling within figure and dataframe outputs to avoid clipping.

Describe the solution you'd like

An ideal solution would be to update the documentation styling so that large outputs are automatically fit within the page margins, without needing to rely on scrolling.

Describe alternatives you've considered

In most cases, scrolling is not desirable, as it makes viewing figures and tables less comfortable.

For figures, one option is to resize them manually, but this is not ideal and might not work consistently across different devices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions