scitex 2.4.0__py3-none-any.whl → 2.4.1__py3-none-any.whl
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.
- scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin.py +305 -0
- {scitex-2.4.0.dist-info → scitex-2.4.1.dist-info}/METADATA +1 -1
- {scitex-2.4.0.dist-info → scitex-2.4.1.dist-info}/RECORD +6 -6
- {scitex-2.4.0.dist-info → scitex-2.4.1.dist-info}/WHEEL +0 -0
- {scitex-2.4.0.dist-info → scitex-2.4.1.dist-info}/entry_points.txt +0 -0
- {scitex-2.4.0.dist-info → scitex-2.4.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -973,6 +973,311 @@ class MatplotlibPlotMixin:
|
|
|
973
973
|
|
|
974
974
|
return self._axis_mpl, plot_df
|
|
975
975
|
|
|
976
|
+
# =========================================================================
|
|
977
|
+
# stx_ aliases for standard matplotlib methods
|
|
978
|
+
# These provide a consistent stx_ prefix for all scitex wrapper methods
|
|
979
|
+
# =========================================================================
|
|
980
|
+
|
|
981
|
+
def stx_bar(self, x, height, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
982
|
+
"""Bar plot with scitex styling and tracking.
|
|
983
|
+
|
|
984
|
+
Parameters
|
|
985
|
+
----------
|
|
986
|
+
x : array-like
|
|
987
|
+
The x coordinates of the bars
|
|
988
|
+
height : array-like
|
|
989
|
+
The heights of the bars
|
|
990
|
+
track : bool
|
|
991
|
+
Whether to track data for CSV export
|
|
992
|
+
id : str, optional
|
|
993
|
+
Identifier for tracking
|
|
994
|
+
**kwargs
|
|
995
|
+
Additional arguments passed to matplotlib bar
|
|
996
|
+
"""
|
|
997
|
+
method_name = "stx_bar"
|
|
998
|
+
|
|
999
|
+
# Add sample size to label if provided
|
|
1000
|
+
if kwargs.get("label"):
|
|
1001
|
+
n_samples = len(x)
|
|
1002
|
+
kwargs["label"] = f"{kwargs['label']} ($n$={n_samples})"
|
|
1003
|
+
|
|
1004
|
+
with self._no_tracking():
|
|
1005
|
+
result = self._axis_mpl.bar(x, height, **kwargs)
|
|
1006
|
+
|
|
1007
|
+
# Track bar data
|
|
1008
|
+
tracked_dict = {"bar_df": pd.DataFrame({"x": x, "height": height})}
|
|
1009
|
+
self._track(track, id, method_name, tracked_dict, None)
|
|
1010
|
+
|
|
1011
|
+
# Apply style_barplot automatically for publication quality
|
|
1012
|
+
from scitex.plt.ax import style_barplot
|
|
1013
|
+
style_barplot(result)
|
|
1014
|
+
|
|
1015
|
+
# Apply post-processing (tick locator, spines, etc.)
|
|
1016
|
+
self._apply_scitex_postprocess(method_name, result)
|
|
1017
|
+
|
|
1018
|
+
return result
|
|
1019
|
+
|
|
1020
|
+
def stx_barh(self, y, width, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
1021
|
+
"""Horizontal bar plot with scitex styling and tracking.
|
|
1022
|
+
|
|
1023
|
+
Parameters
|
|
1024
|
+
----------
|
|
1025
|
+
y : array-like
|
|
1026
|
+
The y coordinates of the bars
|
|
1027
|
+
width : array-like
|
|
1028
|
+
The widths of the bars
|
|
1029
|
+
track : bool
|
|
1030
|
+
Whether to track data for CSV export
|
|
1031
|
+
id : str, optional
|
|
1032
|
+
Identifier for tracking
|
|
1033
|
+
**kwargs
|
|
1034
|
+
Additional arguments passed to matplotlib barh
|
|
1035
|
+
"""
|
|
1036
|
+
method_name = "stx_barh"
|
|
1037
|
+
|
|
1038
|
+
# Add sample size to label if provided
|
|
1039
|
+
if kwargs.get("label"):
|
|
1040
|
+
n_samples = len(y)
|
|
1041
|
+
kwargs["label"] = f"{kwargs['label']} ($n$={n_samples})"
|
|
1042
|
+
|
|
1043
|
+
with self._no_tracking():
|
|
1044
|
+
result = self._axis_mpl.barh(y, width, **kwargs)
|
|
1045
|
+
|
|
1046
|
+
# Track bar data
|
|
1047
|
+
tracked_dict = {"barh_df": pd.DataFrame({"y": y, "width": width})}
|
|
1048
|
+
self._track(track, id, method_name, tracked_dict, None)
|
|
1049
|
+
|
|
1050
|
+
# Apply post-processing (tick locator, spines, etc.)
|
|
1051
|
+
self._apply_scitex_postprocess(method_name, result)
|
|
1052
|
+
|
|
1053
|
+
return result
|
|
1054
|
+
|
|
1055
|
+
def stx_scatter(self, x, y, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
1056
|
+
"""Scatter plot with scitex styling and tracking.
|
|
1057
|
+
|
|
1058
|
+
Parameters
|
|
1059
|
+
----------
|
|
1060
|
+
x : array-like
|
|
1061
|
+
The x coordinates of the points
|
|
1062
|
+
y : array-like
|
|
1063
|
+
The y coordinates of the points
|
|
1064
|
+
track : bool
|
|
1065
|
+
Whether to track data for CSV export
|
|
1066
|
+
id : str, optional
|
|
1067
|
+
Identifier for tracking
|
|
1068
|
+
**kwargs
|
|
1069
|
+
Additional arguments passed to matplotlib scatter
|
|
1070
|
+
"""
|
|
1071
|
+
method_name = "stx_scatter"
|
|
1072
|
+
|
|
1073
|
+
# Add sample size to label if provided
|
|
1074
|
+
if kwargs.get("label"):
|
|
1075
|
+
n_samples = len(x)
|
|
1076
|
+
kwargs["label"] = f"{kwargs['label']} ($n$={n_samples})"
|
|
1077
|
+
|
|
1078
|
+
with self._no_tracking():
|
|
1079
|
+
result = self._axis_mpl.scatter(x, y, **kwargs)
|
|
1080
|
+
|
|
1081
|
+
# Track scatter data
|
|
1082
|
+
tracked_dict = {"scatter_df": pd.DataFrame({"x": x, "y": y})}
|
|
1083
|
+
self._track(track, id, method_name, tracked_dict, None)
|
|
1084
|
+
|
|
1085
|
+
# Apply style_scatter automatically for publication quality
|
|
1086
|
+
from scitex.plt.ax import style_scatter
|
|
1087
|
+
style_scatter(result)
|
|
1088
|
+
|
|
1089
|
+
# Apply post-processing (tick locator, spines, etc.)
|
|
1090
|
+
self._apply_scitex_postprocess(method_name, result)
|
|
1091
|
+
|
|
1092
|
+
return result
|
|
1093
|
+
|
|
1094
|
+
def stx_errorbar(self, x, y, yerr=None, xerr=None, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
1095
|
+
"""Error bar plot with scitex styling and tracking.
|
|
1096
|
+
|
|
1097
|
+
Parameters
|
|
1098
|
+
----------
|
|
1099
|
+
x : array-like
|
|
1100
|
+
The x coordinates of the data points
|
|
1101
|
+
y : array-like
|
|
1102
|
+
The y coordinates of the data points
|
|
1103
|
+
yerr : array-like, optional
|
|
1104
|
+
The y error values
|
|
1105
|
+
xerr : array-like, optional
|
|
1106
|
+
The x error values
|
|
1107
|
+
track : bool
|
|
1108
|
+
Whether to track data for CSV export
|
|
1109
|
+
id : str, optional
|
|
1110
|
+
Identifier for tracking
|
|
1111
|
+
**kwargs
|
|
1112
|
+
Additional arguments passed to matplotlib errorbar
|
|
1113
|
+
"""
|
|
1114
|
+
method_name = "stx_errorbar"
|
|
1115
|
+
|
|
1116
|
+
# Add sample size to label if provided
|
|
1117
|
+
if kwargs.get("label"):
|
|
1118
|
+
n_samples = len(x)
|
|
1119
|
+
kwargs["label"] = f"{kwargs['label']} ($n$={n_samples})"
|
|
1120
|
+
|
|
1121
|
+
with self._no_tracking():
|
|
1122
|
+
result = self._axis_mpl.errorbar(x, y, yerr=yerr, xerr=xerr, **kwargs)
|
|
1123
|
+
|
|
1124
|
+
# Track errorbar data
|
|
1125
|
+
df_dict = {"x": x, "y": y}
|
|
1126
|
+
if yerr is not None:
|
|
1127
|
+
df_dict["yerr"] = yerr
|
|
1128
|
+
if xerr is not None:
|
|
1129
|
+
df_dict["xerr"] = xerr
|
|
1130
|
+
tracked_dict = {"errorbar_df": pd.DataFrame(df_dict)}
|
|
1131
|
+
self._track(track, id, method_name, tracked_dict, None)
|
|
1132
|
+
|
|
1133
|
+
# Apply style_errorbar automatically for publication quality
|
|
1134
|
+
from scitex.plt.ax import style_errorbar
|
|
1135
|
+
style_errorbar(result)
|
|
1136
|
+
|
|
1137
|
+
# Apply post-processing (tick locator, spines, etc.)
|
|
1138
|
+
self._apply_scitex_postprocess(method_name, result)
|
|
1139
|
+
|
|
1140
|
+
return result
|
|
1141
|
+
|
|
1142
|
+
def stx_fill_between(self, x, y1, y2=0, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
1143
|
+
"""Fill between plot with scitex styling and tracking.
|
|
1144
|
+
|
|
1145
|
+
Parameters
|
|
1146
|
+
----------
|
|
1147
|
+
x : array-like
|
|
1148
|
+
The x coordinates
|
|
1149
|
+
y1 : array-like
|
|
1150
|
+
The first y boundary
|
|
1151
|
+
y2 : array-like or scalar, optional
|
|
1152
|
+
The second y boundary (default 0)
|
|
1153
|
+
track : bool
|
|
1154
|
+
Whether to track data for CSV export
|
|
1155
|
+
id : str, optional
|
|
1156
|
+
Identifier for tracking
|
|
1157
|
+
**kwargs
|
|
1158
|
+
Additional arguments passed to matplotlib fill_between
|
|
1159
|
+
"""
|
|
1160
|
+
method_name = "stx_fill_between"
|
|
1161
|
+
|
|
1162
|
+
with self._no_tracking():
|
|
1163
|
+
result = self._axis_mpl.fill_between(x, y1, y2, **kwargs)
|
|
1164
|
+
|
|
1165
|
+
# Track fill_between data
|
|
1166
|
+
tracked_dict = {"fill_between_df": pd.DataFrame({
|
|
1167
|
+
"x": x,
|
|
1168
|
+
"y1": y1,
|
|
1169
|
+
"y2": y2 if hasattr(y2, '__len__') else [y2] * len(x)
|
|
1170
|
+
})}
|
|
1171
|
+
self._track(track, id, method_name, tracked_dict, None)
|
|
1172
|
+
|
|
1173
|
+
# Apply post-processing (tick locator, spines, etc.)
|
|
1174
|
+
self._apply_scitex_postprocess(method_name, result)
|
|
1175
|
+
|
|
1176
|
+
return result
|
|
1177
|
+
|
|
1178
|
+
def stx_contour(self, *args, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
1179
|
+
"""Contour plot with scitex styling and tracking.
|
|
1180
|
+
|
|
1181
|
+
Parameters
|
|
1182
|
+
----------
|
|
1183
|
+
*args
|
|
1184
|
+
Positional arguments passed to matplotlib contour (X, Y, Z)
|
|
1185
|
+
track : bool
|
|
1186
|
+
Whether to track data for CSV export
|
|
1187
|
+
id : str, optional
|
|
1188
|
+
Identifier for tracking
|
|
1189
|
+
**kwargs
|
|
1190
|
+
Additional arguments passed to matplotlib contour
|
|
1191
|
+
"""
|
|
1192
|
+
method_name = "stx_contour"
|
|
1193
|
+
|
|
1194
|
+
with self._no_tracking():
|
|
1195
|
+
result = self._axis_mpl.contour(*args, **kwargs)
|
|
1196
|
+
|
|
1197
|
+
# Track contour data
|
|
1198
|
+
if len(args) >= 3:
|
|
1199
|
+
X, Y, Z = args[0], args[1], args[2]
|
|
1200
|
+
tracked_dict = {"contour_df": pd.DataFrame({
|
|
1201
|
+
"X": np.ravel(X),
|
|
1202
|
+
"Y": np.ravel(Y),
|
|
1203
|
+
"Z": np.ravel(Z)
|
|
1204
|
+
})}
|
|
1205
|
+
self._track(track, id, method_name, tracked_dict, None)
|
|
1206
|
+
|
|
1207
|
+
# Apply post-processing (tick locator, spines, etc.)
|
|
1208
|
+
self._apply_scitex_postprocess(method_name, result)
|
|
1209
|
+
|
|
1210
|
+
return result
|
|
1211
|
+
|
|
1212
|
+
def stx_imshow(self, data, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
1213
|
+
"""Image display with scitex styling and tracking.
|
|
1214
|
+
|
|
1215
|
+
Parameters
|
|
1216
|
+
----------
|
|
1217
|
+
data : array-like
|
|
1218
|
+
2D array of image data
|
|
1219
|
+
track : bool
|
|
1220
|
+
Whether to track data for CSV export
|
|
1221
|
+
id : str, optional
|
|
1222
|
+
Identifier for tracking
|
|
1223
|
+
**kwargs
|
|
1224
|
+
Additional arguments passed to matplotlib imshow
|
|
1225
|
+
"""
|
|
1226
|
+
method_name = "stx_imshow"
|
|
1227
|
+
|
|
1228
|
+
with self._no_tracking():
|
|
1229
|
+
result = self._axis_mpl.imshow(data, **kwargs)
|
|
1230
|
+
|
|
1231
|
+
# Track image data
|
|
1232
|
+
if hasattr(data, 'shape') and len(data.shape) == 2:
|
|
1233
|
+
n_rows, n_cols = data.shape
|
|
1234
|
+
df = pd.DataFrame(data, columns=[f"col_{i}" for i in range(n_cols)])
|
|
1235
|
+
else:
|
|
1236
|
+
df = pd.DataFrame(data)
|
|
1237
|
+
tracked_dict = {"imshow_df": df}
|
|
1238
|
+
self._track(track, id, method_name, tracked_dict, None)
|
|
1239
|
+
|
|
1240
|
+
# Apply post-processing (tick locator, spines, etc.)
|
|
1241
|
+
self._apply_scitex_postprocess(method_name, result)
|
|
1242
|
+
|
|
1243
|
+
return result
|
|
1244
|
+
|
|
1245
|
+
def stx_boxplot(self, data, colors: Optional[List] = None, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
1246
|
+
"""Boxplot with scitex styling and tracking (alias for stx_box).
|
|
1247
|
+
|
|
1248
|
+
Parameters
|
|
1249
|
+
----------
|
|
1250
|
+
data : list of array-like
|
|
1251
|
+
List of data arrays for each box
|
|
1252
|
+
colors : list, optional
|
|
1253
|
+
Colors for each box
|
|
1254
|
+
track : bool
|
|
1255
|
+
Whether to track data for CSV export
|
|
1256
|
+
id : str, optional
|
|
1257
|
+
Identifier for tracking
|
|
1258
|
+
**kwargs
|
|
1259
|
+
Additional arguments passed to matplotlib boxplot
|
|
1260
|
+
"""
|
|
1261
|
+
return self.stx_box(data, colors=colors, track=track, id=id, **kwargs)
|
|
1262
|
+
|
|
1263
|
+
def stx_violinplot(self, data, colors: Optional[List] = None, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
1264
|
+
"""Violinplot with scitex styling and tracking (alias for stx_violin).
|
|
1265
|
+
|
|
1266
|
+
Parameters
|
|
1267
|
+
----------
|
|
1268
|
+
data : list of array-like or DataFrame
|
|
1269
|
+
Data for violin plot
|
|
1270
|
+
colors : list, optional
|
|
1271
|
+
Colors for each violin
|
|
1272
|
+
track : bool
|
|
1273
|
+
Whether to track data for CSV export
|
|
1274
|
+
id : str, optional
|
|
1275
|
+
Identifier for tracking
|
|
1276
|
+
**kwargs
|
|
1277
|
+
Additional arguments passed to stx_violin
|
|
1278
|
+
"""
|
|
1279
|
+
return self.stx_violin(data, colors=colors, track=track, id=id, **kwargs)
|
|
1280
|
+
|
|
976
1281
|
# Standard matplotlib plot methods with plot_ prefix
|
|
977
1282
|
def plot_bar(self, *args, track: bool = True, id: Optional[str] = None, **kwargs):
|
|
978
1283
|
"""Wrapper for matplotlib bar plot with tracking support."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scitex
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.1
|
|
4
4
|
Summary: A comprehensive Python library for scientific computing and data analysis
|
|
5
5
|
Project-URL: Homepage, https://github.com/ywatanabe1989/scitex-code
|
|
6
6
|
Project-URL: Documentation, https://scitex.readthedocs.io
|
|
@@ -539,7 +539,7 @@ scitex/plt/_subplots/__init__.py,sha256=OWVwq2dWH0LfT3j5wgqq6m1mlvgnJgwOrsQVo9Vj
|
|
|
539
539
|
scitex/plt/_subplots/_export_as_csv.py,sha256=Naf9K9iNhliW1J5Bb-B_K83NXI54JzcCwg6zSmAduNc,14908
|
|
540
540
|
scitex/plt/_subplots/_export_as_csv_formatters.py,sha256=IsSQfwYb0mOUBe04BMa6zdlbL659ygkf0pFlTOPhen8,5584
|
|
541
541
|
scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin.py,sha256=ygE7x15pCMoiQ_1pVZ4fqZvXGxBVR5XxJ1JO-w4hz4I,19660
|
|
542
|
-
scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin.py,sha256=
|
|
542
|
+
scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin.py,sha256=_CYNXv9hlcGX58dX_fnG_QcOn3sdOpCVL_bq87Sn93o,51168
|
|
543
543
|
scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin.py,sha256=sy6C7TU8Sl0ldd98AKLVcnpiiWxk7m6XtxGb9R6QXXU,14994
|
|
544
544
|
scitex/plt/_subplots/_AxisWrapperMixins/_TrackingMixin.py,sha256=0tv7wAjdeBQ144hvXtP3TDDQLkmuz3c0ir6V_u3goCs,5905
|
|
545
545
|
scitex/plt/_subplots/_AxisWrapperMixins/_UnitAwareMixin.py,sha256=zAQGFHqdAqC3l50-h0nmR3G--bGLEnTq1N7eVy54L9s,11354
|
|
@@ -2917,8 +2917,8 @@ scitex/writer/utils/__init__.py,sha256=wizvQZbOWHsNnkdDsB8J4-lPInRM3gDdwOCRg1fLI
|
|
|
2917
2917
|
scitex/writer/utils/_parse_latex_logs.py,sha256=_KfTzSw2IYhUzdZBJsZreAvQZk_BJHUBe2qIUNJfd-s,3154
|
|
2918
2918
|
scitex/writer/utils/_parse_script_args.py,sha256=vVMQE-AHCs2Q2uVQDuZVN8N3Eft0sxuPtNmnyPXVgnc,4625
|
|
2919
2919
|
scitex/writer/utils/_watch.py,sha256=qSBbwbeCPmXEWXn-ozCrar43rp664Wo65JzwIMWx7wE,2575
|
|
2920
|
-
scitex-2.4.
|
|
2921
|
-
scitex-2.4.
|
|
2922
|
-
scitex-2.4.
|
|
2923
|
-
scitex-2.4.
|
|
2924
|
-
scitex-2.4.
|
|
2920
|
+
scitex-2.4.1.dist-info/METADATA,sha256=jtBrKtu-EpgW2Y7Ff5_sTmiEDRavnQrYfI1CHG93i4U,29660
|
|
2921
|
+
scitex-2.4.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
2922
|
+
scitex-2.4.1.dist-info/entry_points.txt,sha256=jmgM0XEEIfCoMvwDSUNwRHBHaX_cfcJWQgi-lFc-BNU,48
|
|
2923
|
+
scitex-2.4.1.dist-info/licenses/LICENSE,sha256=TfPDBt3ar0uv_f9cqCDMZ5rIzW3CY8anRRd4PkL6ejs,34522
|
|
2924
|
+
scitex-2.4.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|