Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Domain issues with multiple subplots

Hi!

I’ve been using the tools.make_subplots to generate graphs with a varying number of subplots per graph.

I have come across an issue when the total number of sub-plots exceeds 65, receiving the below error:

ValueError:
Invalid value of type ‘builtins.float’ received for the ‘domain[1]’ property of layout.yaxis
Received value: 1.0000000000000007
The ‘domain[1]’ property is a number and may be specified as:
- An int or float in the interval [0, 1]

I’m using the following code to generate the fig:

final = tools.make_subplots(rows = plot_count, cols = 1)
for plot_num, plot in enumerate(fig[‘data’]):
final.append_trace(plot, plot_num + 1, 1)

where fig[‘data’] is a list of dictionaries with the required information for each trace.

Is there any way to get around this issue and display as many sub plots as necessary in a single graph?

Thank you!!

Hi @AHB,

The best thing to do would be to open a bug report at https://github.com/plotly/plotly.py/issues. Please include a full example that can be copied, pasted, and run (just add some simple trace dictionaries).

Thanks,
-Jon

Actually, looks like there already is an issue here: https://github.com/plotly/plotly.py/issues/1031

Hi Jim,

Thank you for your help with this, glad to hear it’s been fixed!

If there’s anything else I can do to help please let me know!

Kind regards,

Alex

Sure, the fix will be in 3.1.1, which I hope to release this week.
-Jon

Hi jmmease,
It seems as the issue is still there. I’m currently using plotly v3.3.0.
My program works fine with number of rows less or equals to 70 in tools.make_subplots, but for higher values it’s breaking. I’ve attached my sample code to reproduce the issue here.

Cross reference https://github.com/plotly/plotly.py/issues/1031#issuecomment-427303963