plotly_4.py 411 B

1234567891011121314151617
  1. def render(self, output, view=True):
  2. """
  3. Render the network to disk.
  4. Parameters
  5. ----------
  6. output : str
  7. Name of the output file.
  8. view : bool
  9. Open the rendered network using the default browser. Default is
  10. True.
  11. """
  12. fig = self.build_plotly_figure()
  13. if not output.endswith(".html"):
  14. output += ".html"
  15. fig.write_html(output, auto_open=view)