Skip to content

Commit 0c6f8ec

Browse files
committed
ref: fix deprecation warnings
1 parent b1f4fc6 commit 0c6f8ec

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- fix: persist feature selection in QuickView when switching data slots (#206)
44
- fix: show correct progress during data export (#138)
55
- docs: properly employ license GPL-3.0-or-later
6+
- ref: fix deprecation warnings
67
- setup: bump dclab to 0.63.0
78
2.21.5
89
- fix: disable table graphs widget when an image-type table is shown

shapeout2/gui/pipeline_plot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import warnings
55

66
import dclab
7-
from dclab import kde_contours
7+
from dclab.kde import contours as kdec
88
import numpy as np
99
from PyQt6 import uic, QtCore, QtGui, QtWidgets
1010
import pyqtgraph as pg
@@ -620,7 +620,7 @@ def compute_contours(plot_state, rtdc_ds):
620620
warnings.warn("Contour not possible; spacing may be too large!",
621621
ContourSpacingTooLarge)
622622
return []
623-
plev = kde_contours.get_quantile_levels(
623+
plev = kdec.get_quantile_levels(
624624
density=density,
625625
x=x,
626626
y=y,
@@ -633,7 +633,7 @@ def compute_contours(plot_state, rtdc_ds):
633633
# make sure that the contour levels are not at the boundaries
634634
if not (np.allclose(level, 0, atol=1e-12, rtol=0)
635635
or np.allclose(level, 1, atol=1e-12, rtol=0)):
636-
cc = kde_contours.find_contours_level(
636+
cc = kdec.find_contours_level(
637637
density, x=x, y=y, level=level)
638638
contours.append(cc)
639639
return contours

shapeout2/plot_cache.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Facilitate caching of plot data"""
2+
from dclab.kde import KernelDensityEstimator
3+
24
from . import util
35

46

@@ -18,7 +20,8 @@ def get_contour_data(rtdc_ds, xax, yax, xacc, yacc, xscale, yscale,
1820
x, y, den = cache_data[shash]
1921
else:
2022
# compute scatter plot data
21-
x, y, den = rtdc_ds.get_kde_contour(
23+
kde_instance = KernelDensityEstimator(rtdc_ds=rtdc_ds)
24+
x, y, den = kde_instance.get_contour(
2225
xax=xax,
2326
yax=yax,
2427
xacc=xacc,

0 commit comments

Comments
 (0)