mayutils 1.2.41__tar.gz → 1.2.43__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.41 → mayutils-1.2.43}/PKG-INFO +1 -1
- {mayutils-1.2.41 → mayutils-1.2.43}/pyproject.toml +1 -1
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/export/slides.py +7 -7
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/plotly/charts.py +24 -7
- {mayutils-1.2.41 → mayutils-1.2.43}/LICENSE +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/README.md +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/core/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/core/constants.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/data/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/data/analysis/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/data/cache/.gitkeep +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/data/live.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/data/local.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/data/queries/.gitkeep +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/data/queries/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/data/queries/examples/.gitkeep +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/data/read.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/environment/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/environment/benchmarking.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/environment/databases.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/environment/filesystem.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/environment/logging.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/environment/memoisation.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/environment/oauth.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/environment/secrets.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/environment/webdrivers.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/export/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/export/html.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/export/images.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/export/pdf.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/interfaces/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/interfaces/google.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/interfaces/microsoft.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/interfaces/streamlit.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/mathematics/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/mathematics/numba.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/mathematics/numpy.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/classes.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/colours.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/dataframes.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/datetime.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/decorators.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/dictionaries.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/functions.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/hashing.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/numbers.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/strings.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/objects/types.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/py.typed +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/scripts/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/scripts/clear_cache.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/scripts/versioning.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/testing/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/console.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/combine.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/matplotlib/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/matplotlib/template.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/plotly/__init__.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/plotly/templates.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/plotly/traces.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/plotly/utilities.py +0 -0
- {mayutils-1.2.41 → mayutils-1.2.43}/src/mayutils/visualisation/notebook.py +0 -0
|
@@ -14,16 +14,16 @@ from mayutils.export import OUTPUT_FOLDER
|
|
|
14
14
|
|
|
15
15
|
WARNING = "Not an ipython notebook"
|
|
16
16
|
|
|
17
|
-
try:
|
|
18
|
-
|
|
17
|
+
# try:
|
|
18
|
+
# from IPython import get_ipython # type: ignore
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
# ipython = get_ipython()
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
# if ipython is None:
|
|
23
|
+
# raise ValueError(WARNING)
|
|
24
24
|
|
|
25
|
-
except ImportError:
|
|
26
|
-
|
|
25
|
+
# except ImportError:
|
|
26
|
+
# raise ValueError(WARNING)
|
|
27
27
|
|
|
28
28
|
SLIDES_FOLDER = OUTPUT_FOLDER / "Slides"
|
|
29
29
|
|
|
@@ -1321,8 +1321,6 @@ class Plot(go.Figure):
|
|
|
1321
1321
|
|
|
1322
1322
|
def set_visible_y_range(
|
|
1323
1323
|
self,
|
|
1324
|
-
y_min: Optional[float] = None,
|
|
1325
|
-
y_max: Optional[float] = None,
|
|
1326
1324
|
y_padding: float = 0.05,
|
|
1327
1325
|
) -> Self:
|
|
1328
1326
|
yaxes = sorted([prop for prop in self.layout if prop.startswith("yaxis")])
|
|
@@ -1341,10 +1339,16 @@ class Plot(go.Figure):
|
|
|
1341
1339
|
for trace in self.data
|
|
1342
1340
|
if trace.visible in [None, True]
|
|
1343
1341
|
and isinstance(trace.y, np.ndarray)
|
|
1344
|
-
and
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1342
|
+
and (
|
|
1343
|
+
trace_yaxis_obj := getattr(
|
|
1344
|
+
self.layout,
|
|
1345
|
+
trace.yaxis.replace("y", "yaxis"),
|
|
1346
|
+
None,
|
|
1347
|
+
)
|
|
1348
|
+
)
|
|
1349
|
+
is not None
|
|
1350
|
+
and (matching_yaxis := trace_yaxis_obj.matches) is not None
|
|
1351
|
+
and matching_yaxis.replace("y", "yaxis") == yaxis
|
|
1348
1352
|
and (
|
|
1349
1353
|
visible_mask := (trace.x < self.layout.xaxis.range[1]) # type: ignore
|
|
1350
1354
|
& (trace.x > self.layout.xaxis.range[0]) # type: ignore
|
|
@@ -1363,7 +1367,20 @@ class Plot(go.Figure):
|
|
|
1363
1367
|
if len(limits) > 0
|
|
1364
1368
|
}
|
|
1365
1369
|
|
|
1366
|
-
|
|
1370
|
+
padded_trace_limits = {
|
|
1371
|
+
yaxis_range: (
|
|
1372
|
+
y_min - (y_max - y_min) * y_padding,
|
|
1373
|
+
y_max + (y_max - y_min) * y_padding,
|
|
1374
|
+
)
|
|
1375
|
+
if y_max is not None and y_min is not None
|
|
1376
|
+
else (
|
|
1377
|
+
y_min * (1 - y_padding) if y_min is not None else None,
|
|
1378
|
+
y_max * (1 + y_padding) if y_max is not None else None,
|
|
1379
|
+
)
|
|
1380
|
+
for yaxis_range, (y_min, y_max) in trace_limits.items()
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
self.update_layout(padded_trace_limits)
|
|
1367
1384
|
|
|
1368
1385
|
return self
|
|
1369
1386
|
|
|
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.41 → mayutils-1.2.43}/src/mayutils/visualisation/graphs/matplotlib/__init__.py
RENAMED
|
File without changes
|
{mayutils-1.2.41 → mayutils-1.2.43}/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
|