File size: 5,035 Bytes
8a46f1f | 1 2 | {"instance_id": "matplotlib__matplotlib-14623", "traj_data": {"pred_steps": [{"files": ["lib/matplotlib/axis.py"], "spans": {"lib/matplotlib/axis.py": [{"type": "line", "start": 1, "end": 40}]}}, {"files": ["lib/matplotlib/axis.py"], "spans": {"lib/matplotlib/axis.py": [{"type": "line", "start": 900, "end": 1000}]}}, {"files": ["lib/matplotlib/axes/_base.py"], "spans": {"lib/matplotlib/axes/_base.py": [{"type": "line", "start": 1, "end": 40}]}}, {"files": ["lib/matplotlib/axes/_base.py"], "spans": {"lib/matplotlib/axes/_base.py": [{"type": "line", "start": 3161, "end": 3330}]}}, {"files": ["lib/matplotlib/axes/_base.py"], "spans": {"lib/matplotlib/axes/_base.py": [{"type": "line", "start": 3540, "end": 3700}]}}, {"files": ["lib/matplotlib/scale.py"], "spans": {"lib/matplotlib/scale.py": [{"type": "line", "start": 1, "end": 40}]}}, {"files": ["lib/matplotlib/scale.py"], "spans": {"lib/matplotlib/scale.py": [{"type": "line", "start": 340, "end": 460}]}}, {"files": ["lib/matplotlib/axis.py"], "spans": {"lib/matplotlib/axis.py": [{"type": "line", "start": 780, "end": 830}]}}, {"files": ["lib/matplotlib/scale.py"], "spans": {"lib/matplotlib/scale.py": [{"type": "line", "start": 1, "end": 100}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 1, "end": 40}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2200, "end": 2400}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 1500, "end": 1560}]}}, {"files": ["lib/matplotlib/tests/test_axes.py"], "spans": {"lib/matplotlib/tests/test_axes.py": [{"type": "line", "start": 1, "end": 40}]}}, {"files": ["lib/matplotlib/transforms.py"], "spans": {"lib/matplotlib/transforms.py": [{"type": "line", "start": 1, "end": 40}]}}, {"files": ["lib/matplotlib/transforms.py"], "spans": {"lib/matplotlib/transforms.py": [{"type": "line", "start": 2791, "end": 2840}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2378, "end": 2398}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2378, "end": 2398}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2378, "end": 2398}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2378, "end": 2400}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2600, "end": 2640}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2146, "end": 2195}]}}, {"files": ["lib/matplotlib/axis.py"], "spans": {"lib/matplotlib/axis.py": [{"type": "line", "start": 1906, "end": 1960}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2378, "end": 2400}]}}, {"files": ["lib/matplotlib/axis.py"], "spans": {"lib/matplotlib/axis.py": [{"type": "line", "start": 1906, "end": 1960}]}}, {"files": ["lib/matplotlib/axis.py"], "spans": {"lib/matplotlib/axis.py": [{"type": "line", "start": 1906, "end": 1960}, {"type": "line", "start": 2188, "end": 2240}]}}, {"files": ["lib/matplotlib/axes/_base.py"], "spans": {"lib/matplotlib/axes/_base.py": [{"type": "line", "start": 1, "end": 40}]}}, {"files": ["lib/matplotlib/axis.py"], "spans": {"lib/matplotlib/axis.py": [{"type": "line", "start": 1, "end": 40}]}}, {"files": ["lib/matplotlib/axes/_base.py"], "spans": {"lib/matplotlib/axes/_base.py": [{"type": "line", "start": 2388, "end": 2460}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2405, "end": 2470}]}}, {"files": ["lib/matplotlib/ticker.py"], "spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2626, "end": 2660}]}}], "pred_files": ["lib/matplotlib/ticker.py"], "pred_spans": {"lib/matplotlib/ticker.py": [{"type": "line", "start": 2378, "end": 2400}, {"type": "line", "start": 2626, "end": 2660}]}}, "model_patch": "diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py\nindex 209a3f92c..adb34338d 100644\n--- a/lib/matplotlib/ticker.py\n+++ b/lib/matplotlib/ticker.py\n@@ -2379,8 +2379,10 @@ class LogLocator(Locator):\n if not np.isfinite(vmin) or not np.isfinite(vmax):\n return 1, 10 # initial range, no data plotted yet\n \n+ swapped = False\n if vmin > vmax:\n vmin, vmax = vmax, vmin\n+ swapped = True\n if vmax <= 0:\n cbook._warn_external(\n \"Data has no positive values, and therefore cannot be \"\n@@ -2395,6 +2397,8 @@ class LogLocator(Locator):\n if vmin == vmax:\n vmin = _decade_less(vmin, self._base)\n vmax = _decade_greater(vmax, self._base)\n+ if swapped:\n+ vmin, vmax = vmax, vmin\n return vmin, vmax\n \n \n"}
|