From c7031ea6babfe00e4d0823df1d8795d3a0503566 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Wed, 1 May 2024 18:40:26 +0000 Subject: [PATCH 1/3] wip --- .../soca/fig_gallery}/gdassoca_obsstats.py | 2 +- utils/soca/fig_gallery/time_series_omb.html | 108 ++++++++++++++++++ 2 files changed, 109 insertions(+), 1 deletion(-) rename {ush/soca => utils/soca/fig_gallery}/gdassoca_obsstats.py (98%) create mode 100644 utils/soca/fig_gallery/time_series_omb.html diff --git a/ush/soca/gdassoca_obsstats.py b/utils/soca/fig_gallery/gdassoca_obsstats.py similarity index 98% rename from ush/soca/gdassoca_obsstats.py rename to utils/soca/fig_gallery/gdassoca_obsstats.py index 4741687bb..d5fd53d41 100644 --- a/ush/soca/gdassoca_obsstats.py +++ b/utils/soca/fig_gallery/gdassoca_obsstats.py @@ -69,7 +69,7 @@ def plot_timeseries(self, ocean, variable): # Improve layout and show plot plt.tight_layout(rect=[0, 0.03, 1, 0.95]) - plt.savefig(f'{ocean}_test.png') + plt.savefig(f'{dirout}/{inst}_{variable}_{ocean}.png') if __name__ == "__main__": diff --git a/utils/soca/fig_gallery/time_series_omb.html b/utils/soca/fig_gallery/time_series_omb.html new file mode 100644 index 000000000..b0ab5e905 --- /dev/null +++ b/utils/soca/fig_gallery/time_series_omb.html @@ -0,0 +1,108 @@ + + + + + + + + +
+ + +
+
+ + + + + + +
+
+ + +
+ +
+ + + + From 7bd4da14096f0dea953e78bedd8a1fc483d4b1c3 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Wed, 1 May 2024 22:53:05 +0000 Subject: [PATCH 2/3] adjust sizes --- utils/soca/fig_gallery/time_series_omb.html | 28 +++++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/utils/soca/fig_gallery/time_series_omb.html b/utils/soca/fig_gallery/time_series_omb.html index b0ab5e905..c96a6ee35 100644 --- a/utils/soca/fig_gallery/time_series_omb.html +++ b/utils/soca/fig_gallery/time_series_omb.html @@ -11,14 +11,14 @@ padding: 16px; } img { - width: 100%; + width: 90%; height: auto; border: 1px solid #ccc; box-shadow: 2px 2px 6px #888888; } .button { margin: 5px; - padding: 5px 15px; + padding: 3px 10px; cursor: pointer; background-color: #007BFF; color: white; @@ -28,20 +28,32 @@ } .button:hover, .active { background-color: #0056b3; - } + } select { - padding: 5px 10px; /* Reduced padding */ + padding: 3px 10px; /* Reduced padding */ font-size: 0.4em; /* Smaller font size */ border-radius: 5px; cursor: pointer; border: 1px solid #ccc; } + input[type="text"] { + width: 70%; /* Increased width */ + display: inline-block; + vertical-align: middle; /* Aligns label with input */ + } + label { + display: inline-block; + vertical-align: bottom; /* Aligns label with input */ + padding-top: 12px; /* Aligns text vertically with input */ + margin-right: 5px; /* Adds some space between label and input */ + }
- - + + +
@@ -88,8 +100,8 @@ updateActiveButton(ocean, 'button'); // Update active state for ocean buttons var container = document.getElementById('imageContainer'); container.innerHTML = ``; } From 3b30e667b062da9b7689a365718651dddfe13d82 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Wed, 1 May 2024 18:56:25 -0400 Subject: [PATCH 3/3] removed tabs --- utils/soca/fig_gallery/time_series_omb.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/utils/soca/fig_gallery/time_series_omb.html b/utils/soca/fig_gallery/time_series_omb.html index c96a6ee35..4e06b5e56 100644 --- a/utils/soca/fig_gallery/time_series_omb.html +++ b/utils/soca/fig_gallery/time_series_omb.html @@ -24,13 +24,13 @@ color: white; border: none; border-radius: 5px; - font-size: 0.6em; /* Smaller font size */ + font-size: 0.6em; /* Smaller font size */ } .button:hover, .active { background-color: #0056b3; - } + } select { - padding: 3px 10px; /* Reduced padding */ + padding: 3px 10px; /* Reduced padding */ font-size: 0.4em; /* Smaller font size */ border-radius: 5px; cursor: pointer; @@ -39,22 +39,22 @@ input[type="text"] { width: 70%; /* Increased width */ display: inline-block; - vertical-align: middle; /* Aligns label with input */ + vertical-align: middle; /* Aligns label with input */ } label { display: inline-block; vertical-align: bottom; /* Aligns label with input */ padding-top: 12px; /* Aligns text vertically with input */ margin-right: 5px; /* Adds some space between label and input */ - } + }
- -
+ +
@@ -76,8 +76,8 @@ - - + +
@@ -96,7 +96,7 @@ function showImages(type, ocean) { currentOcean = ocean; - var basePath = document.getElementById('basePathInput').value; + var basePath = document.getElementById('basePathInput').value; updateActiveButton(ocean, 'button'); // Update active state for ocean buttons var container = document.getElementById('imageContainer'); container.innerHTML = `