mayutils 1.2.40__tar.gz → 1.2.41__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.40 → mayutils-1.2.41}/PKG-INFO +1 -1
- {mayutils-1.2.40 → mayutils-1.2.41}/pyproject.toml +1 -1
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/plotly/charts.py +20 -32
- {mayutils-1.2.40 → mayutils-1.2.41}/LICENSE +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/README.md +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/core/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/core/constants.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/data/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/data/analysis/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/data/cache/.gitkeep +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/data/live.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/data/local.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/data/queries/.gitkeep +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/data/queries/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/data/queries/examples/.gitkeep +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/data/read.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/environment/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/environment/benchmarking.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/environment/databases.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/environment/filesystem.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/environment/logging.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/environment/memoisation.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/environment/oauth.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/environment/secrets.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/environment/webdrivers.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/export/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/export/html.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/export/images.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/export/pdf.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/export/slides.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/interfaces/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/interfaces/google.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/interfaces/microsoft.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/interfaces/streamlit.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/mathematics/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/mathematics/numba.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/mathematics/numpy.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/classes.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/colours.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/dataframes.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/datetime.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/decorators.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/dictionaries.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/functions.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/hashing.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/numbers.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/strings.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/objects/types.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/py.typed +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/scripts/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/scripts/clear_cache.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/scripts/versioning.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/testing/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/console.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/combine.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/matplotlib/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/matplotlib/template.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/plotly/__init__.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/plotly/templates.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/plotly/traces.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/plotly/utilities.py +0 -0
- {mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/notebook.py +0 -0
|
@@ -1325,57 +1325,45 @@ class Plot(go.Figure):
|
|
|
1325
1325
|
y_max: Optional[float] = None,
|
|
1326
1326
|
y_padding: float = 0.05,
|
|
1327
1327
|
) -> Self:
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
trace_limits = np.asarray(
|
|
1328
|
+
yaxes = sorted([prop for prop in self.layout if prop.startswith("yaxis")])
|
|
1329
|
+
trace_limits_full = {
|
|
1330
|
+
yaxis: np.asarray(
|
|
1332
1331
|
[
|
|
1333
1332
|
(
|
|
1334
1333
|
np.nanmin(visible_y)
|
|
1335
|
-
if not
|
|
1334
|
+
if not np.isnan(visible_y := trace.y[visible_mask]).all()
|
|
1336
1335
|
and not visible_y.shape == (0,)
|
|
1337
1336
|
else np.nan,
|
|
1338
1337
|
np.nanmax(visible_y)
|
|
1339
|
-
if not
|
|
1340
|
-
and not visible_y.shape == (0,)
|
|
1338
|
+
if not np.isnan(visible_y).all() and not visible_y.shape == (0,)
|
|
1341
1339
|
else np.nan,
|
|
1342
1340
|
)
|
|
1343
1341
|
for trace in self.data
|
|
1344
|
-
if
|
|
1342
|
+
if trace.visible in [None, True]
|
|
1345
1343
|
and isinstance(trace.y, np.ndarray)
|
|
1346
|
-
and
|
|
1344
|
+
and getattr(
|
|
1345
|
+
self.layout, trace.yaxis.replace("y", "yaxis")
|
|
1346
|
+
).matches.replace("y", "yaxis")
|
|
1347
|
+
== yaxis
|
|
1347
1348
|
and (
|
|
1348
1349
|
visible_mask := (trace.x < self.layout.xaxis.range[1]) # type: ignore
|
|
1349
1350
|
& (trace.x > self.layout.xaxis.range[0]) # type: ignore
|
|
1350
1351
|
).any()
|
|
1351
1352
|
]
|
|
1352
1353
|
)
|
|
1354
|
+
for yaxis in yaxes
|
|
1355
|
+
}
|
|
1353
1356
|
|
|
1354
|
-
|
|
1355
|
-
|
|
1357
|
+
trace_limits = {
|
|
1358
|
+
f"{yaxis}_range": (
|
|
1359
|
+
np.nanmin(limits[:, 0]) if not np.isnan(limits[:, 0]).all() else None,
|
|
1360
|
+
np.nanmax(limits[:, 1]) if not np.isnan(limits[:, 1]).all() else None,
|
|
1356
1361
|
)
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
if traces_min is not None and traces_max is not None:
|
|
1362
|
-
span = traces_max - traces_min
|
|
1363
|
-
|
|
1364
|
-
y_range = (
|
|
1365
|
-
(traces_min - span * y_padding).clip(min=y_min),
|
|
1366
|
-
(traces_max + span * y_padding).clip(max=y_max),
|
|
1367
|
-
)
|
|
1368
|
-
else:
|
|
1369
|
-
y_range = (
|
|
1370
|
-
traces_min * (1 - y_padding) if traces_min is not None else None,
|
|
1371
|
-
traces_max * (1 + y_padding) if traces_max is not None else None,
|
|
1372
|
-
)
|
|
1362
|
+
for yaxis, limits in trace_limits_full.items()
|
|
1363
|
+
if len(limits) > 0
|
|
1364
|
+
}
|
|
1373
1365
|
|
|
1374
|
-
|
|
1375
|
-
{
|
|
1376
|
-
f"yaxis{yaxis_suffix}_range": y_range,
|
|
1377
|
-
}
|
|
1378
|
-
)
|
|
1366
|
+
self.update_layout(trace_limits)
|
|
1379
1367
|
|
|
1380
1368
|
return self
|
|
1381
1369
|
|
|
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.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/matplotlib/__init__.py
RENAMED
|
File without changes
|
{mayutils-1.2.40 → mayutils-1.2.41}/src/mayutils/visualisation/graphs/matplotlib/template.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|