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

Function configure_cartesian_axes

plotly/express/_core.py:720–755  ·  view source on GitHub ↗
(args, fig, orders)

Source from the content-addressed store, hash-verified

718
719
720def configure_cartesian_axes(args, fig, orders):
721 if ("marginal_x" in args and args["marginal_x"]) or (
722 "marginal_y" in args and args["marginal_y"]
723 ):
724 configure_cartesian_marginal_axes(args, fig, orders)
725 return
726
727 # Set y-axis titles and axis options in the left-most column
728 y_title = get_decorated_label(args, args["y"], "y")
729 for yaxis in fig.select_yaxes(col=1):
730 yaxis.update(title_text=y_title)
731 set_cartesian_axis_opts(args, yaxis, "y", orders)
732
733 # Set x-axis titles and axis options in the bottom-most row
734 x_title = get_decorated_label(args, args["x"], "x")
735 for xaxis in fig.select_xaxes(row=1):
736 if "is_timeline" not in args:
737 xaxis.update(title_text=x_title)
738 set_cartesian_axis_opts(args, xaxis, "x", orders)
739
740 # Configure axis type across all x-axes
741 if "log_x" in args and args["log_x"]:
742 fig.update_xaxes(type="log")
743
744 # Configure axis type across all y-axes
745 if "log_y" in args and args["log_y"]:
746 fig.update_yaxes(type="log")
747
748 if "is_timeline" in args:
749 fig.update_xaxes(type="date")
750
751 if "ecdfmode" in args:
752 if args["orientation"] == "v":
753 fig.update_yaxes(rangemode="tozero")
754 else:
755 fig.update_xaxes(rangemode="tozero")
756
757
758def configure_ternary_axes(args, fig, orders):

Callers

nothing calls this directly

Calls 8

get_decorated_labelFunction · 0.85
set_cartesian_axis_optsFunction · 0.85
select_yaxesMethod · 0.45
updateMethod · 0.45
select_xaxesMethod · 0.45
update_xaxesMethod · 0.45
update_yaxesMethod · 0.45

Tested by

no test coverage detected