Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
35 lines (26 loc) · 1.18 KB

File metadata and controls

35 lines (26 loc) · 1.18 KB
Copy raw file
Download raw file
Outline
Edit and raw actions

HTML Customization

We often get issues/questions regarding customization of the HTML output. In most situations, these are not related to Plotly functionality but rather custom behavior related to HTML rendering.

This directory contains examples of the most frequent raised questions by users of plotly-rs, such as:

  • making the resulting HTML plot responsive on browser window size change
  • making the resulting HTML fill the entire browser page
  • placing multiple plots in the same HTML page, e.g., by using the build_html crate
  • exporting plots to different formats with consistent font rendering

Examples

Density Mapbox Example

Demonstrates creating a responsive density mapbox plot with OpenStreetMap styling and zoom controls.

cd density_mapbox_example
cargo run

Multiple Plots Example

Shows how to embed multiple plotly plots on a single HTML page using inline HTML generation.

cd multiple_plots_example
cargo run

Consistent Format Export Example

Demonstrates exporting plots to SVG, PNG, and PDF formats with consistent font rendering across browsers.

cd consistent_static_format_export
cargo run
Morty Proxy This is a proxified and sanitized view of the page, visit original site.