Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43fcc54

Browse files
TsufaelQuLogic
authored andcommitted
add getter for image interpolation_stage
1 parent 72731a5 commit 43fcc54

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/matplotlib/image.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,14 @@ def set_interpolation(self, s):
773773
self._interpolation = s
774774
self.stale = True
775775

776+
def get_interpolation_stage(self):
777+
"""
778+
Return when interpolation happens during the transform to RGBA.
779+
780+
One of 'data', 'rgba'.
781+
"""
782+
return self._interpolation_stage
783+
776784
def set_interpolation_stage(self, s):
777785
"""
778786
Set when interpolation happens during the transform to RGBA.

lib/matplotlib/image.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class _ImageBase(martist.Artist, cm.ScalarMappable):
8989
def get_shape(self) -> tuple[int, int, int]: ...
9090
def get_interpolation(self) -> str: ...
9191
def set_interpolation(self, s: str | None) -> None: ...
92+
def get_interpolation_stage(self) -> Literal["data", "rgba"]: ...
9293
def set_interpolation_stage(self, s: Literal["data", "rgba"]) -> None: ...
9394
def can_composite(self) -> bool: ...
9495
def set_resample(self, v: bool | None) -> None: ...

0 commit comments

Comments
 (0)