@@ -145,7 +145,17 @@ def plot_magnitude_versus_time(
145
145
matplotlib.axes.Axes: The Matplotlib axes object with the plotted data.
146
146
"""
147
147
# Initialize plot
148
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
148
+ if "plot_args" in kwargs :
149
+ warnings .warn (
150
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
151
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
152
+ "Please use explicit arguments instead (e.g., color='red').\n "
153
+ "Refer to the function's documentation for supported keyword arguments:\n "
154
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_magnitude_versus_time.html" ,
155
+ DeprecationWarning ,
156
+ stacklevel = 2
157
+ )
158
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
149
159
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
150
160
151
161
# Plot data
@@ -247,7 +257,17 @@ def _plot_cumulative_events_versus_time(
247
257
matplotlib.axes.Axes: The Matplotlib axes object with the plotted data.
248
258
"""
249
259
# Initialize plot
250
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
260
+ if "plot_args" in kwargs :
261
+ warnings .warn (
262
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
263
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
264
+ "Please use explicit arguments instead (e.g., color='red').\n "
265
+ "Refer to the function's documentation for supported keyword arguments:\n "
266
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_cumulative_events_versus_time.html" ,
267
+ DeprecationWarning ,
268
+ stacklevel = 2
269
+ )
270
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
251
271
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
252
272
253
273
# Get information from stochastic event set
@@ -419,7 +439,17 @@ def plot_magnitude_histogram(
419
439
"""
420
440
421
441
# Initialize plot
422
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
442
+ if "plot_args" in kwargs :
443
+ warnings .warn (
444
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
445
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
446
+ "Please use explicit arguments instead (e.g., color='red').\n "
447
+ "Refer to the function's documentation for supported keyword arguments:\n "
448
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_magnitude_histogram.html" ,
449
+ DeprecationWarning ,
450
+ stacklevel = 2
451
+ )
452
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
423
453
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
424
454
425
455
# Get magnitudes from observations and (lazily) from forecast
@@ -691,7 +721,17 @@ def plot_catalog(
691
721
matplotlib.axes.Axes: The Matplotlib axes object with the plotted data.
692
722
"""
693
723
694
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
724
+ if "plot_args" in kwargs :
725
+ warnings .warn (
726
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
727
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
728
+ "Please use explicit arguments instead (e.g., color='red').\n "
729
+ "Refer to the function's documentation for supported keyword arguments:\n "
730
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_catalog.html" ,
731
+ DeprecationWarning ,
732
+ stacklevel = 2
733
+ )
734
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
695
735
# Get spatial information for plotting
696
736
extent = extent or _calculate_spatial_extent (catalog , set_global , plot_region )
697
737
# Instantiate GeoAxes object
@@ -844,8 +884,17 @@ def plot_gridded_dataset(
844
884
matplotlib.axes.Axes: Matplotlib axes object.
845
885
"""
846
886
847
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
848
-
887
+ if "plot_args" in kwargs :
888
+ warnings .warn (
889
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
890
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
891
+ "Please use explicit arguments instead (e.g., color='red').\n "
892
+ "Refer to the function's documentation for supported keyword arguments:\n "
893
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_gridded_dataset.html" ,
894
+ DeprecationWarning ,
895
+ stacklevel = 2
896
+ )
897
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
849
898
# Get spatial information for plotting
850
899
extent = extent or _calculate_spatial_extent (region , set_global , plot_region )
851
900
# Instantiate GeoAxes object
@@ -955,8 +1004,18 @@ def plot_test_distribution(
955
1004
matplotlib.axes.Axes: Matplotlib axes handle.
956
1005
"""
957
1006
958
- # Initialize plot
959
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
1007
+ # Initialize plot]
1008
+ if "plot_args" in kwargs :
1009
+ warnings .warn (
1010
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
1011
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
1012
+ "Please use explicit arguments instead (e.g., color='red').\n "
1013
+ "Refer to the function's documentation for supported keyword arguments:\n "
1014
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_test_distribution.html" ,
1015
+ DeprecationWarning ,
1016
+ stacklevel = 2
1017
+ )
1018
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
960
1019
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
961
1020
962
1021
# Get distributions
@@ -1075,7 +1134,17 @@ def plot_calibration_test(
1075
1134
matplotlib.axes.Axes: The Matplotlib axes object containing the plot.
1076
1135
"""
1077
1136
# Initialize plot
1078
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
1137
+ if "plot_args" in kwargs :
1138
+ warnings .warn (
1139
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
1140
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
1141
+ "Please use explicit arguments instead (e.g., color='red').\n "
1142
+ "Refer to the function's documentation for supported keyword arguments:\n "
1143
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_calibration_test.html" ,
1144
+ DeprecationWarning ,
1145
+ stacklevel = 2
1146
+ )
1147
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
1079
1148
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
1080
1149
1081
1150
# Set up QQ plots and KS test
@@ -1179,7 +1248,17 @@ def _plot_comparison_test(
1179
1248
"""
1180
1249
1181
1250
# Initialize plot
1182
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
1251
+ if "plot_args" in kwargs :
1252
+ warnings .warn (
1253
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
1254
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
1255
+ "Please use explicit arguments instead (e.g., color='red').\n "
1256
+ "Refer to the function's documentation for supported keyword arguments:\n "
1257
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_comparison_test.html" ,
1258
+ DeprecationWarning ,
1259
+ stacklevel = 2
1260
+ )
1261
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
1183
1262
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
1184
1263
1185
1264
# Iterate through T-test results, or jointly through t- and w- test results
@@ -1347,7 +1426,17 @@ def _plot_consistency_test(
1347
1426
"""
1348
1427
1349
1428
# Initialize plot
1350
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
1429
+ if "plot_args" in kwargs :
1430
+ warnings .warn (
1431
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
1432
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
1433
+ "Please use explicit arguments instead (e.g., color='red').\n "
1434
+ "Refer to the function's documentation for supported keyword arguments:\n "
1435
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_consistency_test.html" ,
1436
+ DeprecationWarning ,
1437
+ stacklevel = 2
1438
+ )
1439
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
1351
1440
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
1352
1441
1353
1442
# Ensure eval_results is a list
@@ -1478,7 +1567,17 @@ def _plot_concentration_ROC_diagram(
1478
1567
"""
1479
1568
1480
1569
# Initialize plot
1481
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
1570
+ if "plot_args" in kwargs :
1571
+ warnings .warn (
1572
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
1573
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
1574
+ "Please use explicit arguments instead (e.g., color='red').\n "
1575
+ "Refer to the function's documentation for supported keyword arguments:\n "
1576
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_concentration_ROC_diagram.html" ,
1577
+ DeprecationWarning ,
1578
+ stacklevel = 2
1579
+ )
1580
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
1482
1581
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
1483
1582
1484
1583
if not catalog .region == forecast .region :
@@ -1591,7 +1690,17 @@ def _plot_ROC_diagram(
1591
1690
"""
1592
1691
1593
1692
# Initialize plot
1594
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
1693
+ if "plot_args" in kwargs :
1694
+ warnings .warn (
1695
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
1696
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
1697
+ "Please use explicit arguments instead (e.g., color='red').\n "
1698
+ "Refer to the function's documentation for supported keyword arguments:\n "
1699
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_ROC_diagram.html" ,
1700
+ DeprecationWarning ,
1701
+ stacklevel = 2
1702
+ )
1703
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
1595
1704
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
1596
1705
1597
1706
if not catalog .region == forecast .region :
@@ -1738,7 +1847,17 @@ def _plot_Molchan_diagram(
1738
1847
RuntimeError: If the catalog and forecast do not have the same region.
1739
1848
"""
1740
1849
1741
- plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs }
1850
+ if "plot_args" in kwargs :
1851
+ warnings .warn (
1852
+ "'plot_args' usage is deprecated and will be removed in version 1.0.\n "
1853
+ "Fine-tuning of plot appearance may not behave as expected'.\n "
1854
+ "Please use explicit arguments instead (e.g., color='red').\n "
1855
+ "Refer to the function's documentation for supported keyword arguments:\n "
1856
+ " https://docs.cseptesting.org/reference/generated/csep.utils.plots.plot_Molchan_diagram.html" ,
1857
+ DeprecationWarning ,
1858
+ stacklevel = 2
1859
+ )
1860
+ plot_args = {** DEFAULT_PLOT_ARGS , ** kwargs .get ("plot_args" , {}), ** kwargs }
1742
1861
fig , ax = pyplot .subplots (figsize = plot_args ["figsize" ]) if ax is None else (ax .figure , ax )
1743
1862
1744
1863
if not catalog .region == forecast .region :
0 commit comments