First thanks for Plotly Express. Great concept especially for us to introduce chemical engineering students (thus no dev background) to modern tools like JupyterLab for data exploration and analysis.
In one of our demo notebook we display recorded sensor data with scatter and mode=‘lines+markers’. After looking at the reference documentation I fail to see how to reproduce only within Express. Is there a way?
Thanks for the kind words on plotly express. Glad you’re enjoying it and that you see it as something that will be useful to pick up for your engineering students!
Unlike plotly.py, plotly express separates scatter and line into two separate functions so that the compatible options are clearer in the API. So I think the plan is that eventually you’ll make this kind of plot as two separate px calls (one for px.line and one for px.scatter), and then overlay them into a single figure. But, we don’t have the overlay operation implemented yet so at the moment you can’t easily combine the results of multiple px calls. This is something we plan to address before merging plotly express into plotly.py for version 4.
In the meantime, you can take advantage of the fact that the figures returned by plotly express are plotly.py figures that can be modified before being displayed. So you could do something like
I am wondering why we don’t have mode as an argument for px.scatter. I want to scatter with lines+markers and then color and facet_col, with marginal-y set to ‘violin’. I think getting this to work is beyond my complexity after spending an hour. So going back to the good old graph objects Express is promising and hope it will address these needs in the future.
fig = go.FigureWidget()
fig.add_trace(go.Scattergl(x=df_kpi.index, y = df_kpi['output_signal'], name='Original', mode='lines+markers'))
I was expecting all the data points would be connected with the line, But what I see is a bit different, some data points arenot conencted with the line at all, and this is my first time seeing this. Why is this so?Any one has some idea?