From d7b9da32ae786f17f16db20efe533318a9b96a0b Mon Sep 17 00:00:00 2001 From: nikothomas Date: Fri, 23 Aug 2024 16:22:27 -0700 Subject: [PATCH] updated deps --- ctdfjorder/visualize/ctd_plot.py | 29 +++++++---------------------- docs/conf.py | 2 +- pyproject.toml | 4 ++-- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/ctdfjorder/visualize/ctd_plot.py b/ctdfjorder/visualize/ctd_plot.py index c0f2099..ab10ea7 100644 --- a/ctdfjorder/visualize/ctd_plot.py +++ b/ctdfjorder/visualize/ctd_plot.py @@ -2,7 +2,6 @@ import numpy as np import os from ctdfjorder.constants.constants import * -import statsmodels.api as sm import polars as pl from dash import dcc, html, dash from dash.dependencies import Input, Output, State @@ -310,7 +309,7 @@ def plot_depth_vs( plot_folder : str The path to the folder where plots will be saved. plot_type : str, optional - The type of plot to generate. Options are 'line' or 'scatter'. Defaults to 'scatter'. + The type of plot to generate. Options are 'scatter'. Defaults to 'scatter'. Notes ----- @@ -350,26 +349,12 @@ def plot_depth_vs( POTENTIAL_DENSITY.label: "Potential Density (kg/m^3)", TEMPERATURE.label: "Temperature (°C)", } - if plot_type == "line": - lowess = sm.nonparametric.lowess - y, x = zip( - *lowess( - profile.select(pl.col(f"{measurement}")).to_numpy(), - profile.select(pl.col(DEPTH.label)).to_numpy(), - frac=0.1, - ) - ) - else: - x, y = ( - profile.select(pl.col(f"{measurement}")).to_numpy(), - profile.select(pl.col(DEPTH.label)).to_numpy(), - ) - ( - ax1.plot(x, y, color=color_map[measurement], label=label_map[measurement]) - if plot_type == "line" - else ax1.scatter( - x, y, color=color_map[measurement], label=label_map[measurement] - ) + x, y = ( + profile.select(pl.col(f"{measurement}")).to_numpy(), + profile.select(pl.col(DEPTH.label)).to_numpy(), + ) + ax1.scatter( + x, y, color=color_map[measurement], label=label_map[measurement] ) ax1.set_xlabel(label_map[measurement], color=color_map[measurement]) ax1.set_ylabel("Depth (m)") diff --git a/docs/conf.py b/docs/conf.py index 1658a25..856d697 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,7 +23,7 @@ project = 'CTDFjorder' copyright = '2024, Nikolas Yanek-Chrones' author = 'Nikolas Yanek-Chrones' -release = '0.8.6' +release = '0.8.7' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/pyproject.toml b/pyproject.toml index d5382fb..5778068 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] package-mode = true name = "ctdfjorder" -version = "0.8.6" +version = "0.8.7" description = "A package for processing and analyzing CTD data." homepage = "https://github.com/nikothomas/ctdfjorder" repository = "https://github.com/nikothomas/ctdfjorder" @@ -75,7 +75,7 @@ name = "CTDFjorder" package = "ctdfjorder" package_dir = "." filename = "docs/changelog.rst" -version = "0.8.6" +version = "0.8.7" template = "docs/_templates/changelog.rst.jinja" underlines = ["=", "^", "-", "~"]