Skip to content

Commit f341549

Browse files
add range_theta kwarg
1 parent c31802f commit f341549

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Diff for: packages/python/plotly/plotly/express/_chart_types.py

+3
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ def scatter_polar(
734734
start_angle=90,
735735
size_max=None,
736736
range_r=None,
737+
range_theta=None,
737738
log_r=False,
738739
render_mode="auto",
739740
title=None,
@@ -776,6 +777,7 @@ def line_polar(
776777
line_shape=None,
777778
render_mode="auto",
778779
range_r=None,
780+
range_theta=None,
779781
log_r=False,
780782
title=None,
781783
template=None,
@@ -811,6 +813,7 @@ def bar_polar(
811813
direction="clockwise",
812814
start_angle=90,
813815
range_r=None,
816+
range_theta=None,
814817
log_r=False,
815818
title=None,
816819
template=None,

Diff for: packages/python/plotly/plotly/express/_core.py

+3
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,9 @@ def configure_polar_axes(args, fig, orders):
534534
else:
535535
if args["range_r"]:
536536
radialaxis["range"] = args["range_r"]
537+
538+
if args["range_theta"]:
539+
layout["polar"]["sector"] = args["range_theta"]
537540
fig.update(layout=layout)
538541

539542

Diff for: packages/python/plotly/plotly/express/_doc.py

+4
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@
303303
"list of two numbers",
304304
"If provided, overrides auto-scaling on the radial axis in polar coordinates.",
305305
],
306+
range_theta=[
307+
"list of two numbers",
308+
"If provided, overrides auto-scaling on the angular axis in polar coordinates.",
309+
],
306310
title=["str", "The figure title."],
307311
template=[
308312
"or dict or plotly.graph_objects.layout.Template instance",

0 commit comments

Comments
 (0)