mayutils 1.2.45__tar.gz → 1.2.47__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mayutils-1.2.45 → mayutils-1.2.47}/PKG-INFO +1 -1
- {mayutils-1.2.45 → mayutils-1.2.47}/pyproject.toml +1 -1
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/plotly/charts.py +15 -2
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/plotly/utilities.py +14 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/LICENSE +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/README.md +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/core/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/core/constants.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/data/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/data/analysis/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/data/cache/.gitkeep +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/data/live.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/data/local.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/data/queries/.gitkeep +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/data/queries/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/data/queries/examples/.gitkeep +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/data/read.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/environment/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/environment/benchmarking.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/environment/databases.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/environment/filesystem.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/environment/logging.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/environment/memoisation.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/environment/oauth.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/environment/secrets.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/environment/webdrivers.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/export/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/export/html.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/export/images.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/export/pdf.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/export/slides.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/interfaces/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/interfaces/google.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/interfaces/microsoft.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/interfaces/streamlit.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/mathematics/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/mathematics/numba.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/mathematics/numpy.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/classes.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/colours.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/dataframes.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/datetime.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/decorators.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/dictionaries.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/functions.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/hashing.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/numbers.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/strings.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/objects/types.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/py.typed +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/scripts/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/scripts/clear_cache.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/scripts/versioning.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/testing/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/console.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/combine.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/matplotlib/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/matplotlib/template.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/plotly/__init__.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/plotly/templates.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/plotly/traces.py +0 -0
- {mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/notebook.py +0 -0
|
@@ -6,6 +6,8 @@ from dataclasses import dataclass, field
|
|
|
6
6
|
from mayutils.export.images import IMAGES_FOLDER
|
|
7
7
|
import numpy as np
|
|
8
8
|
from scipy.stats import gaussian_kde, norm
|
|
9
|
+
import datetime
|
|
10
|
+
from pandas import to_datetime as to_pandas_datetime
|
|
9
11
|
|
|
10
12
|
import plotly.graph_objects as go
|
|
11
13
|
import plotly.io as pio
|
|
@@ -1355,8 +1357,19 @@ class Plot(go.Figure):
|
|
|
1355
1357
|
or (trace.yaxis.replace("y", "yaxis") == yaxis)
|
|
1356
1358
|
)
|
|
1357
1359
|
and (
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
+
len(
|
|
1361
|
+
(
|
|
1362
|
+
x_trace := trace.x
|
|
1363
|
+
if len(trace.x) > 0
|
|
1364
|
+
and isinstance(trace.x[0], datetime.date)
|
|
1365
|
+
else to_pandas_datetime(trace.x).date
|
|
1366
|
+
)
|
|
1367
|
+
)
|
|
1368
|
+
> 0
|
|
1369
|
+
)
|
|
1370
|
+
and (
|
|
1371
|
+
visible_mask := (x_trace < self.layout.xaxis.range[1]) # type: ignore
|
|
1372
|
+
& (x_trace > self.layout.xaxis.range[0]) # type: ignore
|
|
1360
1373
|
).any()
|
|
1361
1374
|
]
|
|
1362
1375
|
)
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
|
+
from pathlib import Path
|
|
2
3
|
from pandas import DataFrame
|
|
3
4
|
import numpy as np
|
|
5
|
+
import plotly
|
|
4
6
|
from numpy.typing import ArrayLike, NDArray
|
|
5
7
|
|
|
6
8
|
|
|
9
|
+
def include_plotly_js() -> str:
|
|
10
|
+
pkg_path = Path(plotly.__path__[0])
|
|
11
|
+
js_path = pkg_path / "package_data" / "plotly.min.js"
|
|
12
|
+
plotly_js = js_path.read_text(encoding="utf-8")
|
|
13
|
+
|
|
14
|
+
return f"""
|
|
15
|
+
<script type="text/javascript">
|
|
16
|
+
{plotly_js}
|
|
17
|
+
</script>
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
|
|
7
21
|
def map_categorical_array(
|
|
8
22
|
arr: NDArray,
|
|
9
23
|
mapping: Optional[ArrayLike] = None,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/matplotlib/__init__.py
RENAMED
|
File without changes
|
{mayutils-1.2.45 → mayutils-1.2.47}/src/mayutils/visualisation/graphs/matplotlib/template.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|