| 1 | { |
| 2 | "task_id": "matplotlib__matplotlib-25079", |
| 3 | "setup_info": { |
| 4 | "repo_path": "/home/haifeng/projects/reverse-prompt/SWE-bench/testbed/matplotlib__matplotlib/setup_matplotlib__matplotlib__3.6", |
| 5 | "env_name": "setup_matplotlib__matplotlib__3.6", |
| 6 | "pre_install": [], |
| 7 | "install": "python -m pip install -e .", |
| 8 | "test_cmd": "pytest --no-header -rA --tb=no -p no:cacheprovider lib/matplotlib/tests/test_colors.py" |
| 9 | }, |
| 10 | "task_info": { |
| 11 | "instance_id": "matplotlib__matplotlib-25079", |
| 12 | "base_commit": "66f7956984cbfc3647e867c6e5fde889a89c64ef", |
| 13 | "hints_text": "", |
| 14 | "created_at": "2023-01-25T15:24:44Z", |
| 15 | "test_patch": "diff --git a/lib/matplotlib/tests/test_colors.py b/lib/matplotlib/tests/test_colors.py\n--- a/lib/matplotlib/tests/test_colors.py\n+++ b/lib/matplotlib/tests/test_colors.py\n@@ -1493,6 +1493,11 @@ def test_norm_callback():\n norm.vmax = 5\n assert increment.call_count == 2\n \n+ # We only want autoscale() calls to send out one update signal\n+ increment.call_count = 0\n+ norm.autoscale([0, 1, 2])\n+ assert increment.call_count == 1\n+\n \n def test_scalarmappable_norm_update():\n norm = mcolors.Normalize()\n", |
| 16 | "repo": "matplotlib/matplotlib", |
| 17 | "problem_statement": "[Bug]: Setting norm with existing colorbar fails with 3.6.3\n### Bug summary\r\n\r\nSetting the norm to a `LogNorm` after the colorbar has been created (e.g. in interactive code) fails with an `Invalid vmin` value in matplotlib 3.6.3.\r\n\r\nThe same code worked in previous matplotlib versions.\r\n\r\nNot that vmin and vmax are explicitly set to values valid for `LogNorm` and no negative values (or values == 0) exist in the input data.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.colors import LogNorm\r\nimport numpy as np\r\n\r\n# create some random data to fill a 2d plot\r\nrng = np.random.default_rng(0)\r\nimg = rng.uniform(1, 5, (25, 25))\r\n\r\n# plot it\r\nfig, ax = plt.subplots(layout=\"constrained\")\r\nplot = ax.pcolormesh(img)\r\ncbar = fig.colorbar(plot, ax=ax)\r\n\r\nvmin = 1\r\nvmax = 5\r\n\r\nplt.ion()\r\nfig.show()\r\nplt.pause(0.5)\r\n\r\nplot.norm = LogNorm(vmin, vmax)\r\nplot.autoscale()\r\nplt.pause(0.5)\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backends/backend_qt.py\", line 454, in _draw_idle\r\n self.draw()\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backends/backend_agg.py\", line 405, in draw\r\n self.figure.draw(self.renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py\", line 74, in draw_wrapper\r\n result = draw(artist, renderer, *args, **kwargs)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py\", line 51, in draw_wrapper\r\n return draw(artist, renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/figure.py\", line 3082, in draw\r\n mimage._draw_list_compositing_images(\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/image.py\", line 131, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py\", line 51, in draw_wrapper\r\n return draw(artist, renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/axes/_base.py\", line 3100, in draw\r\n mimage._draw_list_compositing_images(\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/image.py\", line 131, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py\", line 51, in draw_wrapper\r\n return draw(artist, renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/collections.py\", line 2148, in draw\r\n self.update_scalarmappable()\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/collections.py\", line 891, in update_scalarmappable\r\n self._mapped_colors = self.to_rgba(self._A, self._alpha)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/cm.py\", line 511, in to_rgba\r\n x = self.norm(x)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/colors.py\", line 1694, in __call__\r\n raise ValueError(\"Invalid vmin or vmax\")\r\nValueError: Invalid vmin or vmax\r\n```\r\n\r\n### Expected outcome\r\n\r\nWorks, colorbar and mappable are updated with new norm.\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\nLinux\r\n\r\n### Matplotlib Version\r\n\r\n3.6.3 (works with 3.6.2)\r\n\r\n### Matplotlib Backend\r\n\r\nMultpiple backends tested, same error in all (Qt5Agg, TkAgg, agg, ...)\r\n\r\n### Python version\r\n\r\n3.9.15\r\n\r\n### Jupyter version\r\n\r\nnot in jupyter\r\n\r\n### Installation\r\n\r\nconda\n", |
| 18 | "version": "3.6", |
| 19 | "FAIL_TO_PASS": [ |
| 20 | "lib/matplotlib/tests/test_colors.py::test_norm_callback" |
| 21 | ], |
| 22 | "PASS_TO_PASS": [ |
| 23 | "lib/matplotlib/tests/test_colors.py::TestAsinhNorm::test_init", |
| 24 | "lib/matplotlib/tests/test_colors.py::TestAsinhNorm::test_norm", |
| 25 | "lib/matplotlib/tests/test_colors.py::test_2d_to_rgba", |
| 26 | "lib/matplotlib/tests/test_colors.py::test_BoundaryNorm", |
| 27 | "lib/matplotlib/tests/test_colors.py::test_CenteredNorm", |
| 28 | "lib/matplotlib/tests/test_colors.py::test_FuncNorm", |
| 29 | "lib/matplotlib/tests/test_colors.py::test_LogNorm", |
| 30 | "lib/matplotlib/tests/test_colors.py::test_LogNorm_inverse", |
| 31 | "lib/matplotlib/tests/test_colors.py::test_Normalize", |
| 32 | "lib/matplotlib/tests/test_colors.py::test_PowerNorm", |
| 33 | "lib/matplotlib/tests/test_colors.py::test_PowerNorm_translation_invariance", |
| 34 | "lib/matplotlib/tests/test_colors.py::test_SymLogNorm", |
| 35 | "lib/matplotlib/tests/test_colors.py::test_SymLogNorm_colorbar", |
| 36 | "lib/matplotlib/tests/test_colors.py::test_SymLogNorm_single_zero", |
| 37 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_Even", |
| 38 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_Odd", |
| 39 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_TwoSlopeNorm_VminGTVmax", |
| 40 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_VcenterGTVmax", |
| 41 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_VmaxEqualsVcenter", |
| 42 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_VminEqualsVcenter", |
| 43 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_VminGTVcenter", |
| 44 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_autoscale", |
| 45 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_autoscale_None_vmax", |
| 46 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_autoscale_None_vmin", |
| 47 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_premature_scaling", |
| 48 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_scale", |
| 49 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_scaleout_center", |
| 50 | "lib/matplotlib/tests/test_colors.py::test_TwoSlopeNorm_scaleout_center_max", |
| 51 | "lib/matplotlib/tests/test_colors.py::test_autoscale_masked", |
| 52 | "lib/matplotlib/tests/test_colors.py::test_boundarynorm_and_colorbarbase[png]", |
| 53 | "lib/matplotlib/tests/test_colors.py::test_cm_set_cmap_error", |
| 54 | "lib/matplotlib/tests/test_colors.py::test_cmap_and_norm_from_levels_and_colors2", |
| 55 | "lib/matplotlib/tests/test_colors.py::test_cmap_and_norm_from_levels_and_colors[png]", |
| 56 | "lib/matplotlib/tests/test_colors.py::test_cn", |
| 57 | "lib/matplotlib/tests/test_colors.py::test_color_names", |
| 58 | "lib/matplotlib/tests/test_colors.py::test_color_sequences", |
| 59 | "lib/matplotlib/tests/test_colors.py::test_colormap_alpha_array", |
| 60 | "lib/matplotlib/tests/test_colors.py::test_colormap_bad_data_with_alpha", |
| 61 | "lib/matplotlib/tests/test_colors.py::test_colormap_copy", |
| 62 | "lib/matplotlib/tests/test_colors.py::test_colormap_endian", |
| 63 | "lib/matplotlib/tests/test_colors.py::test_colormap_equals", |
| 64 | "lib/matplotlib/tests/test_colors.py::test_colormap_invalid", |
| 65 | "lib/matplotlib/tests/test_colors.py::test_colormap_return_types", |
| 66 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Accent]", |
| 67 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Accent_r]", |
| 68 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Blues]", |
| 69 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Blues_r]", |
| 70 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[BrBG]", |
| 71 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[BrBG_r]", |
| 72 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[BuGn]", |
| 73 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[BuGn_r]", |
| 74 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[BuPu]", |
| 75 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[BuPu_r]", |
| 76 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[CMRmap]", |
| 77 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[CMRmap_r]", |
| 78 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Dark2]", |
| 79 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Dark2_r]", |
| 80 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[GnBu]", |
| 81 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[GnBu_r]", |
| 82 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Greens]", |
| 83 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Greens_r]", |
| 84 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Greys]", |
| 85 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Greys_r]", |
| 86 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[OrRd]", |
| 87 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[OrRd_r]", |
| 88 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Oranges]", |
| 89 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Oranges_r]", |
| 90 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PRGn]", |
| 91 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PRGn_r]", |
| 92 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Paired]", |
| 93 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Paired_r]", |
| 94 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Pastel1]", |
| 95 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Pastel1_r]", |
| 96 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Pastel2]", |
| 97 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Pastel2_r]", |
| 98 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PiYG]", |
| 99 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PiYG_r]", |
| 100 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PuBuGn]", |
| 101 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PuBuGn_r]", |
| 102 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PuBu]", |
| 103 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PuBu_r]", |
| 104 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PuOr]", |
| 105 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PuOr_r]", |
| 106 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PuRd]", |
| 107 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[PuRd_r]", |
| 108 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Purples]", |
| 109 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Purples_r]", |
| 110 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdBu]", |
| 111 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdBu_r]", |
| 112 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdGy]", |
| 113 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdGy_r]", |
| 114 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdPu]", |
| 115 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdPu_r]", |
| 116 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdYlBu]", |
| 117 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdYlBu_r]", |
| 118 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdYlGn]", |
| 119 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[RdYlGn_r]", |
| 120 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Reds]", |
| 121 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Reds_r]", |
| 122 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Set1]", |
| 123 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Set1_r]", |
| 124 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Set2]", |
| 125 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Set2_r]", |
| 126 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Set3]", |
| 127 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Set3_r]", |
| 128 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Spectral]", |
| 129 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Spectral_r]", |
| 130 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Wistia]", |
| 131 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[Wistia_r]", |
| 132 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[YlGnBu]", |
| 133 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[YlGnBu_r]", |
| 134 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[YlGn]", |
| 135 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[YlGn_r]", |
| 136 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[YlOrBr]", |
| 137 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[YlOrBr_r]", |
| 138 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[YlOrRd]", |
| 139 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[YlOrRd_r]", |
| 140 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[afmhot]", |
| 141 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[afmhot_r]", |
| 142 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[autumn]", |
| 143 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[autumn_r]", |
| 144 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[binary]", |
| 145 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[binary_r]", |
| 146 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[bone]", |
| 147 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[bone_r]", |
| 148 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[brg]", |
| 149 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[brg_r]", |
| 150 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[bwr]", |
| 151 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[bwr_r]", |
| 152 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[cividis]", |
| 153 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[cividis_r]", |
| 154 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[cool]", |
| 155 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[cool_r]", |
| 156 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[coolwarm]", |
| 157 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[coolwarm_r]", |
| 158 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[copper]", |
| 159 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[copper_r]", |
| 160 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[cubehelix]", |
| 161 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[cubehelix_r]", |
| 162 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[flag]", |
| 163 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[flag_r]", |
| 164 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_earth]", |
| 165 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_earth_r]", |
| 166 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_gray]", |
| 167 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_gray_r]", |
| 168 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_heat]", |
| 169 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_heat_r]", |
| 170 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_ncar]", |
| 171 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_ncar_r]", |
| 172 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_rainbow]", |
| 173 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_rainbow_r]", |
| 174 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_stern]", |
| 175 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_stern_r]", |
| 176 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_yarg]", |
| 177 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gist_yarg_r]", |
| 178 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gnuplot2]", |
| 179 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gnuplot2_r]", |
| 180 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gnuplot]", |
| 181 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gnuplot_r]", |
| 182 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gray]", |
| 183 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[gray_r]", |
| 184 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[hot]", |
| 185 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[hot_r]", |
| 186 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[hsv]", |
| 187 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[hsv_r]", |
| 188 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[inferno]", |
| 189 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[inferno_r]", |
| 190 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[jet]", |
| 191 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[jet_r]", |
| 192 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[magma]", |
| 193 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[magma_r]", |
| 194 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[nipy_spectral]", |
| 195 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[nipy_spectral_r]", |
| 196 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[ocean]", |
| 197 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[ocean_r]", |
| 198 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[pink]", |
| 199 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[pink_r]", |
| 200 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[plasma]", |
| 201 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[plasma_r]", |
| 202 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[prism]", |
| 203 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[prism_r]", |
| 204 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[rainbow]", |
| 205 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[rainbow_r]", |
| 206 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[seismic]", |
| 207 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[seismic_r]", |
| 208 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[spring]", |
| 209 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[spring_r]", |
| 210 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[summer]", |
| 211 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[summer_r]", |
| 212 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[tab10]", |
| 213 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[tab10_r]", |
| 214 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[tab20]", |
| 215 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[tab20_r]", |
| 216 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[tab20b]", |
| 217 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[tab20b_r]", |
| 218 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[tab20c]", |
| 219 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[tab20c_r]", |
| 220 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[terrain]", |
| 221 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[terrain_r]", |
| 222 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[turbo]", |
| 223 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[turbo_r]", |
| 224 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[twilight]", |
| 225 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[twilight_r]", |
| 226 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[twilight_shifted]", |
| 227 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[twilight_shifted_r]", |
| 228 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[viridis]", |
| 229 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[viridis_r]", |
| 230 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[winter]", |
| 231 | "lib/matplotlib/tests/test_colors.py::test_colormap_reversing[winter_r]", |
| 232 | "lib/matplotlib/tests/test_colors.py::test_colormaps_get_cmap", |
| 233 | "lib/matplotlib/tests/test_colors.py::test_conversions", |
| 234 | "lib/matplotlib/tests/test_colors.py::test_conversions_masked", |
| 235 | "lib/matplotlib/tests/test_colors.py::test_create_lookup_table[1-result2]", |
| 236 | "lib/matplotlib/tests/test_colors.py::test_create_lookup_table[2-result1]", |
| 237 | "lib/matplotlib/tests/test_colors.py::test_create_lookup_table[5-result0]", |
| 238 | "lib/matplotlib/tests/test_colors.py::test_double_register_builtin_cmap", |
| 239 | "lib/matplotlib/tests/test_colors.py::test_failed_conversions", |
| 240 | "lib/matplotlib/tests/test_colors.py::test_get_under_over_bad", |
| 241 | "lib/matplotlib/tests/test_colors.py::test_grey_gray", |
| 242 | "lib/matplotlib/tests/test_colors.py::test_has_alpha_channel", |
| 243 | "lib/matplotlib/tests/test_colors.py::test_hex_shorthand_notation", |
| 244 | "lib/matplotlib/tests/test_colors.py::test_index_dtype[float16]", |
| 245 | "lib/matplotlib/tests/test_colors.py::test_index_dtype[float]", |
| 246 | "lib/matplotlib/tests/test_colors.py::test_index_dtype[int]", |
| 247 | "lib/matplotlib/tests/test_colors.py::test_index_dtype[uint8]", |
| 248 | "lib/matplotlib/tests/test_colors.py::test_light_source_hillshading", |
| 249 | "lib/matplotlib/tests/test_colors.py::test_light_source_masked_shading", |
| 250 | "lib/matplotlib/tests/test_colors.py::test_light_source_planar_hillshading", |
| 251 | "lib/matplotlib/tests/test_colors.py::test_light_source_shading_default", |
| 252 | "lib/matplotlib/tests/test_colors.py::test_light_source_shading_empty_mask", |
| 253 | "lib/matplotlib/tests/test_colors.py::test_light_source_topo_surface[png]", |
| 254 | "lib/matplotlib/tests/test_colors.py::test_lognorm_invalid[-1-2]", |
| 255 | "lib/matplotlib/tests/test_colors.py::test_lognorm_invalid[3-1]", |
| 256 | "lib/matplotlib/tests/test_colors.py::test_make_norm_from_scale_name", |
| 257 | "lib/matplotlib/tests/test_colors.py::test_ndarray_subclass_norm", |
| 258 | "lib/matplotlib/tests/test_colors.py::test_non_mutable_get_values[bad]", |
| 259 | "lib/matplotlib/tests/test_colors.py::test_non_mutable_get_values[over]", |
| 260 | "lib/matplotlib/tests/test_colors.py::test_non_mutable_get_values[under]", |
| 261 | "lib/matplotlib/tests/test_colors.py::test_norm_deepcopy", |
| 262 | "lib/matplotlib/tests/test_colors.py::test_norm_update_figs[pdf]", |
| 263 | "lib/matplotlib/tests/test_colors.py::test_norm_update_figs[png]", |
| 264 | "lib/matplotlib/tests/test_colors.py::test_pandas_iterable", |
| 265 | "lib/matplotlib/tests/test_colors.py::test_register_cmap", |
| 266 | "lib/matplotlib/tests/test_colors.py::test_repr_html", |
| 267 | "lib/matplotlib/tests/test_colors.py::test_repr_png", |
| 268 | "lib/matplotlib/tests/test_colors.py::test_resampled", |
| 269 | "lib/matplotlib/tests/test_colors.py::test_rgb_hsv_round_trip", |
| 270 | "lib/matplotlib/tests/test_colors.py::test_same_color", |
| 271 | "lib/matplotlib/tests/test_colors.py::test_scalarmappable_norm_update", |
| 272 | "lib/matplotlib/tests/test_colors.py::test_set_dict_to_rgba", |
| 273 | "lib/matplotlib/tests/test_colors.py::test_tableau_order", |
| 274 | "lib/matplotlib/tests/test_colors.py::test_to_rgba_array_alpha_array", |
| 275 | "lib/matplotlib/tests/test_colors.py::test_to_rgba_array_single_str", |
| 276 | "lib/matplotlib/tests/test_colors.py::test_unregister_builtin_cmap" |
| 277 | ], |
| 278 | "environment_setup_commit": "73909bcb408886a22e2b84581d6b9e6d9907c813", |
| 279 | "patch": "diff --git a/lib/matplotlib/colors.py b/lib/matplotlib/colors.py\n--- a/lib/matplotlib/colors.py\n+++ b/lib/matplotlib/colors.py\n@@ -1362,8 +1362,12 @@ def inverse(self, value):\n \n def autoscale(self, A):\n \"\"\"Set *vmin*, *vmax* to min, max of *A*.\"\"\"\n- self.vmin = self.vmax = None\n- self.autoscale_None(A)\n+ with self.callbacks.blocked():\n+ # Pause callbacks while we are updating so we only get\n+ # a single update signal at the end\n+ self.vmin = self.vmax = None\n+ self.autoscale_None(A)\n+ self._changed()\n \n def autoscale_None(self, A):\n \"\"\"If vmin or vmax are not set, use the min/max of *A* to set them.\"\"\"\n", |
| 280 | "pr_link": "https://github.com/matplotlib/matplotlib/pull/25079" |
| 281 | } |
| 282 | } |