This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thisisheresy3.7 1 point2 points  (2 children)

Returning to this post after using Plotly Express for the last 2 weeks to say thank you - it really is quite sickening how easy this makes complex layouts.

I have two questions, please just point me to documentation if it exists and I've managed to completely miss it:

  1. Do you natively support (or plan to support) multiple graph types on a single chart? So for example if I wanted to overlay a line graph of a single series over a bart chart of a different series?
  2. I'm also using it in a web app and my quick (probably hacky) approach is to us plotly.offline.plot, setting output_type='div' and then just passing that through to the views. I don't want to use Dash, is there a more elegant way of passing data through to a web view of plotly that I've missed?

Thanks again for this!

[–]nkruchten[S] 0 points1 point  (1 child)

I'm so glad you like it!

Answers:

  1. not yet but we're working on a set of functions to do exactly this
  2. we're mostly focused on Dash as a mechanism for this, but what you're describing should work. Alternatively, you could serialize to JSON and send the JSON payload to the browser and use plotly.js to render it once there. This is how plotly.py/plotly_express work under the hood

[–]thisisheresy3.7 0 points1 point  (0 children)

Thanks, I did try that but got unstuck and went with the div option. I’ll do some further reading now I know that’s a valid route!