Skip to content

Commit

Permalink
updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
nikothomas committed Aug 23, 2024
1 parent c5fb367 commit d7b9da3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
29 changes: 7 additions & 22 deletions ctdfjorder/visualize/ctd_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
-----
Expand Down Expand Up @@ -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)")
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 = ["=", "^", "-", "~"]

Expand Down

0 comments on commit d7b9da3

Please sign in to comment.