From 886625c82d3c1fbc4f8ab39d7990c35f3b0dbc71 Mon Sep 17 00:00:00 2001 From: sharkey300 Date: Thu, 26 Sep 2024 17:48:44 -0700 Subject: [PATCH] set visualized images to fill the width --- static/style.css | 6 ++++++ visualize.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/static/style.css b/static/style.css index e7d3320..edebb69 100644 --- a/static/style.css +++ b/static/style.css @@ -33,6 +33,12 @@ body { flex: 2; } +.visualization img { + width: 100%; + height: auto; + display: block; +} + .bar { width: 100%; /* min-height: calc(1em + 5px); */ diff --git a/visualize.py b/visualize.py index 0fb7cba..cd7c9b0 100644 --- a/visualize.py +++ b/visualize.py @@ -35,7 +35,7 @@ def name_frequency_plot(df, starts=None, show=None, season=None, transform=None, if transform: xy[:, 1:] = transform(xy[:, 1:]) row_count = xy.shape[1] - 1 - plt.rcParams["figure.figsize"] = (7.5, row_count * stretch_factor) + plt.rcParams["figure.figsize"] = (8, row_count * stretch_factor) height_ratios = [stretch_factor] * row_count # thanks stackoverflow: