Multiple y axes -> only one scatter shows up
See original GitHub issueIssue
When plotting data on multiple Y axes, particularly when nothing is plotted on the primary Y axis, sometimes plotly will only show one series.
Repro
https://codepen.io/jasoncurtis/pen/zmqNMQ?editors=0010
Expected behavior
Two series are plotted.
Actual behavior
Two series show up in the legend, but only one series is plotted.
Workaround
If you change 'y2'
in the repro code above to ‘y1
’, both series will show up. However, it’s not always reasonable to assume there will be data on y1 - I am trying to write a purpose-specific API that uses plotly in such a way that I cannot guarantee there will be something on y1 without significant extra complexity.
Related:
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Plotly two Y axes: how to show one dataset as a linechart and ...
I want the data displayed in the second Y axis to be a scatter plot instead of a line. Is there a way...
Read more >Scatterplot with two y-axis in Excel - YouTube
It's pretty straight forward to make a scatterplot in Excel. But what if you want to plot 2 y - axis variables? In...
Read more >Multiple axes in Python - Plotly
How to make a graph with multiple axes (dual y-axis plots, plots with secondary axes) in python ... Scatter(x=[1, 2, 3], y=[40, 50,...
Read more >Create Chart with Two y-Axes - MATLAB & Simulink
This example shows how to create a chart with y-axes on the left and right sides using the yyaxis ... Now when you...
Read more >Add or remove a secondary axis in a chart in Excel
Learn to add a secondary axis to an Excel chart. ... The scale of the secondary vertical axis shows the values for the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you want to ensure
yaxis
is always drawn, put a dummy invisible trace on it, like{visible: false}
(which will implicitly be drawn onxaxis
andyaxis
). If you don’t want to seeyaxis
, just have it there to be overlaid on, you can make it toovisible: false
https://codepen.io/alexcjohnson/pen/oazbvv?editors=0010This discussion was incredibly useful to help me debug why I was not getting curves on my plots. You mean that ‘overlapping: “y”’ is not short-hand for ‘overlapping: “yes”’… I spent 24 sleep deprived hours on this. Now that I’ve got it all working, everything makes sense. And that solution was to simply insert {visible: false}. Wow. So neat. Er… is this in the documentation yet?