fix: Pickle PlotRange

This commit is contained in:
Benoît Sierro
2023-09-13 10:35:07 +02:00
parent e0fc7aeed4
commit 60bc9c1ed6

View File

@@ -386,6 +386,9 @@ class PlotRange(tuple):
def sort_axis(self, axis: np.ndarray) -> tuple[np.ndarray, np.ndarray, tuple[float, float]]:
return sort_axis(axis, self)
def __reduce__(self):
return (PlotRange, (self.left, self.right, self.unit))
def sort_axis(
axis: np.ndarray, plt_range: PlotRange