Test specgram ignores image.origin rcParam and uses origin 'upper'.
(fig_test, fig_ref)
| 6066 | |
| 6067 | @check_figures_equal() |
| 6068 | def test_specgram_origin_rcparam(fig_test, fig_ref): |
| 6069 | """Test specgram ignores image.origin rcParam and uses origin 'upper'.""" |
| 6070 | t = np.arange(500) |
| 6071 | signal = np.sin(t) |
| 6072 | |
| 6073 | plt.rcParams["image.origin"] = 'upper' |
| 6074 | |
| 6075 | # Reference: First graph using default origin in imshow (upper), |
| 6076 | fig_ref.subplots().specgram(signal) |
| 6077 | |
| 6078 | # Try to overwrite the setting trying to flip the specgram |
| 6079 | plt.rcParams["image.origin"] = 'lower' |
| 6080 | |
| 6081 | # Test: origin='lower' should be ignored |
| 6082 | fig_test.subplots().specgram(signal) |
| 6083 | |
| 6084 | |
| 6085 | def test_specgram_origin_kwarg(): |