Commit 7a4df1a
Force origin='upper' in pyplot.specgram (#17897)
* Force origin='upper' in specgram function
Specify origin='upper' in call to imshow within specgram to override rcparams setting for origin without changing rcparams itself. Delete origin from kwargs so there are not two occurrences of the origin parameter in the call to imshow (this also means the origin kwarg cannot be changed by the caller).
* DOC: indicate that origin is force set to upper
* Adding test for issue 17878
* DOC: Change rcParam from 'origin' to 'image.origin'
* TST: try changing origin in specgram call
* Document behavior change for specgram
* Document api behavior change
* Raise exception if origin kwarg passed to specgram
This ensures the origin kwarg is not silently ignored if passed to pyplot.specgram.
* TST: passing origin kwarg to specgram should fail
The function pyplot.specgram should raise a TypeError if origin is passed as a keyword argument.
* DOC: Remove note that origin='upper' in specgram
This note referenced the call to imshow inside of specgram, which might confuse users who do not know the implementation of specgram.
* TST: change from pytest xfail to pytest raises
Passing origin as a keyword argument should raise a type error, so test_specgram_origin_kwarg should raise an exception. Therefore, raises is a more precise check than xfail.
Co-authored-by: David Stansby <[email protected]>
Co-authored-by: Theodor Athanasiadis <[email protected]>
Co-authored-by: Tim Hoffmann <[email protected]>1 parent b7ba9e4 commit 7a4df1a
3 files changed
Lines changed: 46 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7464 | 7464 | | |
7465 | 7465 | | |
7466 | 7466 | | |
7467 | | - | |
| 7467 | + | |
| 7468 | + | |
7468 | 7469 | | |
7469 | 7470 | | |
7470 | 7471 | | |
| |||
7548 | 7549 | | |
7549 | 7550 | | |
7550 | 7551 | | |
| 7552 | + | |
| 7553 | + | |
| 7554 | + | |
| 7555 | + | |
| 7556 | + | |
7551 | 7557 | | |
7552 | | - | |
| 7558 | + | |
7553 | 7559 | | |
7554 | 7560 | | |
7555 | 7561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4104 | 4104 | | |
4105 | 4105 | | |
4106 | 4106 | | |
| 4107 | + | |
| 4108 | + | |
| 4109 | + | |
| 4110 | + | |
| 4111 | + | |
| 4112 | + | |
| 4113 | + | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
4107 | 4134 | | |
4108 | 4135 | | |
4109 | 4136 | | |
| |||
0 commit comments