open_in_browser

geodetic_engine.welltrajectory.open_in_browser(figure, name=None)[source]

Open a plotly figure in the default browser, and return its address.

The page fills the browser window and follows it when resized. It is served from a local web server in this process, for as long as it runs: a notebook’s kernel keeps it up, a script’s exit takes it down and deletes its files. Its address holds a random token, so other web pages and users of the machine cannot find it. To keep a figure, write it to a file instead, with figure.write_html(path).

Parameters:
  • figure (Any) – A figure from plot_trajectory(), or any plotly figure.

  • name (str | None, default: None) – Stem of the page’s file name; the figure’s title when omitted.

Return type:

str

Returns:

The page’s address, for opening by hand if no browser could be started.