From 2bd4e0ae810de578fabcf0028f1d1ddd6549be23 Mon Sep 17 00:00:00 2001 From: jmz <45778832+PotatoXi@users.noreply.github.com> Date: Mon, 29 Jul 2024 18:11:18 +0800 Subject: [PATCH] fix: Add a -1 detection in the log_distribution_plot function --- README.md | 2 +- docs/source/conf.py | 2 +- geochemistrypi/data_mining/plot/statistic_plot.py | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0eb5627d..692ae331 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,7 @@ For more details: Please refer to: The following screenshot shows the downloads and launching of our software on macOS:

- Downloads and Launching on macOS + Downloads and Launching on macOS

## Roadmap diff --git a/docs/source/conf.py b/docs/source/conf.py index 644810b1..d93048a7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,7 +12,7 @@ import sphinx_rtd_theme project = "Geochemistry π" -copyright = "2023, ZJUEarthData" +copyright = "2024, ZJUEarthData" author = "ZJUEarthData" # release = 'v0.1.0' diff --git a/geochemistrypi/data_mining/plot/statistic_plot.py b/geochemistrypi/data_mining/plot/statistic_plot.py index 6612ab60..ba60625b 100644 --- a/geochemistrypi/data_mining/plot/statistic_plot.py +++ b/geochemistrypi/data_mining/plot/statistic_plot.py @@ -125,6 +125,9 @@ def log_distribution_plot(col: pd.Index, df: pd.DataFrame) -> None: df : pd.DataFrame The data set. """ + # Replace -1 with -1.0001 + df[col] = df[col].replace(-1, -1.0001) + # Log transform the required columns df_log_transformed = df[col].applymap(lambda x: np.log(x + 1))