Skip to content

Commit c75fe3e

Browse files
committed
Order plotly express facets from top-left rather than bottom-left
1 parent 31cd2fc commit c75fe3e

File tree

1 file changed

+3
-2
lines changed
  • packages/python/plotly/plotly/express

1 file changed

+3
-2
lines changed

packages/python/plotly/plotly/express/_core.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ def configure_cartesian_axes(args, fig, orders):
393393

394394
# Set x-axis titles and axis options in the bottom-most row
395395
x_title = get_decorated_label(args, args["x"], "x")
396-
for xaxis in fig.select_xaxes(row=1):
396+
nrows = len(fig._grid_ref)
397+
for xaxis in fig.select_xaxes(row=nrows):
397398
xaxis.update(title_text=x_title)
398399
set_cartesian_axis_opts(args, xaxis, "x", orders)
399400

@@ -1128,7 +1129,7 @@ def init_figure(
11281129
vertical_spacing=vertical_spacing,
11291130
row_heights=row_heights,
11301131
column_widths=column_widths,
1131-
start_cell="bottom-left",
1132+
start_cell="top-left",
11321133
)
11331134

11341135
# Remove explicit font size of row/col titles so template can take over

0 commit comments

Comments
 (0)