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

Function update_axis_matches

plotly/_subplots.py:917–937  ·  view source on GitHub ↗
(first_axis_id, subplot_ref, spec, remove_label)

Source from the content-addressed store, hash-verified

915 axis_index = 0
916
917 def update_axis_matches(first_axis_id, subplot_ref, spec, remove_label):
918 if subplot_ref is None:
919 return first_axis_id
920
921 if x_or_y == "x":
922 span = spec["colspan"]
923 else:
924 span = spec["rowspan"]
925
926 if subplot_ref.subplot_type == "xy" and span == 1:
927 if first_axis_id is None:
928 first_axis_name = subplot_ref.layout_keys[layout_key_ind]
929 first_axis_id = first_axis_name.replace("axis", "")
930 else:
931 axis_name = subplot_ref.layout_keys[layout_key_ind]
932 axis_to_match = layout[axis_name]
933 axis_to_match.matches = first_axis_id
934 if remove_label:
935 axis_to_match.showticklabels = False
936
937 return first_axis_id
938
939 if shared == "columns" or (x_or_y == "x" and shared is True):
940 for c in cols_iter:

Callers 1

_configure_shared_axesFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected