File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -266,14 +266,16 @@ def run_pathsim():
266266
267267 # Share x only if there are only scopes or only spectra
268268 shared_x = len (scopes ) * len (spectra ) == 0
269-
269+ n_rows = len (scopes ) + len (spectra )
270+ absolute_vertical_spacing = 0.05
271+ relative_vertical_spacing = absolute_vertical_spacing / n_rows
270272 fig = make_subplots (
271- rows = len ( scopes ) + len ( spectra ) ,
273+ rows = n_rows ,
272274 cols = 1 ,
273275 shared_xaxes = shared_x ,
274276 subplot_titles = [scope .label for scope in scopes ]
275277 + [spec .label for spec in spectra ],
276- vertical_spacing = 0.1 ,
278+ vertical_spacing = relative_vertical_spacing ,
277279 )
278280
279281 # make scope plots
@@ -305,7 +307,7 @@ def run_pathsim():
305307 fig .update_xaxes (title_text = "Frequency" , row = len (scopes ) + i + 1 , col = 1 )
306308
307309 fig .update_layout (
308- height = 600 * (len (scopes ) + len (spectra )), hovermode = "x unified"
310+ height = 500 * (len (scopes ) + len (spectra )), hovermode = "x unified"
309311 )
310312
311313 # Convert plot to JSON
You can’t perform that action at this time.
0 commit comments