@@ -57,7 +57,7 @@ def make_subplots(
5757 row_titles = None ,
5858 x_title = None ,
5959 y_title = None ,
60- font = dict ( size = 16 ) ,
60+ font = None ,
6161 figure = None ,
6262 ** kwargs ,
6363):
@@ -228,7 +228,7 @@ def make_subplots(
228228 Title to place to the left of the left column of subplots,
229229 centered vertically
230230
231- font: dict (default dict(size=16) )
231+ font: dict (default None )
232232 Font used by any title of the subplots.
233233
234234 figure: go.Figure or None (default None)
@@ -818,7 +818,7 @@ def _check_hv_spacing(dimsize, spacing, name, dimvarname, dimname):
818818
819819 # Add subplot titles
820820 plot_title_annotations = _build_subplot_title_annotations (
821- subplot_titles , list_of_domains , font = font
821+ subplot_titles , list_of_domains , font = font
822822 )
823823
824824 layout ["annotations" ] = plot_title_annotations
@@ -839,7 +839,7 @@ def _check_hv_spacing(dimsize, spacing, name, dimvarname, dimname):
839839
840840 # Add subplot titles
841841 column_title_annotations = _build_subplot_title_annotations (
842- column_titles , domains_list , font = font
842+ column_titles , domains_list , font = font
843843 )
844844
845845 layout ["annotations" ] += tuple (column_title_annotations )
@@ -853,7 +853,7 @@ def _check_hv_spacing(dimsize, spacing, name, dimvarname, dimname):
853853
854854 # Add subplot titles
855855 column_title_annotations = _build_subplot_title_annotations (
856- row_titles , domains_list , title_edge = "right" , font = font
856+ row_titles , domains_list , title_edge = "right" , font = font
857857 )
858858
859859 layout ["annotations" ] += tuple (column_title_annotations )
@@ -863,7 +863,7 @@ def _check_hv_spacing(dimsize, spacing, name, dimvarname, dimname):
863863
864864 # Add subplot titles
865865 column_title_annotations = _build_subplot_title_annotations (
866- [x_title ], domains_list , title_edge = "bottom" , offset = 30 , font = font
866+ [x_title ], domains_list , title_edge = "bottom" , offset = 30 , font = font
867867 )
868868
869869 layout ["annotations" ] += tuple (column_title_annotations )
@@ -873,7 +873,7 @@ def _check_hv_spacing(dimsize, spacing, name, dimvarname, dimname):
873873
874874 # Add subplot titles
875875 column_title_annotations = _build_subplot_title_annotations (
876- [y_title ], domains_list , title_edge = "left" , offset = 40 , font = font
876+ [y_title ], domains_list , title_edge = "left" , offset = 40 , font = font
877877 )
878878
879879 layout ["annotations" ] += tuple (column_title_annotations )
@@ -1167,7 +1167,7 @@ def _get_cartesian_label(x_or_y, r, c, cnt):
11671167
11681168
11691169def _build_subplot_title_annotations (
1170- subplot_titles , list_of_domains , title_edge = "top" , offset = 0 , font = dict ( size = 16 )
1170+ subplot_titles , list_of_domains , title_edge = "top" , offset = 0 , font = None
11711171):
11721172 # If shared_axes is False (default) use list_of_domains
11731173 # This is used for insets and irregular layouts
@@ -1177,6 +1177,10 @@ def _build_subplot_title_annotations(
11771177 subtitle_pos_x = []
11781178 subtitle_pos_y = []
11791179
1180+ # If no font size is provided, use this fallback
1181+ if font is None :
1182+ font = {"size" : 16 }
1183+
11801184 if title_edge == "top" :
11811185 text_angle = 0
11821186 xanchor = "center"
0 commit comments