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

Function set_cartesian_axis_opts

plotly/express/_core.py:636–652  ·  view source on GitHub ↗
(args, axis, letter, orders)

Source from the content-addressed store, hash-verified

634
635
636def set_cartesian_axis_opts(args, axis, letter, orders):
637 log_key = "log_" + letter
638 range_key = "range_" + letter
639 if log_key in args and args[log_key]:
640 axis["type"] = "log"
641 if range_key in args and args[range_key]:
642 axis["range"] = [math.log(r, 10) for r in args[range_key]]
643 elif range_key in args and args[range_key]:
644 axis["range"] = args[range_key]
645
646 if args[letter] in orders:
647 axis["categoryorder"] = "array"
648 axis["categoryarray"] = (
649 orders[args[letter]]
650 if isinstance(axis, go.layout.XAxis)
651 else list(reversed(orders[args[letter]])) # top down for Y axis
652 )
653
654
655def configure_cartesian_marginal_axes(args, fig, orders):

Callers 2

configure_cartesian_axesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected