Add easily comparable version info to toplevel <!-- Welcome! Thanks for thinking of a way to improve Matplotlib. Before creating a new feature request please search the issues for relevant feature requests. --Currently matplotlib only exposes . For quick version checks, exposing either a tuple (which can be compared with other tuples) or a instance (which can be properly compared with other strings) would be a small usability improvement. (In practice I guess boring string comparisons will work just fine until we hit mpl 3.10 or 4.10 which is unlikely to happen soon, but that feels quite dirty :)) <!-- Provide a clear and concise description of the problem this feature will solve. For example: I'm always frustrated when [...] because [...] I would like it if [...] happened when I [...] because [...] Here is a sample image of what I am asking for [...] --I guess I slightly prefer , but exposing just a tuple is much more common in other packages (and perhaps simpler to understand). The hardest(?) part is probably just bikeshedding this point :-) <!-- Provide a clear and concise description of a way to accomplish what you want. For example: Add an option so that when [...] [...] will happen --is a pretty common thing (citation needed). <!-- Add any other context or screenshots about the feature request here. You can also include links to examples of other programs that have something similar to your request. For example: Another project [...] solved this by [...] --


Multicursor disappears when not moving on nbagg with useblit=False + burns CPU <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--Bug summary When on the nbagg backend if you stop moving the mouse the multicursor will disappear. The same example works fine on the qt backend. Additionally I noticed that when I add the multicursor my cpu usage jumps and the kernel busy indicator constantly flashes on and off. Showing the plot without the multicursor: ! and with the multicursor (just displaying, not interacting with the plot): ! That usage is pretty stable and my laptop's fan goes wild. The issue with the dissappearing was originally noticed by in Code for reproduction <!--A minimum code snippet required to reproduce the bug. Please make sure to minimize the number of dependencies required, and provide any necessary plotted data. Avoid using threads, as Matplotlib is (explicitly) not thread-safe.--Actual outcome ! and the high CPU usage Expected outcome Red line doesn't disappear + my CPU doesn't get crushed. <!--A description of the expected outcome from the code snippet--<!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--Matplotlib version <!--Please specify your platform and versions of the relevant libraries you are using:--Operating system: Ubuntu Matplotlib version (): '3.3.4.post2456+gfd23bb238' Matplotlib backend (): nbagg Python version: '3.9.1 (default, Jan 26 2021, 01:34:10) \n[GCC 9.3.0]' Jupyter version (if applicable): Notebook 6.2.0 - IPython 7.20.0 dev instlal of maptlotlib + conda-forge for the others


plotdirective is confused by include directives, part 2 (context option) Whenever a file is included in via the RST directive, Sphinx rebuilds the page; but in plotdirective, is not considered 'out of date' (as judged by the function), because the modification time of was not changed. This discrepancy is part of the reason why exists; and while working on it (at PR ) I discovered also that figures with the option set will get confused. A specific example is shown below. It's quite hard to encounter in real life but it is directly relevant to matplotlib's tests as there is a very similar construct in plots 6-9 of matplotlib's . a.rst b.rst the four files above in a directory and into it. the docs the first time using . in any way. the docs again. The third plot in throws an error. The reason for this, as suggested above, is because of the function. When is invoked again, Sphinx decides that both and must be recompiled. Now: Plot 1 is not considered out of date, because the image file already exists and was not modified. So the code is never run and is never saved to the context. Plot 2 is there to ensure that figures are closed prior to Plot 3, so that Plot 3 never generates an image file. Plot 3 is considered out of date, because there is no image file that corresponds to it. Thus it is run again, and doesn't see in the context, hence the warning. There shouldn't be any errors. One easy way to accomplish this is to make sure that Sphinx re-runs all code snippets which are context-dependent, whenever a file is recompiled. That is, if a plot directive has :context: on, then the code should always be considered out of date regardless of the file modification times. This will lead to some excessive regeneration of plots whenever included files are modified. For example, in the above code, whenever is modified, Plots 1 and 3 will always be re-created, even if is untouched. But IMO this is more sensible behaviour than the current bug. It would also be in line with what happens if any part of is modified, including the text outside the plot directives: all the plots in would be re-created. This doesn't change the case where neither nor are modified, because in that case Sphinx will never attempt to recompile either file and plot_directive will never be called.


Handle and label not created for Text with label Bug summary Text accepts a keyword argument but neither its handle nor its label is created and to the legend. Code for reproduction Actual outcome ! Expected outcome I expect a legend entry for the text. Matplotlib version Matplotlib version: 3.3.3


testhugerangelog is failing... <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--is failing quite a few of the CI runs with a Value Error. I cannot reproduce locally, so I assume there was a numpy change somewhere... This test came in


Sketch params ignored when using PGF backend Bug summary Calls to are ignored by the PGF backend and do not have any influence in the resulting pgf or pdf file. Code for reproduction Actual outcome ! Expected outcome ! Matplotlib version <!--Please specify your platform and versions of the relevant libraries you are using:--* Matplotlib version: '3.0.2' I am working on a fix for this.


setsegments(getsegments()) makes lines coarse After plotting with , I would like to retrieve the lines and manipulate them. Unfortunately, I noticed that the result is much coarser than without manipulation. In fact, a simple has this effect. I would have expected this does nothing at all. MWE: This is with mpl 3.4.2.


interactive SpanSelector incorrectly forces axes limits to include 0 <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--Bug summary Code for reproduction <!--A minimum code snippet required to reproduce the bug. Please make sure to minimize the number of dependencies required, and provide any necessary plotted data. Avoid using threads, as Matplotlib is (explicitly) not thread-safe.--Actual outcome The axes xlimits are expanded to include x=0. Expected outcome The axes xlimits remain at (10, 20) + margins, as was the case in Matplotlib 3.4 (with replaced by its old name ). attn Matplotlib version <!--Please specify your platform and versions of the relevant libraries you are using:--Operating system: linux Matplotlib version (): master (3.5.0.dev1362+g57489bf19b) Matplotlib backend (): qt5agg Python version: 39 Jupyter version (if applicable): no Other libraries: <!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--<!--If you installed from conda, please specify which channel you used if not the default--


[Bug]: subfigure position shifts on y-axis when x kwarg to supxlabel Location of subfigure shifts lower on y-axis when 'x' kwarg is used for supxlabel for that subfigure. I've also posted to StackOverflow: Body of subfigure shifts downward (lower on y-axis) and covers supxlabel ! subfigure position doesn't change. supxlabel shifts to right. ! Windows 10 Pro 2 No response 5 16 No response conda conda-forge


[Bug]: Colorbar creation from pcolormesh with cell specific alpha values When I try to take advantage of the new ability to set cell specific alpha values in pcolormesh - and then use the resulting QuadMesh object to create a colorbar it generates an error detailed below. A heat-map with a color bar beside it. Ubuntu inside singularity container 2 agg 5 not used none pip No response_


[Bug]: spines and ticklabels Hello everyone, I am not sure if this is a bug or just how the spines function () is supposed to work. Basically, if I set the spines command "after" the tickparams specs, the "labelrotation" commands is not followed but everything else is. Any suggestions? Seems kind of weird that only some of the tickparams are executed and not others. Thank you! Key aspect of code below: ["top"].setposition(("axes", 1.05)) ax1.tickparams(axis='x', colors="green", gridcolor='g',labelsize='small', labelrotation = 45) ["top"].setposition(("axes", 1.05)) See code above. I would expect the labels to be rotated regardless of where the spine command is placed. Windows or MacOs 2 No response 6 No response No response pip No response_


Add ability to disable callbacks temporarily It may be useful to update some attributes on an object that has callbacks temporarily and we don't want those callback signals being processed during that time. I guess we could add a context manager on CallbackRegistry? Originally posted by in


() adds extra ticks, un-hides shared-axis tick labels Bug summary When using shared axes (e.g. from ), calling causes ticks and tick labels to be shown that should be hidden. The axes are still linked, though (e.g. adjusting the plotting range on one subplot adjusts the others as well). This is a behavior change between matplotlib 3.4.1 and 3.4.2. Code for reproduction This code produces different results with matplotlib 3.4.1 and 3.4.2: This example is of course silly, but I use the general pattern when making animations with FuncAnimation, where my plotting function is a complex module which doesn't facilitate blitting, so I clear and re-use the axes for each frame of the animation. Actual outcome This is the plot produced with matplotlib 3.4.2: ! The presence of tick labels that should be hidden by virtue of the shared axes is the clearest problem in this plot, but there are also ticks that appear along the top and right side of each subplot which are not present in the example below (and not part of the default plotting style, IIRC). The top and right-side ticks also appear when not using multiple subplots, so I think the shared-axis aspect reveals another symptom but is not a core part of this bug. If the call is removed, the plot produced with matplotlib 3.4.2 appears identical to the 3.4.1 plot below. Expected outcome This is the plot produced with matplotlib 3.4.1: ! Matplotlib version Operating system: Ubuntu 20.04 Matplotlib version (): 3.4.2 Matplotlib backend (): module://matplotlibinline.backendinline Python version: 3.8.10 Jupyter version (if applicable): jupyter core 4.7.1, jupyter lab 3.0.16 Other libraries: I've installed matplotlib (3.4.2-py38h578d9bd0) via conda from conda-forge


Adding a legend to a doesn't work <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--Bug summary <!--A short 1-2 sentences that succinctly describes the bug--Adding a legend to a doesn't work Code for reproduction <!--A minimum code snippet required to reproduce the bug. Please make sure to minimize the number of dependencies required, and provide any necessary plotted data. Avoid using threads, as Matplotlib is (explicitly) not thread-safe.--Actual outcome <!--The output produced by the above code, which may be a screenshot, console output, etc.--Expected outcome <!--A description of the expected outcome from the code snippet--<!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--I'd expect this to work and produce a legend. The example is of course a bit contrived but it would be useful to allow a legend per subfigure Changing L437 here to check against fixes it. I can make a PR at some point but wanted to flag the issue here in case anyone gets to it first. Matplotlib version <!--Please specify your platform and versions of the relevant libraries you are using:--Operating system: macOS 11.4 Matplotlib version (): 3.4.2.post1350+gdba02be18e Matplotlib backend (): TkAgg Python version: Python 3.8.3 <!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--<!--If you installed from conda, please specify which channel you used if not the default--


MatplotlibDeprecationWarning when updating rcparams Bug summary Updating RC params in code produces a deprecation warning. In order to control rcParams for an internal library I am reading in parameters and popping some that I don't want used. I am using a variation on the code below. I think I have traced it to the _validators dictionary in Code for reproduction This code reproduces the error. Actual outcome Expected outcome I would expect Matplotlib to not load deprecated rcParams Matplotlib version <!--Please specify your platform and versions of the relevant libraries you are using:--Operating system: Windows Matplotlib version: 3.4.2 Matplotlib backend: 'Qt5Agg' Python version: 3.9.4 Jupyter version (if applicable): Other libraries: Setup a conda environment and just specified matplotlib from conda-forge


RuntimeError: adjustable='datalim' is not allowed when both axes are shared. <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--Bug summary Matplotlib 2.2.2 fails to plot the figure described below. The code works with Matplotlib 2.0.2. The issue seems to be the combination of `. Code for reproduction Actual outcome With Matplotlib 2.2.2, the figure is not drawn and the following exception is raised: Expected outcome Drawn figure, no error, as with Matplotlib 2.0.2 Matplotlib version <!--Please specify your platform and versions of the relevant libraries you are using:--Operating system: Windows 7 64 bits Matplotlib version: 2.2.2 Matplotlib backend (): Qt5Agg Python version: 3.6 Jupyter version (if applicable): Other libraries: Anaconda 5.2 <!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--<!--If you installed from conda, please specify which channel you used if not the default--


[Bug]: axes(position = [...]) behavior when setting axes position with the position data is not being incorporated. The two axes completely overlap ! Would expect two separate axes (these were created by adding and , which should not be necessary) ! Windows 2 Qt5Agg 8 No response No response conda No response


[Bug]: Subfigure breaks for some slices when using When creating a figure with you cannot use arbitrary gridspecs to create subfigures as it throws an error at some point ( I think once the layout manager actually takes effect?). This happened immediately on the call in and only on the call on No error. Should be the same as with Ubuntu 2428+g8daad3364a QtAgg 2 No response No response source No response_


[Bug]: Line2D should copy its inputs Currently, Line2D doesn't copy its inputs if they are already arrays. Most of the time, in-place modifications to the input arrays do not affect the draw line, because there is a cache that doesn't get invalidated, but in some circumstances, it is possible for these modifications to affect the drawn line. Instead, Line2D should just copy its inputs. This was rejected in on a memory-saving argument, but note that AxesImage (which would typically have much bigger (2D) inputs than Line2D (which has 1D inputs)) does a copy, which if anything is much worse memory-wise. (1) ! (2) (same as (1)) ! (3) (different, but only x got updated, not y) ! Modifying a posteriori should not affect the Line2D. Compare e.g. with AxesImage: Both images are identical. linux 5b1 mplcairo 39 No response No response source No response


[ENH]: use new style format strings for colorbar ticks At the moment, the default format strings in colorbar are old style ones, as in their init there is: which is a different convention from the one of a normal axis, which was introduced in . As in we pass the colorbar's formatter to the long axis, the statement above may be removed to keep the default logic only in . Right now one can pass a callable directly (although that's not documented), and the default behaviour from is triggered. However, I guess making this change for format strings would imply a deprecation cycle, as it breaks current behaviour. Another option would be to check in for what kind of string format we've been passed (unsure how, although there must be way). No response_


[Bug]: this example shows ok on matplotlib-3.4.3, but not in matplotlib-3.5.0 master of october 30th the display is not working well if swaping matplotlib-3.4.3 with matplotlib-3.5.0.dev2445+gb09aad279b, all the rest being strictly equal. it was also bad with rc1, so I tested with last master, thanks to the artefact generation on jupyterlab ` ! ! Windows 10 matplotlib-3.5.0.dev2445+gb09aad279b-cp39-cp39- module://matplotlibinline.backendinline Python 3.9.7 1 wheels from cgohlke when binaries, except the matplotlib-master from pip list: <detailsPackage Version --------------------------------- ------------------ adodbapi 2.6.1.3 affine 2.3.0 aiofiles 0.6.0 aiohttp 3.7.4.post0 aiosqlite 0.17.0 alabaster 0.7.12 algopy 0.5.7 altair 4.1.0 altair-data-server 0.4.1 altair-transform 0.2.0 altair-widgets 0.2.2 altgraph 0.17.2 amply 0.1.4 aniso8601 7.0.0 ansiwrap 0.8.4 anyio 3.3.4 appdirs 1.4.4 argon2-cffi 21.1.0 arrow 1.2.1 asciitree 0.3.3 asgi-csrf 0.9 asgiref 3.4.1 asn1crypto 1.4.0 asteval 0.9.25 astor 0.8.1 astroid 2.6.6 astroML 1.0.1 astropy 4.3.1 async-generator 1.10 async-timeout 3.0.1 atomicwrites 1.4.0 attrs 21.2.0 autopep8 1.5.7 Babel 2.9.1 backcall 0.2.0 backports-abc 0.5 1.1.0 baresql 0.7.6 base58 2.0.0 bcrypt 3.2.0 beautifulsoup4 4.10.0 binaryornot 0.4.4 black 21.9b0 bleach 4.1.0 blinker 1.4 blis 0.7.5 blosc 1.10.6 bloscpack 0.16.0 bokeh 2.4.1 botorch 0.4.0 Bottleneck 1.3.2 bqplot 0.12.31 branca 0.4.2 brewer2mpl 1.4.1 Brotli 1.0.9 cachelib 0.3.0 cachetools 4.2.4 Cartopy 0.20.1 catalogue 2.0.6 certifi 2021.10.8 cffi 1.15.0 cftime 1.5.1.1 chardet 4.0.0 charset-normalizer 2.0.7 click 7.1.2 click-default-group 1.2.2 click-plugins 1.1.1 cligj 0.7.2 cloudpickle 2.0.0 clrmagic 0.0.1a2 colorama 0.4.4 colorcet 2.0.6 cookiecutter 1.7.3 coverage 6.0.2 cramjam 2.4.0 cryptography 35.0.0 csvs-to-sqlite 1.2 cvxopt 1.2.7 cvxpy 1.1.15 cx-Freeze 6.5.3 cycler 0.11.0 cymem 2.0.6 Cython 0.29.24 cytoolz 0.11.0 dash 2.0.0 dash-core-components 2.0.0 dash-html-components 2.0.0 dash-table 5.0.0 dask 2021.10.0 dask-glm 0.2.0 dask-image 0.6.0 dask-labextension 5.1.0 dask-ml 2021.10.17 dask-searchcv 0.2.0 databases 0.4.1 datasette 0.59.1 datasette-graphql 1.5 datashader 0.13.0 datashape 0.5.2 dateparser 1.1.0 dateutils 0.6.12 0.5.4b1 debugpy 1.5.1 decorator 4.4.2 defusedxml 0.7.1 Deprecated 1.2.13 deprecation 2.1.0 descartes 1.1.0 diff-match-patch distlib 0.3.3 distributed 2021.10.0 docopt 0.6.2 docrepr 0.1.1 docutils 0.17.1 ecos 2.0.7.post1 emcee 3.1.1 entrypoints 0.3 et-xmlfile 1.1.0 fast-histogram 0.10 fastai 2.5.3 fastapi 0.70.0 fastcore 1.3.26 fastdownload 0.0.5 fasteners 0.16.3 fastparquet 0.7.1 fastprogress 1.0.0 feather-format 0.4.1 filelock 3.3.2 Fiona 1.8.20 flake8 3.9.2 Flask 2.0.2 flask-accepts 0.18.4 Flask-Compress 1.10.1 Flask-Cors 3.0.10 Flask-Mail 0.9.1 flask-restx 0.5.1 Flask-Session 0.4.0 Flask-SQLAlchemy 2.5.1 flaskerize 0.14.0 flatbuffers 2.0 flit 3.4.0 flitcore 3.4.0 folium 0.12.1 fonttools 4.27.1 formlayout 1.2.1a1 fs 2.4.13 fsspec 2021.10.1 future 0.18.2 fuzzywuzzy 0.18.0 GDAL 3.3.3 geographiclib 1.52 geopandas 0.10.2 geopy 2.2.0 geoviews 1.9.2 gitdb 4.0.9 GitPython 3.1.24 gmpy2 2.0.8 gpytorch 1.5.1 graphene 2.1.9 graphql-core 2.3.1 graphql-relay 2.0.1 great-expectations 0.13.36 greenlet 1.1.2 guidata 1.8.1a0 guiqwt 3.0.7 h11 0.12.0 h2 4.1.0 h5py 3.5.0 HeapDict 1.0.1 holoviews 1.14.6 hpack 4.0.0 html5lib 1.1 httpcore 0.13.7 httpie 2.6.0 httpx 0.20.0 hupper 1.10.3 husl 4.0.3 hvplot 0.7.3 Hypercorn 0.11.2 hyperframe 6.0.1 hypothesis 6.24.0 ibis-framework 1.4.0 idlex 1.18 idna 3.1 imageio 2.10.1 imageio-ffmpeg 0.4.2 imagesize 1.2.0 imbalanced-learn 0.8.1 importlib-metadata 4.8.0 inflection 0.5.1 iniconfig 1.1.1 intake 0.6.2 intervaltree 3.0.2 ipycanvas 0.9.1 ipykernel 6.4.2 ipyleaflet 0.14.0 ipympl 0.8.2 ipython 7.29.0 ipython-genutils 0.2.0 ipython-sql 0.4.1b1 ipywidgets 7.6.5 isort 5.9.3 itsdangerous 2.0.1 janus 0.6.2 jedi 0.18.0 Jinja2 3.0.2 jinja2-time 0.2.0 joblib 1.1.0 json5 0.9.6 jsonpatch 1.32 jsonpointer 2.1 jsonschema 4.1.2 julia 0.5.7 jupyter 1.0.0 jupyter-bokeh 3.0.4 jupyter-client 6.2.0 jupyter-console 6.4.0 jupyter-core 4.9.1 jupyter-lsp 1.5.0 jupyter-packaging 0.11.0 jupyter-server 1.11.1 jupyter-server-mathjax 0.2.3 jupyter-server-proxy 3.1.0 jupyter-sphinx 0.3.2 jupyterlab 3.2.1 jupyterlab-git 0.33.0 jupyterlab-launcher 0.13.1 jupyterlab-lsp 3.9.1 jupyterlab-pygments 0.1.2 jupyterlab-server 2.8.2 jupyterlab-widgets 1.0.2Note: you may need to restart the kernel to use updated packages. keyring 23.2.1 kiwisolver 1.3.2 lazy-object-proxy 1.6.0 llvmlite 0.37.0 lmfit 1.0.3 locket 0.2.1 loky 3.0.0 lxml 4.6.3 lz4 3.1.3 Markdown 3.3.4 MarkupSafe 2.0.1 marshmallow 3.12.1 matplotlib 3.4.3 matplotlib-inline 0.1.3 maturin 0.11.5 mccabe 0.6.1 mercantile 1.2.1 mergedeep 1.3.4 metakernel 0.27.5 mistune 0.8.4 mizani 0.7.3 mkl-service 2.4.0 mlxtend 0.18.0 moviepy 1.0.3 mpl-scatter-density 0.7 mpld3 0.5.5 mpldatacursor 0.7.1 mpmath 1.2.1 msgpack 1.0.2 msvc-runtime 14.29. multidict 5.2.0 multipledispatch 0.6.0 munch 2.5.0 murmurhash 1.0.6 mypy 0.910 mypy-extensions 0.4.3 mysql-connector-python 8.0.26 nbclassic 0.3.4 nbclient 0.5.4 nbconvert 6.2.0 nbconvertreportlab 0.2 nbdime 3.1.1 nbformat 5.1.3 nbval 0.9.6 nest-asyncio 1.5.1 netCDF4 1.5.8 networkx 2.6.3 NLopt 2.7.0 nltk 3.6.5 notebook 6.4.5 numba 0.54.1 numcodecs 0.9.1 numdifftools 0.9.40 numexpr 2.7.3 numpy 1.20.3+mkl numpydoc 1.1.0 oct2py 5.2.0 octave-kernel 0.32.0 onnxruntime 1.9.0 openpyxl 3.0.9 orjson 3.6.4 osqp 0.6.2.post0 outcome 1.1.0 packaging 21.2 palettable 3.3.0 pandas 1.3.4 pandas-datareader 0.10.0 pandocfilters 1.5.0 panel 0.12.4 papermill 2.3.3 param 1.12.0 parambokeh 0.2.3 paramiko 2.8.0 paramnb 2.0.4 parso 0.8.2 partd 1.2.0 pathspec 0.9.0 pathy 0.6.1 patsy 0.5.2 pdfrw 0.4 pdvega 0.2.1.dev0 pefile 2021.9.3 pep8 1.7.1 pexpect 4.8.0 pg8000 1.21.1 pickleshare 0.7.5 Pillow 8.4.0 PIMS 0.5 Pint 0.18 pip 21.3.1 pipdeptree 2.2.0 pkginfo 1.7.1 platformdirs 2.4.0 plotly 5.3.1 plotnine 0.8.0 pluggy 1.0.0 ply 3.11 portpicker 1.4.0 poyo 0.5.0 ppci 0.5.8 preshed 3.0.6 prettytable 2.2.1 priority 2.0.0 proglog 0.1.9 prometheus-client 0.12.0 promise 2.3 prompt-toolkit 3.0.21 protobuf 4.0.0rc1 psutil 5.8.0 ptpython 3.0.20 ptyprocess 0.7.0 PuLP 2.3 py 1.10.0 py-lru-cache 0.1.4 pyaml 20.4.0 pyarrow 6.0.0 PyAudio 0.2.11 pybars3 0.9.7 pybind11 2.8.1 pycodestyle 2.7.0 pycosat 0.6.3 pycparser 2.20 pyct 0.4.8 pydantic 1.8.2 pydeck 0.7.1 pydocstyle 6.1.1 pyepsg 0.4.0 pyerfa 2.0.0 pyflakes 2.3.1 pyflux 0.4.17 pygame 2.0.3 pygbm 0.1.0 Pygments 2.10.0 pyhdf 0.10.3 pyinstaller 4.5.1 pyinstaller-hooks-contrib 2021.3 pylint 2.9.6 pyls-spyder 0.4.0 pymc 2.3.8 PyMeta3 0.5.1 pymongo 3.12.1 PyNaCl 1.4.0 pynndescent 0.5.5 pyodbc 4.0.32 PyOpenGL 3.1.5 pypandoc 1.5 pyparsing 2.4.7 pyproj 3.2.1 PyQt5 5.15.1 PyQt5-sip 12.8.1 pyqt5-tools 5.15.1.1.7.5.post3 pyqtgraph 0.12.2 PyQtWebEngine 5.15.1 pyrsistent 0.18.0 pyserial 3.5 pyshp 2.1.3 PySocks 1.7.1 pystache 0.5.4 pytest 6.2.5 python-baseconv 1.2.2 python-dateutil 2.8.2 python-dotenv 0.19.1 python-hdf4 0.10.0+dummy python-Levenshtein 0.12.2 python-lsp-black 1.0.0 python-lsp-jsonrpc 1.0.0 python-lsp-server 1.2.4 python-multipart 0.0.5 python-picard 0.7 python-slugify 5.0.2 python-snappy 0.6.0 pythonnet 2.5.2 PythonQwt 0.9.2 pytz 2021.3 pyviz-comms 2.1.0 PyWavelets 1.1.1 pywin32 302 pywin32-ctypes 0.2.0 pywinpty 1.1.5 pywinusb 0.4.2 PyYAML 6.0 pyzmq 22.3.0 pyzo 4.11.3a1 QDarkStyle 3.0.2 qdldl 0.1.5.post0 qpsolvers 1.7.0 qstylizer 0.2.1 QtAwesome 1.0.3 qtconsole 5.1.1 QtPy 2.0.0.dev0 quadprog 0.1.8 quantecon 0.5.1 Quart 0.15.1 rasterio 1.2.10 readme-renderer 30.0 redis 3.5.3 regex 2021.10.23 reportlab 3.6.2 requests 2.26.0 requests-toolbelt 0.9.1 requests-unixsocket 0.2.0 rfc3986 1.5.0 rise 5.7.1 rope 0.21.0 rpy2 3.4.0.dev0 Rtree 0.9.7 0.17.15 0.2.6 Rx 1.6.1 scikit-fuzzy 0.4.1 scikit-image 0.18.3 scikit-learn 1.0.1 scikit-optimize 0.9.0 scilab2py 0.6.2 scipy 1.7.1 scramp 1.4.1 scs 2.1.4 seaborn 0.11.2 Send2Trash 1.8.0 setuptools 58.3.0 setuptools-scm 6.3.2 shap 0.39.0 Shapely 1.8.0 simpervisor 0.4 simplegeneric 0.8.1 simplejson 3.17.5 simpy 4.0.1 six 1.16.0 sklearn-contrib-lightning 0.6.1 slicer 0.0.7 slicerator 1.0.0 smart-open 5.2.1 smmap 5.0.0 snakeviz 2.1.0 sniffio 1.2.0 snowballstemmer 2.1.0 snuggs 1.4.7 sortedcontainers 2.4.0 sounddevice 0.4.3 soupsieve 2.2.1 spacy 3.1.3 spacy-legacy 3.0.8 Sphinx 4.2.0 sphinx-rtd-theme 1.0.0 sphinxcontrib-applehelp 1.0.2 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 spyder 5.1.5 spyder-kernels 2.1.3 SQLAlchemy 1.4.26 sqlite-bro 0.12.1 sqlite-fts4 1.0.1 sqlite-utils 3.17.1 sqlparse 0.4.2 srsly 2.4.2 starlette 0.16.0 statsmodels 0.13.0 streamlit 1.1.0 streamz 0.6.3 supersmoother 0.4 sympy 1.9 tables 3.6.1 tabulate 0.8.9 tblib 1.7.0 tenacity 8.0.1 termcolor 1.1.0 terminado 0.12.1 testpath 0.5.0 text-unidecode 1.3 textdistance 4.2.2 textwrap3 0.9.2 thinc 8.0.12 threadpoolctl 3.0.0 three-merge 0.1.1 thrift 0.15.0 tifffile 2021.10.12 tinycss2 1.1.0 toml 0.10.2 tomli 1.2.2 tomliw 0.4.0 tomlkit 0.7.2 toolz 0.11.1 torch 1.10.0 torchaudio 0.10.0 torchvision 0.11.1 tornado 6.1 tqdm 4.62.3 traitlets 5.1.1 traittypes 0.2.1 tranquilizer 0.5.1a1 trio 0.19.0 trio-asyncio 0.12.0 twine 3.4.2 twitter 1.19.2 typer 0.4.0 typing-extensions 3.10.0.2 tzlocal 2.1 ujson 4.2.0 umap-learn 0.5.1 uncertainties 3.1.6 urllib3 1.26.7 uvicorn 0.15.0 validators 0.18.2 vega 3.5.0 vega-datasets 0.9.0 virtualenv 20.9.0 ViTables 3.0.2 voila 0.2.16 voila-gridstack 0.2.0 wasabi 0.8.2 wasmer 1.0.0 wasmercompilercranelift 1.0.0 wasmercompilersinglepass 1.0.0 watchdog 2.1.5 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 1.2.1 Werkzeug 2.0.2 wheel 0.37.0 widgetsnbextension 3.5.2 winpython 4.6. winrt 1.0..1 wordcloud 1.8.1 wrapt 1.12.1 wsproto 1.0.0 xarray 0.19.0 XlsxWriter 3.0.1 xlwings 0.24.7 yapf 0.31.0 yarl 1.7.0 zarr 2.10.2 zict 2.0.0 zipp 3.6.0 zstandard 0.16.0 </detailspip No response_


[Bug]: eventplot cannot handle multiple datetime-based series I am having the exact same issue as in (which apparently was resolved at some point, but it's not working for me) with the latest version of matplotlib as passing a list of s to is not working. TypeError Traceback (most recent call last) ~\AppData\Local\ in <module4 ts1 = [(2021, 1, 15), (2021, 1, 16), (2021, 1, 18), (2021, 1, 22), (2021, 1, 26), (2021, 1, 28), (2021, 1, 30), (2021, 2, 1), (2021, 2, 3), (2021, 2, 7), (2021, 2, 8), (2021, 2, 11), (2021, 2, 15)] 5 ts2 = [(2021, 1, 1), (2021, 1, 2), (2021, 1, 3), (2021, 1, 4), (2021, 1, 5), (2021, 1, 6), (2021, 1, 7), (2021, 1, 8), (2021, 1, 9), (2021, 1, 10), (2021, 1, 11), (2021, 1, 12), (2021, 1, 13), (2021, 1, 14), (2021, 1, 15), (2021, 1, 16), (2021, 1, 17), (2021, 1, 18), (2021, 1, 19), (2021, 1, 20), (2021, 1, 25), (2021, 1, 26), (2021, 1, 27), (2021, 1, 28), (2021, 1, 29), (2021, 1, 30), (2021, 1, 31), (2021, 2, 12)] ----6 plt.eventplot([ts1, ts2], colors="black") c:\Users\User\Documents\venv\lib\site-packages\matplotlib\ in eventplot(positions, orientation, lineoffsets, linelengths, linewidths, colors, linestyles, data, kwargs) 2784 linelengths=1, linewidths=None, colors=None, 2785 linestyles='solid', , data=None, kwargs): -2786 return gca().eventplot( 2787 positions, orientation=orientation, lineoffsets=lineoffsets, 2788 linelengths=linelengths, linewidths=linewidths, colors=colors, c:\Users\User\Documents\venv\lib\site-packages\matplotlib\ in inner(ax, data, args, kwargs) 1359 def inner(ax, args, data=None, kwargs): 1360 if data is None: -1361 return func(ax, map(sanitizesequence, args), kwargs) 1362 1363 bound = (ax, *args, kwargs) c:\Users\User\Documents\venv\lib\site-packages\matplotlib\axes\ in eventplot(self, positions, orientation, lineoffsets, linelengths, linewidths, colors, linestyles, kwargs) 1321 zip(positions, lineoffsets, linelengths, linewidths, 1322 colors, linestyles): -1323 coll = mcoll.EventCollection(position, 1324 orientation=orientation, 1325 lineoffset=lineoffset, c:\Users\User\Documents\venv\lib\site-packages\matplotlib\ in init(self, positions, orientation, lineoffset, linelength, linewidth, color, linestyle, antialiased, kwargs) 1619 self.lineoffset = lineoffset 1620 self.setorientation(orientation) -1621 self.setpositions(positions) 1622 1623 def getpositions(self): c:\Users\User\Documents\venv\lib\site-packages\matplotlib\ in setpositions(self, positions) 1638 posidx = 0 if self.ishorizontal() else 1 1639 segments = ((len(positions), 2, 2)) -1640 segments[:, :, posidx] = (positions)[:, None] 1641 segments[:, 0, 1 - posidx] = lineoffset + linelength / 2 1642 segments[:, 1, 1 - posidx] = lineoffset - linelength / 2 TypeError: float() argument must be a string or a number, not '' An eventplot with one time series per "row" in the y-axis. Windows 3 No response 7 No response No response pip No response


[Bug]: Datetime axis with usetex is unclear The spacing for a datetime axis when using is unclear in matplotlib version 3.4 when comparing it to 3.3. Example of how it look in 3.3.4: ! Example of how it look in 3.4.3: ! The ideal case would be to have the spacing from version 3.3 in a tex format. Windows 3 No response No response No response No response conda conda-forge


[Bug]: upon deepcopy of a object A deepcopy of a object results in . This issue surfaced in a bug report of : Nevertheless, the current issue is unrelated to . I'm just mentioning this to illustrate a relevant use case leading to this problem. Disclaimer: this is taken from a message of on Either a deepcopy of the figure or a meaningful error message explaining that this operation is not supported. Fedora Linux 3 Qt5Agg 7 6, (not installed) None Linux package manager (Debian/Fedora/etc.) No response


[Bug]: Text sometimes is missing when figure saved to EPS I'm using cartopy to render data in polar projection. After an update I noticed that labels and title is not anymore rendered in saved eps file, though it was rendered in Jupyter notebook. I managed to simplify the code and found that matplotlib=3.3.4 does not suffer from the problem, while matplotlib=3.4.3 does. The testing environment was obtained by calls Might be related to An eps file with no message. (matplotlib v3.4.3) ! An eps file with message. (matplotlib v3.3.4) ! Debian GNU/Linux bookworm, Linux Mint 20.2 Uma 3 Qt5Agg Python 3.7.12 not used cartopy=0.18.0 conda conda-forge


[Bug]: cannot give init value for RangeSlider widget I think should be commented in /matplotlib/widgets. py", line 915, in setval as it prevents to initialized value for RangeSlider range slider with user initial values error can be removed by commenting this line OSX 1 No response 8 No response_ pip


[Bug]: Confusing deprecation warning when empty data passed to axis with category units I'm seeing a when using calling axes methods on empty data structures for axes that are using string unit converters. I think this is either a false alarm or a non-actionable warning. ([], []) Here's the full traceback if I force the warning to be an error: <details</detailsAdditionally, the problem is not solved by doing what the warning message suggests: <details</detailsI would expect this to either (1) continue producing artists with no data, or (2) more accurately describe what the problem is and how to avoid it. Looking at the traceback, it seems like it's catching exceptions too broadly and issuing a generic warning. If passing empty data structures through unit converters is now deprecated, it should be possible to detect that specific case. But I can't quite follow the API change note here: The traceback appears inconsistent with the claim that is never called with a unit-less value and that provides an alternate, supported interface: So it feels like maybe whatever is changing behind the scenes failed to anticipate the "empty data" edge case? 1


[Bug]: tripcolor ignores clim shows that tripcolor ignores clim. Colorbar/colormapping goes from nearly 0 to nearly 1. Colorbar/colormapping goes from 0 to 0.5. This is the same issue as /: kwargs should be handled a bit further down in the implementation of tripcolor() (just before calling scalenorm). arch linux 1920+gdfd83c2c5d mplcairo 310 ENOSUCHLIB git checkout


[Bug]: Issue with findnearestcontour in The default for the indices keyword in the findnearestcontour function within is defined incorrectly in the code. Line 1377 should be "indices = range(len())" instead of "indices = range(len())." Traceback (most recent call last): File "<stdin", line 1, in <moduleFile "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-", line 1388, in findnearestcontour con = self.collections[icon] IndexError: list index out of range (0, 0, 397, 23., 14., 49.) No response Mac OS 12.3.1 1 TkAgg 12 No response pip


[Bug]: makenormfromscale should create picklable classes even when used in-line. The new helper dynamically generates a norm class from a scale class. Currently, in the codebase, it is only used as a decorator to create "toplevel" classes (e.g., it is used to generate LogNorm from LogScale, etc.), but it can also be used within other functions to dynamically generate a norm class based on a user-given arbitrary scale (see for an example of application, which is however not necessary to understand for what follows). In the latter case, the dynamically generate class is currently not picklable (because pickling of classes relies on the existence of global names, see e.g. ). It would be generally useful to get rid of this restriction, which can be done by implementing the ; there's already other examples in the codebase of dynamically generated classes that use the same mechanism). I'm tagging this as "good first issue" because there's no API design and the eng goal is clear, but medium (perhaps hard) difficulty because it requires somewhat sophisticated understanding of the details of the pickling process. (Note the additional confusion here: there's two classes that are both named -- the original one and the dynamically generated one -- but they are different.) A correct round-trippable pickle. No response master (unreleased, pre 3.5) No response No response No response No response source No response


[Bug]: scalar mappable formatcursordata crashes on BoundarNorm In 3.5.0 if you do: and mouse over the image, it crashes with and interaction stops. Not sure if we should have a special check here, a try-except, or actually just make BoundaryNorm approximately invertible. main 3.5.0 [Bug]: scalar mappable formatcursordata crashes on BoundarNorm In 3.5.0 if you do: and mouse over the image, it crashes with and interaction stops. Not sure if we should have a special check here, a try-except, or actually just make BoundaryNorm approximately invertible. main 3.5.0


[Bug]: Colorbar with drawedges=True and extend='both' does not draw edges at extremities When creating a matplotlib colorbar, it is possible to set drawedges to True which separates the colors of the colorbar with black lines. However, when the colorbar is extended using extend='both', the black lines at the extremities do not show up. ! ! No response No response 1 No response No response No response No response


[Bug]: ConciseDateFormatter not showing year anywhere when plotting <12 months When I plot < 1 year and January is not included in the x-axis, the year doesn't show up anywhere. This bug is different from bug (fixed in ). ! I expect the year "2021" to show in the offset, to the right of the x-axis I'm using Spyder IDE, v5.1.5 Windows 10 3 Qt5Agg 1 No response conda


Missing prefix on f-strings Some strings looks like they're meant to be f-strings but are missing the prefix meaning variable interpolation won't happen. I found this issue automatically. I'm a bot. Beep Boop . See other issues I found in your repo


[Bug]: barlabel fails with nan errorbar values appears not to be robust to bars with missing (nan) values when also including error values. This issue is similar to , but occurs in each of three cases: Case 1. When a dependent value is missing. Case 2. When an error value is missing. Case 3. When both a dependent value and an error value are missing. The error seems to happen here, but I don't know the code well enough to pinpoint what should change to fix this: runcell('Case 3: Missing dependent and error values', 'C:/Users/jam/Documents/GitHub/ci-greedy-agents-') Traceback (most recent call last): File "C:\ProgramData\Miniconda3\lib\site-packages\spyderkernels\", line 356, in compatexec exec(code, globals, locals) File "c:\users\jam\documents\github\ci-greedy-agents-base\", line 27, in <moduleax.barlabel(bars) File "C:\ProgramData\Miniconda3\lib\site-packages\matplotlib\axes\", line 2641, in barlabel endpt = err[:, 1].max() if dat = 0 else err[:, 1].min() IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed Maybe either raise an error telling me what I should do instead, or have the code resolve whatever the source is on the backend? Ideally, I think the following should happen: Case 1. Raise an error that there is no value to apply the errorbar value to. Cases 2 & 3. Ignore the missing value and move on to the next. No response Windows 10.1 1 module://matplotlibinline.backendinline 5 Spyder 5.3.0 conda


[Bug]: Regression in dashes due to Previously working plotting code has broken. It fails on / but passes on the parent . No line shown, error while drawing Line shown ! Maybe we use a weird/bad/incorrect convention in our code by creating and we can certainly work around it/fix it, but it used to work at least! At a minimum it might be nice to raise a nicer error if possible... Ubuntu 22.04 QtAgg (PyQt6) 10.4 No response git checkout


[Bug]: Regression in animation from On things are fine, on the next commit from we get an error with previously working animation code. No error No response Ubuntu 22.04 QtAgg (PyQt6) 10.4 No response git checkout


[Bug]: Can't use on axes created using subfigures Using on an axes created using subfigures result in an error. It should set the given ax as the current axe, as done by the code below: No response UBuntu 20.04 1 QtAgg 10 No response pip


[MNT]: Require that matplotlibrc/style files use utf-8 (or have an encoding cookie) Currently, matplotlibrc and style files are read with the locale encoding, since . There's even a test for it in , which reads But actually, we probably never really supported non-ascii encodings (such as utf-32-be), because if you try to import matplotlib in such a context, we will fail much earlier, when trying to read the default matplotlibrc file: gives (the test doesn't see that because the default matplotlibrc file has already been imported at this point...). This behavior also means that style files are actually not shareable between systems that use incompatible encodings. Given that was implemented in response to , which is about the Py2/Py3 unicode transition and not any user actually requesting support for non-standard encodings, I think we should just drop any intent of reading matplotlibrc/style files using the user locale, and instead spec them as being utf-8 (or, if we want to be super-flexible, support encoding cookies as in / -- but I'd say it's probably not worth it?). No response


[Bug]: Gaps and overlapping areas between bins when using float16 When creating a histogram out of float16 data, the bins are also calculated in float16. The lower precision can cause two errors: 1) Gaps between certain bins. 2) Two neighboring bins overlap each other (only visible when alpha < 1) ! ! Created by ((np.float32), bins=100, alpha=0.5) () Possible solution Calculate the bins in float32: Determine minimal and maximal value in float16. Convert min and max to float32. Calculate the bin edges. Theoretical possible, but unwanted solution Convert data into float32 before calculating the histogram. This behavior does not make a lot of sense, as float16 is mostly used because of memory limitations (arrays with billions of values can easily take several gigabytes). Windows 10 3 TkAgg 1 No response pip Refactor hist for less numerical errors Should help with Idea is to do computation on the edges rather than the widths and then do diff on the result. This may be numerically better (or not...). Or rather, it is probably numerically worse, but will give visually better results... Probably the alternative approach of providing a flag to /, making sure that adjacent bars are actually exactly adjacent may be a better approach, but I wanted to see what comes out of this first... <!-- Please mark any checkboxes that do not apply to this PR as [N/A]. --Tests and Styling [ ] Has pytest style unit tests (and passes). compliant (install and run ). Documentation [ ] New features are documented, with examples if plot related. [ ] New features have an entry in (follow instructions in there). [ ] API changes documented in (follow instructions in there). without error). <!-- Thank you so much for your PR! To help us review your contribution, please consider the following points: A development guide is available at Help with git and github is available at Do not create the PR out of main, but out of a separate branch. The PR title should summarize the changes, for example "Raise ValueError on non-numeric input to setxlim". Avoid non-descriptive titles such as "Addresses issue ". The summary should provide at least 1-2 sentences describing the pull request in detail (Why is this change required? What problem does it solve?) and link to any relevant issues. If you are contributing fixes to docstrings, please pay attention to In particular, note the difference between using single backquotes, double backquotes, and asterisks in the markup. We understand that PRs can sometimes be overwhelming, especially as the reviews start coming in. Please let us know if the reviews are unclear or the recommended next step seems overly demanding, if you would like help in addressing a reviewer's comments, or if you have been waiting too long to hear back on your PR. --


[MNT]: Should () get a minor keyword argument Extracted as remaining question from . Currently does not support a minor kwarg, in contrast to . it's not strictly necessary because pyplot may have less functionality than the OOP interface; but it doesn't hurt either. No response_


[Bug]: Figures fail to redraw with IPython A regression between release versions 3.5.1 and 3.5.2 causes figures to fail to redraw after an initial plot is using the interface in an interactive IPython session. This has been observed with both and . The figure will show the first plot drawn, but subsequent calls to and fail to update an on-screen figure until is invoked. This has been observed with IPython versions 8.3.0 (current) and 8.2.0. Both the Qt5 and Tk backends exhibit the same issues. the first command, a figure appears with a line shown. the second command, the figure does not update. the command, the figure updates to show both the and lines. the first command, a figure appears with a line shown. (This is as expected.) the second command, the figure updates with the addition of a line. (This is the deviation.) command should produce no visible change in the figure. This regression has been bisected to commit . The testbed is a current Void Linux system running Python 3.10.4, including the system package for a GUI. (As noted above, this bug is also present with the Qt5 backend.) All packages were installed in a virtual environment. The output of is: (Note that the funny version comes from a local git repo checked out to the problematic commit.) Void Linux x86_64 2 TkAgg, Qt5Agg 10.4 None pip


[Bug]: Confusing error messages Basically, plotting from a dataframe failed because of a keyerror but the message I received was regarding formatting using a string. The failure happened silently, causing me to spend over an hour tracking down a type because I had no clue where to start. Traceback (most recent call last): File "<stdin", line 1, in <moduleFile "/home/bbriscoe/thirdparty/phel-1.2.0/linuxx86649.4.0/miniconda3-4.9.2/lib/python3.9/site-", line 1605, in plot lines = [self.getlines(args, data=data, **kwargs)] File "/home/bbriscoe/thirdparty/phel-1.2.0/linuxx86649.4.0/miniconda3-4.9.2/lib/python3.9/site-", line 315, in call yield from self.plotargs(this, kwargs) File "/home/bbriscoe/thirdparty/phel-1.2.0/linuxx86649.4.0/miniconda3-4.9.2/lib/python3.9/site-", line 452, in plotargs linestyle, marker, color = processplotformat(fmt) File "/home/bbriscoe/thirdparty/phel-1.2.0/linuxx86649.4.0/miniconda3-4.9.2/lib/python3.9/site-", line 188, in processplotformat raise ValueError( ValueError: Illegal format string "correctlySpelledHeader"; two color symbols The actual failure is happening when the df and key are passed into this as data and value respectively. mpl.replacer(data,value): ----try: --------# if key isn't a string don't bother --------if isinstance(value, str): --------# try to use getitem --------value = data[value] <-----------------------Key Error because of typo ----except Exception: --------# key does not exist, silently fall back to key --------pass ----return sanitizesequence(value) As you can see from the comment, this happens silently. And as you can see from the Traceback provided the error you finally receive is regarding a formatting string. So this caused quite a bit of confusion, because I was looking everywhere except my header spellings. I feel like this shouldn't happen 'silently', it at least deseves a warning, perhaps: ----except Exception: --------('KeyError generated when attempting to access data using provided str') side note: the docstring says it returns data[value] or data back. in reality it passes back data[value] or value back. Not sure what the purpose is for allowing this to slide through, but either the behavior is wrong or the docstring is. No response Ubuntu 20.04 2 Qt5Agg 1 No response No response


[Bug]: Imshow with all negative values leads to math domain errors. When using imshow to display a numpy array filled with identical negative values hovering the mouse over the displayed image throws math domain errors. Hovering the mouse over the plot spews math domain errors into console and stops the value and coordinate under the mouse from being displayed in the top right. ! The coordinates and values in the top right of the window are missing. ! The value area should be displayed correctly. Perhaps the delta in cbook\", line 2228, in gsigdigits (math.log10(delta))) if math.isfinite(value) else 0 is negative in this case. The errors do not occur if a single value in the array is different(negativ or positive doesn't matter). i.e. Will not error. The errors also do not occur if setclim() is used. Windows 10 .1645 1 QtAgg Python 3.9.12 No response conda


Legend Title Left Alignment I'm trying to align my legend title on the left of the legend box. I assumed this would work: leg = ax.getlegend() titleinst = leg.gettitle() titleinst.sethorizontalalignment('left') However only this worked: leg = ax.getlegend() = "left" Seems like something is not working as expected, especially since I'm accessing something hidden.


[Bug]: Crash when adding clabels to subfigures Adding a clabel to a contour plot of a subfigure results in a traceback. The two subfigures appearing side by side, each showing the Contour Demo example No response Gentoo 2 QtAgg 13 No response Linux package manager


[MNT]: default date limits... The default date limits are 2000-01-01 to 2010-01-01. This leads to problems as a default if folks add for instance day tickers without specifying the limits. See for instance: We can change these to 1970-01-01 to 1970-01-02. For the default date epoch, this would yield default limits of 0-1 in our float conversion. If folks use the old epoch (0000-01-01), it would still work, but of course be something much larger than 0-1. This should only affect empty date axes, not any axes that folks have actually data to. If I make this change on main, the only tests that fail are empty axes tests.


Inconsistency in keyword-arguments ncol/ncols, nrow/nrows I find it quite inconsistent that one sometimes has to specify and sometimes . For example: while (Likewise for /)


[Bug]: colorbar ignores keyword panchor=False seems to ignore the keyword setting My reading of the is that the axes anchor should still be "N" after I add the colorbar. Though given , it's possible I have misunderstood! No response No response branch (3.6.0.dev2341+g3df958c760), 3.5.2 and some older (3.3+) versions. No response No response No response No response


[ENH]: contour kwarg for negativelinestyle if you contour a negative quantity, it gets dashed lines. Leaving aside whether this is a good default or not, the only way to toggle this is via . I think this should be togglable via kwarg, though I appreciate that overlaps with and only is activated with monochrome contours. (I actually think the default should be False, FWIW - this surprises me every time, and I make quite a few contour plots).


[ENH]: Colorbar should support location kwarg that sets both orientation and ticklocation When colorbar autocreates an Axes, one can pass , which also sets the colorbar's orientation and the ticklocation (left for a left colorbar, right for a right colorbar, etc.). When one instead passes a manually created Axes (e.g. using insetaxes, as suggested by the example), the kwarg is not accepted (because things are directly passed to the Colorbar class); one needs to explicitly set and (the latter is not even documented by ): Add a kwarg to the Colorbar constructor which sets both and , and is mutually exclusive with them. ... or at least better document the workaround.


[Bug]: URL-area not rotated in PDFs The URL-sensitive area is not rotated in the PDF output Note that the link area is still the horizontal part as if the text was not rotated (this makes sense from reading the code). Clicking on the text, not where the non-rotated text would have been would activate the URL. In this is described in 12.5.6.5 From PDF version 1.6 it is possible to specify a "QuadPoints", i.e. a "rectangle" with four corners rather than just x, y, height, width as the current Rect has. However it says: it, the region specified by the Rect entry should be used. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect. So one would also need to provide a larger Rect, which, for viewers not supporting QuadPoints will lead to that the total rectangle outlined by the rotated text will be clickable. This also holds for mathtexts. No response main No response No response No response_ git checkout


[Bug]: getbackend() clears figures from if they were created under rccontext calling removes all figures from if the first figure in was created in an . The figure should not be missing from . Consequences of this are, e.g, doesn't work because can't find it. No response_ Xubuntu 2 QtAgg Python 3.10.4 n/a conda


[Bug]: setvisible() not working for 3d projection in the subplot projection="3d" the setvisible function doesn't work even if the value is set to False the subplot remains visible which should not happen if the value is set to False the subplot is not visible if the value is set to False No response No response 2 Qt5Agg 10 No response No response


Certain non-hashable parameters to text() give cryptic error messages <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--Bug summary Per the title. See as well. Code for reproduction <!--A minimum code snippet required to reproduce the bug. Please make sure to minimize the number of dependencies required, and provide any necessary plotted data. Avoid using threads, as Matplotlib is (explicitly) not thread-safe.--all fail with Actual outcome see above Expected outcome Error out in the setter instead. Matplotlib version <!--Please specify your platform and versions of the relevant libraries you are using:--Operating system: linux Matplotlib version: (): master Matplotlib backend (): any Python version: 38 Jupyter version (if applicable): Other libraries: <!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--<!--If you installed from conda, please specify which channel you used if not the default--


MultiCursor should be able to bind to axes in more than one figure... Multicursor only works if all the axes are in the same figure... Originally posted by in and possible solution: Originally posted by in


[Bug]: offset dash linestyle has no effect in patch objects When setting the linestyle on a patch object using a dash tuple the offset has no effect. <img width="874" alt="Screen Shot 2022-05-04 at 4 45 33 PM" src="https://user-"the patch edge lines overlap, not adhering to the offset. Haven't been able to get any patch objects to have a proper offset on the edge line style but the expected outcome is shown here with Line2D objects <img width="580" alt="Screen Shot 2022-05-04 at 4 59 25 PM" src="https://user-"I have tried the Ellipse patch object as well and found the same issue. I also reproduced in Ubuntu 18.04 VM running matplotlib 3.5.0 with agg backend. OS/X 4 MacOSX Python 3.8.8 No response conda


[Bug]: DPI of a figure is doubled after unpickling on M1 Mac When a figure is unpickled, it's dpi is doubled. This behaviour happens every time and if done in a loop it can cause an . This seems to happen only on M1 MacBooks and the version of python doesn't matter. OS/X 2 MacOSX 12 No response pip


[Bug]: scatter plot color settings discarded unless c given When making an animation of a scatter plot, if you don't set (the color value parameter) when initializing the artist, the color settings are ignored. Even though is passed to , the points use the default "viridis" color map. I would expect the points to use the "gray" color map. If you modify the above code to use: it works as expected. It seems like all color-related settings, including cmap, vmin, vmax, etc. are discarded unless is given during the first call to . This workaround (passing an empty ) isn't problematic, but I found the default behavior quite unintuitive and it took me the better part of a day to figure out what was happening, so I figured it would be worth reporting. Possible solutions: Raise an error/warning if // are given but is not Store parameters like // even if they aren't immediately used These changes should probably happen in in . According to , wrote most of this logic. macOS 12.4 2 MacOSX 13 N/A from source ()


'Poly3DCollection' object has no attribute '_facecolors2d' The following minimal example demonstrates the issue: It fails on the last line with the following traceback: Tested with mpl versions 1.3.1 and 1.4.2. Sent here by Benjamin, from the mpl users mailing list (mail with the same title). Sorry for dumping this without more assistance, I'm not yet at a python level where I can help in debugging, I think (well, it seems daunting).


[Bug]: 'Line3D' object has no attribute 'verts3d' I use matplotlib 3D to visualize some lines in 3D. When I first run the following code, the code can run right. But, if I give a numpy array, it will report the error 'input operand has more dimensions than allowed by the axis remapping'. The point is when next I give and other variables an int number, the AttributeError: 'Line3D' object has no attribute 'verts3d' will appear and can not be fixed whatever I change the variables or delete them. The error can be only fixed when I restart the kernel of ipython console. I don't know why it happens, so I come here for help. Traceback (most recent call last): File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 3444, in runcode exec(codeobj, self.userglobalns, ) File "<ipython-input-80-", line 20, in () File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 368, in show return (args, kwargs) File "", line 29, in call (kwargs) File "", line 112, in show () File "", line 68, in show (self) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 436, in draw (self.renderer) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 73, in drawwrapper result = draw(artist, renderer, args, **kwargs) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 50, in drawwrapper return draw(artist, renderer) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 2803, in draw mimage.drawlistcompositingimages( File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 132, in drawlistcompositingimages a.draw(renderer) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 50, in drawwrapper return draw(artist, renderer) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 469, in draw super().draw(renderer) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 50, in drawwrapper return draw(artist, renderer) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 3082, in draw mimage.drawlistcompositingimages( File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 132, in drawlistcompositingimages a.draw(renderer) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 50, in drawwrapper return draw(artist, renderer) File "/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-", line 215, in draw xs3d, ys3d, zs3d = self.verts3d AttributeError: 'Line3D' object has no attribute 'verts3d' Some 3D lines No response Local: windows + pycharm, Remote: Ubuntu 20.04 0 module://backendinteragg 12 No response_ pip


[Bug]: colorbar with unattached mappables can't steal space This is something I noticed downstream in networkx: Formerly, space for a was stolen from the current ; that was deprecated and now in 3.6, it is stolen from the mappable's . But if the mappable is not to an , it fails with a somewhat unrelated-looking error. Either we should switch to the current Axes if the mappable doesn't have one (probably not desired given the previous change), or raise a clearer error message when this happens. No response No response 0rc1 No response No response No response pip


[Bug]: Bug with toolbar instantiation in notebook In MNE-Python we have an abstraction layer for widgets+toolbars. Until today's latest install it was working fine. Now it fails with: See I'll work on boiling it down to a MWE tomorrow hopefully. Could also be a bug with traitlets. But the code that runs on the CIs is essentially this in a notebook I think: <details<summaryFull traceback</summary</detailsNo error EDIT: ipympl 0.9.2 Ubuntu (GH actions), or macOS M1 (locally) 0rc1 Notebook 10 EDIT: 6.4.11 pip


legend draggable as keyword <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--There is not keyword to make legend draggable at creation <!--A short 1-2 sentences that succinctly describes the bug--Is there a code reason why one can not add a "draggable=True" keyword to the init function for Legend? This would be more handy than having to call it after legend creation. And, naively, it would seem simple to do. But maybe there is a reason why it would not work?


[Bug]: Text label with empty line causes a "TypeError: cannot unpack non-iterable NoneType object" in PostScript backend When saving a figure with the PostScript backend, a happens if the figure contains a multi-line text label with an empty line (see example). $ ./venv/Scripts/python Traceback (most recent call last): File "C:\temp\matplotlibsaveps\", line 7, in <modulefigure.savefig('') File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 3272, in savefig (fname, kwargs) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 2338, in printfigure result = printmethod( File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 2204, in <lambdaprintmethod = (meth)(lambda args, kwargs: meth( File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\api\", line 410, in wrapper return func(innerargs, innerkwargs) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\backends\", line 869, in printps printer(fmt, outfile, dpi=dpi, dsccomments=dsccomments, File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\backends\", line 927, in printfigure (renderer) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 74, in drawwrapper result = draw(artist, renderer, args, kwargs) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 51, in drawwrapper return draw(artist, renderer) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 3069, in draw mimage.drawlistcompositingimages( File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 131, in drawlistcompositingimages a.draw(renderer) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 51, in drawwrapper return draw(artist, renderer) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\axes\", line 3106, in draw mimage.drawlistcompositingimages( File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 131, in drawlistcompositingimages a.draw(renderer) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 51, in drawwrapper return draw(artist, renderer) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 1995, in draw (self, renderer) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 51, in drawwrapper return draw(artist, renderer) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\", line 736, in draw textrenderer.drawtext(gc, x, y, cleanline, File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\backends\", line 248, in wrapper return meth(self, args, **kwargs) File "C:\temp\matplotlibsaveps\venv\lib\site-packages\matplotlib\backends\", line 673, in drawtext for psname, xsnames in stream: TypeError: cannot unpack non-iterable NoneType object The figure can be saved as without error. seems to happen if a text label or title contains a linebreak with an empty line works without error for other backends such as PNG, PDF, SVG, Qt works with matplotlib<=3.5.3 adding before line 669 of seems to fix the bug Windows 0 No response 13 No response pip


[Bug]: Constrained layout UserWarning even when False When using layout settings such as or , a UserWarning is produced due to incompatibility with constrainedlayout, even if constrainedlayout = False. This was not the case in previous versions. The plot works fine but the warning is generated UserWarning: This figure was using a layout engine that is incompatible with subplotsadjust and/or tightlayout; not calling subplotsadjust. plt.subplotsadjust(wspace=0) no warning Warning disappears when constrainedlayout=False is removed OS/X 0 No response No response No response conda


stackplot should not change Axes cycler Usecase: I am producing various types of plots (some use rectangle collections, some regular plot-lines, some stacked plots) and wish to keep the colors synchronized across plot types for consistency and ease of comparison. While and support supplying a alias, stackplot throws a ValueError. For example: Originally posted by in


[Bug]: ValueError: Unable to determine Axes to steal space for Colorbar. started raising an error when trying to add a colorbar to : ValueError: Unable to determine Axes to steal space for Colorbar. Either provide the cax argument to use as the Axes for the Colorbar, provide the ax argument to steal space from it, or add mappable to an Axes. In : ! In : ! macOS 12.6 0 10 pip


[ENH]: Default to call ? While addressing the deprecation in 3.6: I noticed that isn't directly migrate-able It appears from the source that defaults to so it would be nice if could default to that as well. Otherwise, it would be nice if this was better documented.


[Bug]: raises for all-nan data on matplotlib 3.6.1 raises an exception in 3.6.1 when passed only nan data. This irrevocably breaks seaborn's histogram function (which draws and then removes a "phantom" bar to trip the color cycle). On 3.6.0 this returns a with one Rectangle, having for and . I assume it's related to this bullet in the release notes: Fix barplot being empty when first element is NaN But I don't know the context for it to investigate further (could these link to PRs?) Further debugging: So it's about the x position specifically. Macos 1 No response No response No response pip


[Bug]: density not auto-scaled when using histtype='step' I need to plot a histogram of some data (generated by in binary format) from my work using the function. I noted that the histogram's density axis (when setting ) is not automatically adjusted to fit the whole histogram. I played with different combinations of parameters, and noted that the densities changes if you rescale the whole data array, which is counterintuitive as rescaling the data should only affect the x-axis values. I noted that if you set , the issue will occur, but is otherwise okay for other s. I started a github repo for testing this issue . The file is the data generated from my program. Here's the histograms generated using some simulated data. You can play with the and parameters in the code to see the differences. When , I got ! When , sometimes the randomised array would lead to identical left and right panel ... ! No response OS/X 0 No response 10.4 No response pip


[Bug]: Error using widthratios with nested mosaic in subplotmosaic() plt.subplotmosaic() fails with a confusing error message when passing widthratios (or heightratios) with a nested list mosaic, unless all outer and inner mosaics have the same number of columns (or rows). ! From what I can tell, this happens because the layout is built recursively, passing the same gridspeckw to subgridspec() at each level of nesting. I realize that the use of widthratios / heightratios / gridspeckw with nested list mosaics could get complicated, but it would be nice to be able to at least specify them for the outer list, or in some other way implement this feature for nested list layouts. If not, maybe include a helpful error message that explains this limitation so the user doesn't think they have specified the wrong number of ratios. Windows 10 0 QtAgg 10 No response_ conda


[Doc]: document and ? These two methods have a decent doc-string, but are not in the documentation. They were 2006-08-10 Maybe add them to the documentation? It would make sense to add them towards the end of the page and include those and all functions after the last Locator in a new subsection "Miscellaneous date functions" or something. Edit: looking at the source, it is not really clear why they are not there...


[Bug]: pick events do not forward mouseevent-key on Linux Somehow on keyboard-buttons are not forwarded with ... on everything works as expected. When clicking on one of the datapoints while pressing the buttons and the following happens: on Windows I get: on CentOS Linux I get: The same output for both OS Windows / Linux CentOS7 1 Qt5Agg 13 conda


Document how to distribute style files in python packages <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--Style files (actually, style dicts) can be distributed as python packages, as discussed e.g. in This has the advantage of being relatively easy to do and that it works "as is" for essentially all versions of matplotlib (if your matplotlib is too old to have (pre 1.5...) you can still use ). In today's call we agreed that this approach should be documented and that a template package (similar to ) could be created. It was also pointed out during the call that this approach makes it easy to distribute colormaps together with the style, or add any additional custom logic; this may be worth documenting too.


[Bug]: Setting ['seaborn-colorblind'] result in key error on matplotlib v3.6.1 I have code that executes: Using version 3.4.3 of matplotlib, this works fine. I recently installed my code on a machine with matplotlib version 3.6.1 and upon importing my code, this generated a key error for line saying "seaborn-colorblind" was a bad key. Traceback (most recent call last): KeyError: 'seaborn-colorblind' seaborn-colorblind should be set as the matplotlib library style and I should be able to continue plotting with that style. Bug occurs with matplotlib version 3.6.1 Bug does not occur with matplotlib version 3.4.3 Tested on MacOSX and Ubuntu (same behavior on both) OS/X 1 MacOSX 7 No response_ pip


[ENH]: Axes.setxticks/Axis.setticks only validates kwargs if ticklabels are set, but they should Per the doc of : This means that in e.g. , the incorrect silently do nothing; they are not even validated (because has not been passed). We should at least check that are valid Text properties in all cases; we could even consider making any kwargs an error if is not set.


[Bug]: sharex and sharey don't accept 0 and 1 as bool values When using or in place of or in or arguments of an error is raised. We get the following error : Note that using instead of produces the same error (albeit with the following warning : but this is expected and not part of the present issue) I expected values 1 and 0 to be understood as bool. Suggested fix : Maybe not accepting 1 or 0 was done on purpose, but I did not find it very clear from the error message as and are accepted but not listed. I am happy to chat about an other fix, if this one doesn't do the trick. I can also create a PR in case you think this fix is good enough ! Linux 5.10.0-19-amd64 SMP Debian 5.10.149-2 600+g0b6d3703ff TkAgg 10.0 Not applicable git checkout


[ENH]: Use instead of in the error message I mistakenly supplied as the argument for [matplitlib claimed for illegal color name like this: I was not aware that the argument actually contained a trailing newline so I was very confused. The error message would be nicer if it outputs user's input via . For example, in this case the error message can be easily replced with: so that we may now get an easy-to-troubleshoot error like this: This kind of improvement can be applied to many other places.


eventplot: allow a list of alpha channels as in the case with colors I'm not sure if it's a bug or a feature. It's both. works while throws an error matplotlib v3.3.3 Python 3.7.6


[Bug]: in is reversed For the parameter in , the options and seems reversed ! ! No response No response 2 No response No response No response No response


[Bug]: integer colours for pcolorfast / quadmesh I get an error when passing a byte/integer array to pcolorfast to code the colors as RGBA. It also fails when data type is a plot in in some bluish colour fixes: 1) in , line 321: should be replaced by to allow for unsigned int values as well 2) in line 343: should be replaced by a test including - for 'i' and 'u'. It may be sufficient to comment it out as a quick fix as it is definitively more broken having it in. even with this it does not quite work 5.15.13-200.fc35.x86_64 1 gtk3 10.1 0 pip


cla(), clf() should unset the and attributes of deparented artists mpl2.0b3: Removing an artist from its axes unsets its attribute, but clearing the axes does not do so.


AnnotationBbox gid not passed to renderer Hi, I'm creating matplotlib figures that contain images using AnnotationBbox (following the examples here ) and my aim is to set the artist gid associated with each image so I can access them later when saved to an svg. I can use setgid but when I save to an svg, the gid label for the images are not included. A similar issue has been discussed here , where a solution was applied for all known instances of missing gid's. Could it be that the AnnotationBbox artist has been missed by this fix? Example code: which prints: but produces an svg file that contains the image with no gid label (attached here as a txt file since svg is not supported): stock image used: ! Versions <!--Please specify your platform and versions of the relevant libraries you are using:--matplotlib version 3.3.4 python version 3.7.7 <!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--<!--If you installed from conda, please specify which channel you used if not the default--Thanks, Lauren


[ENH]: set facecolor and edgecolor alpha separately I like making diagrams where my patch edge is solid but the fill is semi-transparent - in my case usually to fade out the color, but it's also useful to emphasize boundaries ! Since alpha applies to the whole patch, the way I do this now is by converting my HTML colors into RGBs and appending an A ETA: apparently I could also just do Allow alpha to take a tuple for patch methods. As an example of prior art, we allow vectorized/separable alphas in imshow as of


[Bug]: contour raises IndexError if Z is specified as keyword argument raises when is specified as . <img width="1675" alt="Screen Shot 2022-12-15 at 8 23 39 PM" src="https://user-"<img width="713" alt="Screen Shot 2022-12-15 at 8 24 46 PM" src="https://user-"No response OS/X 2 module://matplotlibinline.backendinline Python 3.8.15 2 pip


[Bug]: pcolormesh(rasterized=True) conflicts with setrasterizationzorder() According to the , a color plot can be rasterized in two ways: The two ways cannot be used together.  The bug appears in version 3.5.1 and commit , but not version 3.1.2. The most immediate cause seems to be reentrance tracking being dropped from and in commit : However, these are probably not the right places to fix this bug. Ubuntu 20.04, 22.04 2, 3.5.1, 3.7.0.dev447+g2d18bba0ea agg 10, 3.10.6 No response_ git checkout


[Bug]: gapcolor not supported for LineCollections doesn't have a or , so gapcolor doesn't work in plotting methods that return LineCollections (like vlines or hlines). ! I think the easiest fix is probably add and to LineCollection, modeled on and 1121+g509315008c


[ENH]: Auto-detect bool arrays passed to contour()? I find myself fairly regularly calling to draw the boundary line between True and False regions on a boolean 2d array. Without , one gets the default 8 levels which go at 0, 0.15, 0.3, 0.45, 0.6, 0.75, 0.9, 1.05 resulting in all the contour lines being drawn on top of one another; but clearly(?), for boolean inputs, the only choice that makes sense is to have a single level at 0.5 (or rather, anywhere between 0 and 1). ! Autodetect boolean inputs to contour, and default levels to [0.5] in that case. I guess the closest similar kind of autodetection in the library is for imshow, which auto-switches between 0-1 float RGBA arrays and 0-255 uint8 RGBA arrays (when given a 3D array as input). Thoughts?


[ENH]: Allow override of contour level autoscaling In Matplotlib 3, when using a list of values for the argument in , the list of values is overridden in the case that all requested levels fall outside the data range. While this may be desirable for casually browsing data when the user is unfamiliar with the data range, it causes serious problems for batch applications where the user legitimately intends to use their list of levels but does not know whether every input array will produce contours. Example: The above prints when is an array of values ranging from 0 to 50 (i.e., the requested contour level of 100 is outside the data range). As a result, the plot contains erroneous contours around near-zero values, presumably due to floating point precision. This is a consequence of the change described here (): Add a kwarg to that overrides the autoscaling behavior. When the kwarg is set, it would trigger a flag in ():


[Bug]: Cannot toggle settightlayout As of calling does not disable the tight layout algorithm. AssertionError clean exit I'm pretty sure just needs to set in the falsey case. Attn: No response main No response No response No response No response


[Bug]: NumPy 1.24 deprecation warnings Starting NumPy 1.24 I observe several deprecation warnings. No warnings. No response ArchLinux 2 QtAgg Python 3.10.9 No response Linux package manager


[Bug]: compressed layout setting can be forgotten on second save I'm not sure whether this is really a bug or I'm just using an inconsistent combination of options. Under some specific circumstances (see below) compressed layout is not applied the second time a figure is saved. ! ! Both images should look like the first. If I do not set the , all is well. If I do not set in my calls to , the images are identical (but I have too much white space top and bottom). Maybe there is a better option than when using compressed layout? For context, my real example is a script that makes several figures. For most of them I want constrained layout, so I set that once in the for convenience. Only one figure needs "compressed", and I am saving twice because I want both a png and a pdf. Fixed it in my current example by just reverting the setting for the one figure. RHEL7 2 and main QtAgg 9 and 3.11 No response conda


[Doc]: bbox parameter The documentation states that should be an instance of . When I try to use it like this I obtain the following error traceback below using matplotlib v3.6.2, whereas it works if I define it as e.g. which I guess (but just because I tried empirically) is equivalent to the method of Bbox. Either let the parameter be a proper BBox (my suggestion) or specify that the usage is that of


[Bug]: Setting norm with existing colorbar fails with 3.6.3 Setting the norm to a after the colorbar has been created (e.g. in interactive code) fails with an value in matplotlib 3.6.3. The same code worked in previous matplotlib versions. Not that vmin and vmax are explicitly set to values valid for and no negative values (or values == 0) exist in the input data. Works, colorbar and mappable are updated with new norm. No response Linux 3 (works with 3.6.2) Multpiple backends tested, same error in all (Qt5Agg, TkAgg, agg, ...) 15 not in jupyter conda


[Bug]: Widget blitting broken when saving as PDF When running a test doc build for 3.7.0rc1, I build the PDF, which runs everything with the PDF backend. So either the PDF backend does not correctly mark itself as not supporting blitting, or the blitting is not turned off correctly in the button widgets. Docs build without warning. No response Fedora 37 v3.7.x PDF 11.1 No response git checkout


[Bug]: Windows correction is not correct in Windows correction is not correct in : The is not needed, and give wrong result for window with negative value, such as . For reference, the implementation of scipy can be found here : 4372. 0 No response No response latest No response No response No response None


[Bug]: (x,y) disappears after changing yscale The output of (x,y) disappears while changing yscale from 'log' (initial scale for the y axis) to 'linear'. The expected outcome is generated with matplotlib==3.5.3 fillbetween and hist are working fine. MacOSX 3 MacOSX 13 No response_ pip


[MNT]: FFMpegWriter does not check if out path exists when initialized. FFMpegWriter does not ensure the outputpath exists when initialized (). This leads to a broken pipe error with no mention of a non-existent path which can be misleading to the user. When setup is called, check the output path exists and if not, throw an error to inform the user.


[Bug]: Validation not performed for argument to When passing non-str values to , validation is not performed. So even for invalid inputs, errors are raised only when we call Errors should be raised when invalid arguments are passed to . Similar to what we get when we pass an invalid string value as shown: Do you know why this bug is happening? No validation is done when setting values for . We do check strings on line 473, which is why we don't face this issue there. Windows 2 'TkAgg' 7 No response pip


[Bug]: offsetText is colored based on instead of tick.labelcolor In version 3.6.3, when setting ytick.labelcolor / xtick.labelcolor in styles / rcParams, it does not change the color of the exponent label as well. It will be colored based on / ! ! The following patch seems to fix it for my simple usecases: No response 3 No response No response No response None


[Bug]: Unable to pickle figure with draggable legend I am unable to pickle figure with draggable legend. Same error comes for draggable annotations. Pickling successful No response Windows 10 0 No response 10 No response pip


[Bug]: Unable to pickle figure with aligned labels Unable to pickle figure after calling Pickling successful No response Windows 0 No response No response No response_ None


plt.contour with all NaNs fails assertion in Bug summary Passing an array with all NaN values into causes the following assertion to fail in : This is actually triggered by a test-case in the xarray test suite, but I imagine it hasn't been noticed (yet) because release builds of matplotlib typically disable assertion checks. Code for reproduction Actual outcome Failed assertion (see referenced line above, tracked down with ) Expected outcome I would expect to see the empty plot (and long lists of warnings) that are currently shown if assertions are disabled: ! Matplotlib version Operating system: Linux Matplotlib version: 3.0.3 Matplotlib backend (): agg Python version: 3.6 Python, matplotlib, etc are installed from source


[Bug]: setval of rangeslider sets incorrect value The setval() method of a range slider doesn't set the value correctly with values close to the minimal and maximal values of the range slider. With values in the middle, everything works fine. ! The values for the rangesliders "wrong" and "wrong2" are not set correctly Expected values are: (1, 2) and (9, 10) Actual values are (1, 3.25) and (7.75, 10) The result of using setval should be the same, as when using the valinit parameter of the constructor. The problem also occurred on Manjaro with: Python version: 3.10.9 Matplotlib version: 3.6.2 Matplotlib backend: QtAgg Installation of matplotlib via Linux package manager Windows 10 2 TkAgg 11.0 No response_ pip


[Bug]: constrained layout with wrapped titles When titles are long and wrapped, constrained layout doesn't leave enough room for them. ! Enough space for the titles. There's no problem if the titles have an explicit new line ("\n"), so this seems to be specific to the wrapping. RHEL7 0 and main QtAgg 11.0 N/A conda


[Bug]: AttributeError: 'LassoSelector' object has no attribute 'props' I used the LassoSelector object to select the single point in the scatterplot. But when I try to update the line color of LassoSelector with the setprops function, I get an error like this AttributeError: 'LassoSelector' object has no attribute 'props'. This warning does not occur when the comment symbol is placed at the beginning of the line "(props)" in the "set_ props" function of the matplotlib library's code.


[Bug]: LogLocator with subs argument fragile. Logarithmic tick markers do not appear if the y-axis scales a sufficient range, with the keyword argument of set to non-trivial values. ! ! I expect to see ticks in both cases, as appears in the "Good Plot". The problem is isolated to . This returns correct values in the first case (e.g., ([1.e-01 2.e-01 5.e-01 1.e+00 2.e+00 5.e+00 1.e+01 2.e+01 5.e+01 1.e+02 2.e+02 5.e+02])([]) in the second case. Windows 2 module://backendinteragg 13 No response conda [Bug]: LogLocator with subs argument fragile. Logarithmic tick markers do not appear if the y-axis scales a sufficient range, with the keyword argument of set to non-trivial values. ! ! I expect to see ticks in both cases, as appears in the "Good Plot". The problem is isolated to . This returns correct values in the first case (e.g., ([1.e-01 2.e-01 5.e-01 1.e+00 2.e+00 5.e+00 1.e+01 2.e+01 5.e+01 1.e+02 2.e+02 5.e+02])([]) in the second case. Windows 2 module://backendinteragg 13 No response conda


[ENH]: Add as alias for in AxesImage, or make that include depth too changed to . While this indeed corresponds to , this is not consistent with the numpy API, where and . Perhaps we can consider 1) tweaking to instead, and add as an alias for ? Alternatively, could return (i.e., including whether the data is colormapped, RGB, or RGBA), and we could use that* info in ? (displaying whether the data is colormapped/RGB/RGBA seems reasonably useful) No response_


[Bug]: savefig + jpg + metadata fails with inscrutable error message If we call with a with a extension, with the kwarg specified, the error message is inscrutable. Either metadata should be , the argument ignored, or a more informative error message. No response OS/X 1 MacOSX Python 3.11.2 No response pip


[Bug]: using clf and in range slider onchanged callback blocks input to widgets When using clear figure, adding new widgets and then redrawing the current figure in the onchanged callback of a range slider the inputs to all the widgets in the figure are blocked. When doing the same in the button callback onclicked, everything works fine. The widgets can't receive any input from a mouse click, when redrawing in the onchanged callback of a range Slider. When using a button, there is no problem. The range slider callback onchanged behaves the same as the button callback onclicked. The problem also occurred on Manjaro with: Python version: 3.10.9 Matplotlib version: 3.6.2 Matplotlib backend: QtAgg Installation of matplotlib via Linux package manager Windows 10 2 TkAgg 11.0 No response pip


[Bug]: Attribute Error combining matplotlib 3.7.1 and mplcursor on data selection If you combine mplcursor and matplotlib 3.7.1, you'll get an after clicking a few data points. Henceforth, selecting a new data point will trigger the same traceback. Otherwise, it works fine. No terminal output Using matplotlib 3.7.0 or lower works fine. Using a conda install or pip install doesn't affect the output. Windows 11 and Windwos 10 1 QtAgg 16 No response conda


Confusing (broken?) colormap name handling Consider the following example in which one creates and registers a new colormap and attempt to use it with the interface. Everything OK so far. Note the difference in the names and . Now when we try to use the new colormap things start to go wrong. As seen from the error message, it's that is looked up instead of the registered colormap name, . Manually looking up works just fine: For this to work as I had expected, one has to make sure that the colormap name and the registered name are the same due to some sort of "double internal name lookup tables" in matplotlib. I found this problem to be very confusing at first since I imported a colormap from another module, registered it, and tried to use it with no luck, e.g. something like: at which point, I expected to be able to refer to my newly registered colormap by the name .


Update colorbar after changing How can I update a colorbar, after I changed the norm instance of the colorbar? has now effect and throws a -Exception. Consider this example: Output for :


[Bug]: Setting bboxinches to a Bbox in fig.savefig resizes colorbar Setting bboxinches in fig.savefig to a specified Bbox rather than "tight" resizes the colorbar relative to when bboxinches is not set—the resulting colorbar is a lot larger than it should be. ! ! Calling fig.savefig without bboxinches set first and then calling it again with bbox_inches set produces expected outcome. Calling () prior to savefig also works. MacOS 12.2.1 (Monterey) 1 inline (for interactive), png for plot, also a problem with pdf 10 Jupyter lab 3.2.9 conda


UserWarning thrown when all values are "bad", but not when only some are <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--Bug summary If all values passed as colors are "bad" (), a warning is thrown from numpy about converting masked values to null. If some of the values are "bad", this does not happen. Code for reproduction This does not warn: This does: This is difficult to hide since since the warning is not thrown when the figure is being constructed, but when it is shown. Here's a full traceback to show this: <details<summaryFull traceback </summary</detailsExpected outcome I wouldn't expect the second to warn if the first doesn't. Matplotlib version <!--Please specify your platform and versions of the relevant libraries you are using:--Operating system: macOS Matplotlib version: 3.3.1 Matplotlib backend (): MacOSX and Python version: 3.8.5 Jupyter version (if applicable): Replicates in python repl, but also was happening in ipython and jupyter lab Other libraries: Installed with pip [Bug]: ax.errorbar raises for all-nan data on matplotlib 3.6.2 The function raises a error when contains only values. No crash, similar to the case where only some values are NaN. This happens because unconditionally looks for a first finite element in and . Debian 2 TkAgg 2 No response pip


handling of zeros in log-scale changes irreversibly after user zoom matplotlib 2.0b1 (but also present before that) Call e.g. and type "k" and "l" to switch both axes to log scale. The points at the two ends, where one of the coordinate is zero, are cropped out. This has been the behavior for a long time and seems reasonable. Now come back to linear scale ("k", "l") and zoom in with the zoom tool to one of the ends of the segment, e.g. xlims=(-0.1, 0.4), ylims=(8.6, 9.1) or something similar. Switching again to log scale now leads to a badly scaled plot, because the axis now goes all the way to (float epsilon). Even this is not unreasonable: the user effectively set his own axes limits, rather than the autocomputed ones, and these limits are invalid in log scale. The problem comes when you go back to the original limits (either "back" or "h" ("home")): even then, log-scale is broken (both axes to to instead of cropping the extremities); in fact, it seems impossible to restore the original behavior of autocomputed axes limits.


[Bug]: legend for Poly3dCollection fails When plotting an iso surface using Poly3dCollection, Supposed to insert a legend. ! on assumes is a , having the attribute . Consequently, a tuple will be generated if the 's size is not zero. In this case with , is already a and checking for will result in an error. A quick fix would be to have to make sure that colors has . MacOS 2 MacOSX 11.2 No response pip


tight layout kwargs have no effect if rc autolayout setting is set (MPL 1.5.3) Bug summary kwargs passed to tight layout do not have an effect if rc the figure.autolayout setting is set Code for reproduction No padding is inserted in the following example if figure.autolayout is set to True in the rc Matplotlib version Tested with a conda installed Matplotlib 1.5.3 on Ubuntu Linux.


[Bug]: does not work for writer.grabframe() will make snowflake movie in the example. The example runs fine after removing . https://user- https://user- No response No response 1 No response No response No response None


PGF output: Contour labels extend beyond figure boundary Bug summary When using contour plots with the PGF backend, contour labels close to the axes can protrude beyond the axis boundary. This was originally posted as a . Code for reproduction (See the [ example][1].) Actual outcome ! Expected outcome The contour label at the top should be clipped, just as in the first image shown in the [ example][1]. Matplotlib version Operating system: Ubuntu 17.10 Matplotlib version: 2.2.2 Matplotlib backend: PGF ( shows , though) Python version: 3.6.3 was installed through . [1]:


[MNT]: numdecs parameter in takes a parameter numdecs, which is not described in its docstring. I also can't find anywhere the parameter is used in the code. numdec (no s) is used within , but is calculated when needed If numdecs really isn't used, maybe remove it. Otherwise describe it in the docstring.


[Bug]: bar/barh don't trigger datetime units doesn't check the units of bottom/left parameters to see if the axis needs a different converter. Same applies for : ! This works fine: ! main


[Bug]: fillbetween{x} does not respect Axes transform Using an axes transform with and incorrectly sets the axes limits if the Axes coordinates are larger than the data coordinates. Note that code is slightly modified from the , but with the y-data values and threshold reduced by a factor of 10. What you get a plot where the y-limits have been expanded as if I've plotted y-data spanning between (0,1), but get a fill that covers the entire axis space. <img src="https://user-" width=50%Should look like the , but with y axis labels reduced by a factor of 10. My guess is that the y-axis limits are being set by the / values in data coordinates before the transform is applied to actually fill the regions. You will get the expected result as long as the provided Axes coordinate values are less than the extreme values of the y-data itself. For example gives a correct result. <img src="https://user-" width=50%But this issue means that you can't span the axes using this technique if your plotted data does not already span y=(0,1). Windows 10 1 module://matplotlibinline.backendinline 16 3 conda


Add fontfamily/labelfont to tickparams <!-- Welcome! Thanks for thinking of a way to improve Matplotlib. Before creating a new feature request please search the issues for relevant feature requests. --There is no simple way of assigning a fontfamily to tick labels without needing to either override the default fontfamily or setx/yticklabels. We currently have access to color and size, kwarg to change the font would fit here nicely. <!-- For example: I'm always frustrated when [...] because [...] I would like it if [...] happened when I [...] because [...] Here is a sample image of what I am asking for [...] --Add a fontfamily/labelfont kwarg to tick_params <!-- Provide a clear and concise description of a way to accomplish what you want. For example: Add an option so that when [...] [...] will happen --<!-- Add any other context or screenshots about the feature request here. You can also include links to examples of other programs that have something similar to your request. For example: Another project [...] solved this by [...] --


[Bug]: VSCode matplotlib interactive mode cannot import Qt bindings Running in VS Code interactive mode, throws an exception . However, PySide6 is installed. <details<summaryError trace</summary</detailsRun in a VS Code interactive cell ipykernel: 6.22.0 ipython: 8.12.0 ipywidgets: 8.0.6 Windows 10 and Windows 11 (2 separate computers) 1 Qt5Agg 10.10 No response pip


Plot ellipse with arrow showing rotation I'm trying to plot an together with an arrow showing a rotation clockwise or counterclockwise as it is shown in that image. ! That can ben implement by another optional argument? No response Plot ellipse with arrow showing rotation I'm trying to plot an together with an arrow showing a rotation clockwise or counterclockwise as it is shown in that image. ! That can ben implement by another optional argument? No response


automatic papersize selection by ps backend is almost certainly broken No minimal example, but the relevant chunk () is Note that the sorting is by name, which means that the size is the first one among "a9, a8, ..., a2, a10, a1, b9, b8, ..., b2, b10, b1" (in that order) that is larger than the requested size -- which makes no sense.


Raise when both singular and plural scatter attributes are specified accepts both singular and plural forms of the and attributes. The plural forms are documented in the function signature, but the singular forms actually take precedence if both are specified. This adds some complexity for downstream libraries and confusion for their users (cf. ). Small change: Matplotlib could raise when both the singular and plural forms are specified. Larger change: I will confess that I don't know why the plural forms of the kwargs exist. If there's not a strong reason for the duplication, perhaps they could be deprecated, or at least "formally discouraged"? Scatter does a lot of argument checking on the / parameters (too much at times, ), so there's some local precedence for a lot of handholding. On the other hand, matplotlib generally doesn't raise when both long- and short-forms of kwargs are given edgecolorec`).


[MNT]: Do not accept arbitrary positional parameters in Figure.addaxes() ! seen at What are the parameters? This is not readable I'm surprised this works I suspect extra positional parameters are ignored. Documentation: Check whether the parameters do something. If so, document more clearly. if not deprecate extra positional parameters.


[Bug]: wspace and hspace in subfigures not working and in do nothing. Same figure independently of the values of hspace and wspace. No response OS/X 1 MacOSX Python 3.10.9 No response conda


xlimchanged not emitted on shared axis <!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--<!--You can feel free to delete the sections that do not apply.--Bug summary When an axis is shared with another its registered "xlimchanged" callbacks does not get called when the change is induced by a shared axis (via sharex=). In the setxlim for sibling axis are called with emit=False: I'm very new to matplotlib, so perhaps there is a good reason for this? emit=False seems to disable both continued "inheritance" of axis (why?) and triggering of change callbacks (looking at the code above). It seems like one would at least want to trigger the xlim_changed callbacks as they would be intended to react to any change in axis limits. Edit: Setting emit=True seems to introduce a recursion issue (not sure why but as inheritance seems to be passed along anyway it doesn't really matter). Moving the callback call to outside of the "if emit:"-statement seems to solve the issue as far as I can see when trying it out. Any reason to keep it inside the if-statement?