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

Skip to content

Commit 66126d9

Browse files
anntzertimhoffm
authored andcommitted
Validate rcParams["image.origin"]. (#12898)
1 parent 4cab2ec commit 66126d9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/matplotlib/contour.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,8 +1752,7 @@ def _initialize_x_y(self, z):
17521752
- 'lower': ``Z[0, 0]`` is at X=0.5, Y=0.5 in the lower left corner.
17531753
- 'upper': ``Z[0, 0]`` is at X=N+0.5, Y=0.5 in the upper left
17541754
corner.
1755-
- 'image': Use the value from :rc:`image.origin`. Note: The value
1756-
*None* in the rcParam is currently handled as 'lower'.
1755+
- 'image': Use the value from :rc:`image.origin`.
17571756
17581757
extent : (x0, x1, y0, y1), optional
17591758
If *origin* is not *None*, then *extent* is interpreted as

lib/matplotlib/rcsetup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,8 @@ def _validate_linestyle(ls):
11501150
'image.interpolation': ['nearest', validate_string],
11511151
'image.cmap': ['viridis', validate_string], # one of gray, jet, etc
11521152
'image.lut': [256, validate_int], # lookup table
1153-
'image.origin': ['upper', validate_string], # lookup table
1153+
'image.origin': ['upper',
1154+
ValidateInStrings('image.origin', ['upper', 'lower'])],
11541155
'image.resample': [True, validate_bool],
11551156
# Specify whether vector graphics backends will combine all images on a
11561157
# set of axes into a single composite image

0 commit comments

Comments
 (0)