Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e0bc12f

Browse files
Take figure size into account when setting marginal spacing
1 parent 997e667 commit e0bc12f

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ def init_figure(args, subplot_type, frame_list, nrows, ncols, col_labels, row_la
13301330
main_size = 0.84
13311331

13321332
row_heights = [main_size] * (nrows - 1) + [1 - main_size]
1333-
vertical_spacing = 0.012
1333+
vertical_spacing = 0.012*600/args['height']
13341334
elif args.get("facet_col_wrap", 0):
13351335
vertical_spacing = 0.07
13361336
else:
@@ -1343,7 +1343,7 @@ def init_figure(args, subplot_type, frame_list, nrows, ncols, col_labels, row_la
13431343
main_size = 0.84
13441344

13451345
column_widths = [main_size] * (ncols - 1) + [1 - main_size]
1346-
horizontal_spacing = 0.01
1346+
horizontal_spacing = 0.012*600/args['width']
13471347
else:
13481348
horizontal_spacing = 0.02
13491349
else:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /