MCPcopy Index your code
hub / github.com/plotly/plotly.py / _spacing_error_translator

Function _spacing_error_translator

plotly/express/_core.py:2895–2906  ·  view source on GitHub ↗

Translates the spacing errors thrown by the underlying make_subplots routine into one that describes an argument adjustable through px.

(e, direction, facet_arg)

Source from the content-addressed store, hash-verified

2893 subplot_labels[i * ncols + j] = col_labels[(nrows - 1 - i) * ncols + j]
2894
2895 def _spacing_error_translator(e, direction, facet_arg):
2896 """
2897 Translates the spacing errors thrown by the underlying make_subplots
2898 routine into one that describes an argument adjustable through px.
2899 """
2900 if ("%s spacing" % (direction,)) in e.args[0]:
2901 e.args = (
2902 e.args[0]
2903 + """
2904Use the {facet_arg} argument to adjust this spacing.""".format(facet_arg=facet_arg),
2905 )
2906 raise e
2907
2908 # Create figure with subplots
2909 try:

Callers 1

init_figureFunction · 0.85

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected