How to keep height per row facet plot constant?


I am trying to keep the facets in a plot at constant height, however, when I add more rows, the facets shrink until I get an error about facet_row_spacing.

        height = 200 * n_rows

        facet_row_spacing = None

        if n_rows != 1: facet_row_spacing = min(0.04, (1 / (n_rows - 1)) )

        fig =, x='RawFile', y=plot_column, facet_col='Majority protein IDs', facet_col_wrap=1, color=color, color_discrete_sequence=px.colors.qualitative.Dark24,
                    facet_row_spacing=facet_row_spacing, height=height)

                margin=dict( l=50, r=10, b=40, t=40, pad=0 ),

Increasing the plot height linear with the number of rows leads to smaller and smaller facets the more rows are added. Is there a good way to keep the height per row constant?