Question: 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.

else:                 img = ImageFile('%s_%02d' % (output_base, j), output_dir)             for fmt, dpi in formats:                if out_of_date(code_path, img.filename(fmt)):                if context or out_of_date(code_path, img.filename(fmt),                                          includes=code_includes):                     all_exists = False                     break                 img.formats.append(fmt)


Question: 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.

build_dir_link = build_dir     source_link = dest_dir_link + '/' + output_base + source_ext <ins>    # get list of included rst files so that the output is updated when any    # plots in the included files change. These attributes are modified by the    # include directive (see the docutils.parsers.rst.directives.misc module).    try:        source_file_includes = [os.path.join(os.getcwd(), t[0])                                for t in state.document.include_log]    except AttributeError:        # the document.include_log attribute only exists in docutils >=0.17,        # before that we need to inspect the state machine        possible_sources = {os.path.join(setup.confdir, t[0])                            for t in state_machine.input_lines.items}        source_file_includes = [f for f in possible_sources                                if os.path.isfile(f)]    # remove the source file itself from the includes    try:        source_file_includes.remove(source_file_name)    except ValueError:        pass</ins>     # make figures     try:         results = render_figures(code,


Question: 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.

function_name,                                  config,                                  context_reset=context_opt == 'reset',                                 close_figs=context_opt == 'close-figs')                                 close_figs=context_opt == 'close-figs',                                 code_includes=source_file_includes)         errors = []     except PlotError as err:         reporter = state.memo.reporter


Question: 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

from matplotlib.collections import (     Collection, CircleCollection, LineCollection, PathCollection,     PolyCollection, RegularPolyCollection)<ins>from matplotlib.text import Text</ins> from matplotlib.transforms import Bbox, BboxBase, TransformedBbox from matplotlib.transforms import BboxTransformTo, BboxTransformFrom from matplotlib.offsetbox import (


Question: 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

handler = self.get_legend_handler(legend_handler_map, orig_handle)             if handler is None:                 _api.warn_external(                    "Legend does not support {!r} instances.\nA proxy artist "                    "may be used instead.\nSee: "                    "https://matplotlib.org/users/legend_guide.html"                    "#creating-artists-specifically-for-adding-to-the-legend-"                    "aka-proxy-artists".format(orig_handle))                             "Legend does not support handles for {0} "                             "instances.\nA proxy artist may be used "                             "instead.\nSee: https://matplotlib.org/"                             "stable/tutorials/intermediate/legend_guide.html"                             "#controlling-the-legend-entries".format(                                 type(orig_handle).__name__))                 # No handle for this artist, so we just defer to None.                 handle_list.append(None)             else:


Question: 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

for ax in axs:         handles_original += [             *(a for a in ax._children              if isinstance(a, (Line2D, Patch, Collection))),              if isinstance(a, (Line2D, Patch, Collection, Text))),             *ax.containers]         # support parasite axes:         if hasattr(ax, 'parasites'):             for axx in ax.parasites:                 handles_original += [                     *(a for a in axx._children                      if isinstance(a, (Line2D, Patch, Collection))),                      if isinstance(a, (Line2D, Patch, Collection, Text))),                     *axx.containers]      handler_map = {**Legend.get_default_handler_map(),


Question: 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

label = handle.get_label()         if label != '_nolegend_' and has_handler(handler_map, handle):             yield handle        elif (label not in ['_nolegend_', ''] and                not has_handler(handler_map, handle)):            _api.warn_external(                             "Legend does not support handles for {0} "                             "instances.\nSee: https://matplotlib.org/stable/"                             "tutorials/intermediate/legend_guide.html"                             "#implementing-a-custom-legend-handler".format(                                 type(handle).__name__))            continue   def _get_legend_handles_labels(axs, legend_handler_map=None):diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py-- a/lib/matplotlib/text.py++ b/lib/matplotlib/text.py


Question: 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

"""         Create a `.Text` instance at *x*, *y* with string *text*. <ins>        While Text accepts the 'label' keyword argument, by default it is not        added to the handles of a legend.</ins>         Valid keyword arguments are:          %(Text:kwdoc)s


Question: 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

# we have re-set the vmin/vmax to account for small errors                 # that may have moved input values in/out of range                 s_vmin, s_vmax = vrange                if isinstance(self.norm, mcolors.LogNorm):                    if s_vmin < 0:                        s_vmin = max(s_vmin, np.finfo(scaled_dtype).eps)                if isinstance(self.norm, mcolors.LogNorm) and s_vmin <= 0:                    # Don't give 0 or negative values to LogNorm                    s_vmin = np.finfo(scaled_dtype).eps                 with cbook._setattr_cm(self.norm,                                        vmin=s_vmin,                                        vmax=s_vmax,


Question: 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.

The scale factor by which the length is shrunken or             expanded (default 16.0)             The PGF backend uses this argument as an RNG seed and not as            described above. Using the same seed yields the same random shape.             .. ACCEPTS: (scale: float, length: float, randomness: float)         """         if scale is None:diff --git a/lib/matplotlib/backends/backend_pgf.py b/lib/matplotlib/backends/backend_pgf.py-- a/lib/matplotlib/backends/backend_pgf.py++ b/lib/matplotlib/backends/backend_pgf.py


Question: 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.

r"{\pgfqpoint{%fin}{%fin}}"                         % coords) <ins>        # apply pgf decorators        sketch_params = gc.get_sketch_params() if gc else None        if sketch_params is not None:            # Only "length" directly maps to "segment length" in PGF's API.            # PGF uses "amplitude" to pass the combined deviation in both x-            # and y-direction, while matplotlib only varies the length of the            # wiggle along the line ("randomness" and "length" parameters)            # and has a separate "scale" argument for the amplitude.            # -> Use "randomness" as PRNG seed to allow the user to force the            # same shape on multiple sketched lines            scale, length, randomness = sketch_params            if scale is not None:                # make matplotlib and PGF rendering visually similar                length *= 0.5                scale *= 2                # PGF guarantees that repeated loading is a no-op                writeln(self.fh, r"\usepgfmodule{decorations}")                writeln(self.fh, r"\usepgflibrary{decorations.pathmorphing}")                writeln(self.fh, r"\pgfkeys{/pgf/decoration/.cd, "                        f"segment length = {(length * f):f}in, "                        f"amplitude = {(scale * f):f}in}}")                writeln(self.fh, f"\\pgfmathsetseed{{{int(randomness)}}}")                writeln(self.fh, r"\pgfdecoratecurrentpath{random steps}")</ins>     def _pgf_path_draw(self, stroke=True, fill=False):         actions = []         if stroke:


Question: 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.

segments = []          for path in self._paths:            vertices = [vertex for vertex, _ in path.iter_segments()]            vertices = [                vertex                for vertex, _                # Never simplify here, we want to get the data-space values                # back and there in no way to know the "right" simplification                # threshold so never try.                in path.iter_segments(simplify=False)            ]             vertices = np.asarray(vertices)             segments.append(vertices)


Question: 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--

self.artists.append(self._rect)      def _setup_edge_handle(self, props):        self._edge_handles = ToolLineHandles(self.ax, self.extents,        # Define initial position using the axis bounds to keep the same bounds        if self.direction == 'horizontal':            positions = self.ax.get_xbound()        else:            positions = self.ax.get_ybound()        self._edge_handles = ToolLineHandles(self.ax, positions,                                              direction=self.direction,                                              line_props=props,                                              useblit=self.useblit)


Question: [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

x = kwargs.pop('x', None)         y = kwargs.pop('y', None)        autopos = x is None and y is None        if info['name'] in ['_supxlabel', '_suptitle']:            autopos = y is None        elif info['name'] == '_supylabel':            autopos = x is None         if x is None:             x = info['x0']         if y is None:


Question: [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_

extend = norm.extend             else:                 extend = 'neither'        self.alpha = alpha        self.alpha = None        # Call set_alpha to handle array-like alphas properly        self.set_alpha(alpha)         self.cmap = cmap         self.norm = norm         self.values = values


Question: [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_

self.stale = True      def set_alpha(self, alpha):        """Set the transparency between 0 (transparent) and 1 (opaque)."""        self.alpha = alpha        """        Set the transparency between 0 (transparent) and 1 (opaque).        If an array is provided, *alpha* will be set to None to use the        transparency values associated with the colormap.        """        self.alpha = None if isinstance(alpha, np.ndarray) else alpha      def _set_scale(self, scale, **kwargs):         """


Question: [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_

GRIDLINE_INTERPOLATION_STEPS         self.label1 = mtext.Text(             np.nan, np.nan,            fontsize=labelsize, color=labelcolor, visible=label1On)            fontsize=labelsize, color=labelcolor, visible=label1On,            rotation=self._labelrotation[1])         self.label2 = mtext.Text(             np.nan, np.nan,            fontsize=labelsize, color=labelcolor, visible=label2On)            fontsize=labelsize, color=labelcolor, visible=label2On,            rotation=self._labelrotation[1])          self._apply_tickdir(tickdir)


Question: 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

class CallbackRegistry:     """    Handle registering and disconnecting for a set of signals and callbacks:    Handle registering, processing, blocking, and disconnecting    for a set of signals and callbacks:          >>> def oneat(x):         ...    print('eat', x)


Question: 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

>>> callbacks.process('eat', 456)         eat 456         >>> callbacks.process('be merry', 456) # nothing will be called         >>> callbacks.disconnect(id_eat)         >>> callbacks.process('eat', 456)      # nothing will be called         >>> with callbacks.blocked(signal='drink'):        ...     callbacks.process('drink', 123) # nothing will be called        >>> callbacks.process('drink', 123)        drink 123     In practice, one should always disconnect all callbacks when they are     no longer needed to avoid dangling references (and thus memory leaks).     However, real code in Matplotlib rarely does so, and due to its design,


Question: 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

else:                         raise <ins>    @contextlib.contextmanager    def blocked(self, *, signal=None):        """        Block callback signals from being processed.        A context manager to temporarily block/disable callback signals        from being processed by the registered listeners.        Parameters        ----------        signal : str, optional            The callback signal to block. The default is to block all signals.        """        orig = self.callbacks        try:            if signal is None:                # Empty out the callbacks                self.callbacks = {}            else:                # Only remove the specific signal                self.callbacks = {k: orig[k] for k in orig if k != signal}            yield        finally:            self.callbacks = orig</ins>  class silent_list(list):     """


Question: () 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

# Clear the callback registry for this axis, or it may "leak"         self.callbacks = cbook.CallbackRegistry()         self._reset_major_tick_kw()        self._reset_minor_tick_kw()        # whether the grids are on        self._major_tick_kw['gridOn'] = (                mpl.rcParams['axes.grid'] and                mpl.rcParams['axes.grid.which'] in ('both', 'major'))        self._minor_tick_kw['gridOn'] = (                mpl.rcParams['axes.grid'] and                mpl.rcParams['axes.grid.which'] in ('both', 'minor'))         self.reset_ticks()          self.converter = None


Question: 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--

"""         # local import only to avoid circularity         from matplotlib.axes import Axes        from matplotlib.figure import Figure        from matplotlib.figure import FigureBase          super().__init__()


Question: 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--

self.isaxes = True             self.axes = parent             self.set_figure(parent.figure)        elif isinstance(parent, Figure):        elif isinstance(parent, FigureBase):             self.isaxes = False             self.set_figure(parent)         else:            raise TypeError("Legend needs either Axes or Figure as parent")            raise TypeError(                "Legend needs either Axes or FigureBase as parent"            )         self.parent = parent          self._loc_used_default = loc is None


Question: 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

if pattern_re.search(key))      def copy(self):        return {k: dict.__getitem__(self, k) for k in self}        rccopy = RcParams()        for k in self:  # Skip deprecations and revalidation.            dict.__setitem__(rccopy, k, dict.__getitem__(self, k))        return rccopy   def rc_params(fail_on_error=False):


Question: 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

rcParams = RcParams()  # The global instance. dict.update(rcParams, dict.items(rcParamsDefault)) dict.update(rcParams, _rc_params_in_file(matplotlib_fname()))rcParamsOrig = rcParams.copy() with _api.suppress_matplotlib_deprecation_warning():    rcParamsOrig = RcParams(rcParams.copy())     # This also checks that all rcParams are indeed listed in the template.     # Assigning to rcsetup.defaultParams is left only for backcompat.     defaultParams = rcsetup.defaultParams = {


Question: 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--

shared_x = self in self._shared_axes["x"]         shared_y = self in self._shared_axes["y"]        # Not sure whether we need this check:         if shared_x and shared_y:            raise RuntimeError("adjustable='datalim' is not allowed when both "                               "axes are shared")            raise RuntimeError("set_aspect(..., adjustable='datalim') or "                               "axis('equal') are not allowed when both axes "                               "are shared.  Try set_aspect(..., "                               "adjustable='box').")          # If y is shared, then we are only allowed to change x, etc.         if shared_y:


Question: 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--

self.set_autoscale_on(True)                 self.set_aspect('auto')                 self.autoscale_view(tight=False)<del>                # self.apply_aspect()</del>                 if s == 'equal':                     self.set_aspect('equal', adjustable='datalim')                 elif s == 'scaled':


Question: [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

plt.axes((left, bottom, width, height), facecolor='w')     """     fig = gcf()    pos = kwargs.pop('position', None)     if arg is None:        return fig.add_subplot(**kwargs)        if pos is None:            return fig.add_subplot(**kwargs)        else:            return fig.add_axes(pos, **kwargs)     else:         return fig.add_axes(arg, **kwargs)


Question: [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_

self.solver.addConstraint(c | 'required')      def add_child(self, child, i=0, j=0):        self.children[i, j] = child        # np.ix_ returns the cross product of i and j indices        self.children[np.ix_(np.atleast_1d(i), np.atleast_1d(j))] = child      def parent_constraints(self):         # constraints that are due to the parent...


Question: [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

self.unit = unit         self.proxy_target = self.value     def __copy__(self):        return TaggedValue(self.value, self.unit)     def __getattribute__(self, name):         if name.startswith('__'):             return object.__getattribute__(self, name)diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py-- a/lib/matplotlib/lines.py++ b/lib/matplotlib/lines.py


Question: [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

2D lines with support for a variety of line styles, markers, colors, etc. """ <ins>import copy</ins> from numbers import Integral, Number, Real import logging


Question: [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

----------         x : 1D array         """        self._xorig = x        self._xorig = copy.copy(x)         self._invalidx = True         self.stale = True


Question: [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

----------         y : 1D array         """        self._yorig = y        self._yorig = copy.copy(y)         self._invalidy = True         self.stale = True


Question: [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_

ticks : `~matplotlib.ticker.Locator` or array-like of float      format : str or `~matplotlib.ticker.Formatter`<ins>        If string, it supports '%' operator and `str.format` formats:        e.g. ``"%4.2e"`` or ``"{x:.2e}"``.</ins>      drawedges : bool


Question: [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_

self.locator = ticks    # Handle default in _ticker()          if isinstance(format, str):            self.formatter = ticker.FormatStrFormatter(format)            # Check format between FormatStrFormatter and StrMethodFormatter            try:                self.formatter = ticker.FormatStrFormatter(format)                _ = self.formatter(0)            except TypeError:                self.formatter = ticker.StrMethodFormatter(format)         else:             self.formatter = format  # Assume it is a Formatter or None         self.draw_all()


Question: [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_

if offsets.shape == (2,):                 offsets = offsets[None, :]             self._offsets = offsets<ins>        elif transOffset is not None:            _api.warn_deprecated(                '3.5',                removal='3.6',                message='Passing *transOffset* without *offsets* has no '                        'effect. This behavior is deprecated since %(since)s '                        'and %(removal)s, *transOffset* will begin having an '                        'effect regardless of *offsets*. In the meantime, if '                        'you wish to set *transOffset*, call '                        'collection.set_offset_transform(transOffset) '                        'explicitly.')            transOffset = None</ins>          self._transOffset = transOffset


Question: [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

--------         .. plot:: gallery/lines_bars_and_markers/eventplot_demo.py         """        # We do the conversion first since not all unitized data is uniform        positions, lineoffsets, linelengths = self._process_unit_info(            [("x", positions), ("y", lineoffsets), ("y", linelengths)], kwargs)         lineoffsets, linelengths = self._process_unit_info(                [("y", lineoffsets), ("y", linelengths)], kwargs)        # fix positions, noting that it can be a list of lists:         if not np.iterable(positions):             positions = [positions]         elif any(np.iterable(position) for position in positions):


Question: [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

if len(positions) == 0:             return [] <ins>        poss = []        for position in positions:            poss += self._process_unit_info([("x", position)], kwargs)        positions = poss</ins>         # prevent 'singular' keys from **kwargs dict from overriding the effect         # of 'plural' keyword arguments (e.g. 'color' overriding 'colors')         colors = cbook._local_over_kwdict(colors, kwargs, 'color')


Question: [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

"""         # Process **kwargs to handle aliases, conflicts with explicit kwargs:         x, y = self._process_unit_info([("x", x), ("y", y)], kwargs)         # np.ma.ravel yields an ndarray, not a masked array,         # unless its argument is a masked array.         x = np.ma.ravel(x)


Question: [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

p = r'([a-zA-Z]+)'     ret_text = re.sub(p, r'}$\1$\\mathdefault{', text)     # Braces ensure dashes are not spaced like binary operators.    ret_text = '$\\mathdefault{'+ret_text.replace('-', '{-}')+'}$'    # Braces ensure symbols are not spaced like binary operators.    ret_text = ret_text.replace('-', '{-}').replace(':', '{:}')    # To not concatenate space between numbers.    ret_text = ret_text.replace(' ', r'\;')    ret_text = '$\\mathdefault{' + ret_text + '}$'     ret_text = ret_text.replace('$\\mathdefault{}$', '')     return ret_text


Question: [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

try:             return self._dict[name]         except KeyError:            raise ValueError(            raise AttributeError(                 f"'Spines' object does not contain a '{name}' spine")      def __getitem__(self, key):


Question: [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

key = (path, id(trf))             custom_clip_cmd = self._clip_paths.get(key)             if custom_clip_cmd is None:                custom_clip_cmd = "c%x" % len(self._clip_paths)                custom_clip_cmd = "c%d" % len(self._clip_paths)                 self._pswriter.write(f"""\ /{custom_clip_cmd} {{ {self._convert_path(path, trf, simplify=False)}


Question: [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

path_codes = []         for i, (path, transform) in enumerate(self._iter_collection_raw_paths(                 master_transform, paths, all_transforms)):            name = 'p%x_%x' % (self._path_collection_id, i)            name = 'p%d_%d' % (self._path_collection_id, i)             path_bytes = self._convert_path(path, transform, simplify=False)             self._pswriter.write(f"""\ /{name} {{


Question: [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

val = self._max_in_bounds(pos)             self.set_max(val)         if self._active_handle:            self._active_handle.set_xdata([val])            if self.orientation == "vertical":                self._active_handle.set_ydata([val])            else:                self._active_handle.set_xdata([val])      def _update(self, event):         """Update the slider position."""


Question: [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

return          # determine which handle was grabbed        handle = self._handles[            np.argmin(        if self.orientation == "vertical":            handle_index = np.argmin(                np.abs([h.get_ydata()[0] - event.ydata for h in self._handles])            )        else:            handle_index = np.argmin(                 np.abs([h.get_xdata()[0] - event.xdata for h in self._handles])             )        ]        handle = self._handles[handle_index]         # these checks ensure smooth behavior if the handles swap which one         # has a higher value. i.e. if one is dragged over and past the other.         if handle is not self._active_handle:


Question: [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

xy[2] = .75, val[1]             xy[3] = .75, val[0]             xy[4] = .25, val[0]            self._handles[0].set_ydata([val[0]])            self._handles[1].set_ydata([val[1]])         else:             xy[0] = val[0], .25             xy[1] = val[0], .75             xy[2] = val[1], .75             xy[3] = val[1], .25             xy[4] = val[0], .25            self._handles[0].set_xdata([val[0]])            self._handles[1].set_xdata([val[1]])         self.poly.xy = xy         self.valtext.set_text(self._format(val))         if self.drawon:             self.ax.figure.canvas.draw_idle()         self.val = val


Question: [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

is_numlike = all(units.ConversionInterface.is_numlike(v)                              and not isinstance(v, (str, bytes))                              for v in values)        if is_numlike:        if values.size and is_numlike:             _api.warn_deprecated(                 "3.5", message="Support for passing numbers through unit "                 "converters is deprecated since %(since)s and support will be "


Question: [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

convertible = self._str_is_convertible(val)             if val not in self._mapping:                 self._mapping[val] = next(self._counter)        if convertible:        if data.size and convertible:             _log.info('Using categorical units to plot a list of strings '                       'that are all parsable as floats or dates. If these '                       'strings should be plotted as numbers, cast to the '


Question: [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

if 'antialiaseds' not in kwargs and ec.lower() == "none":         kwargs['antialiaseds'] = False     _api.check_isinstance((Normalize, None), norm=norm)     if shading == 'gouraud':         if facecolors is not None:             raise ValueError(                 "shading='gouraud' can only be used when the colors "                 "are specified at the points, not at the faces.")        collection = TriMesh(tri, **kwargs)        colors = point_colors        collection = TriMesh(tri, alpha=alpha, array=point_colors,                             cmap=cmap, norm=norm, **kwargs)     else:         # Vertices of triangles.         maskedTris = tri.get_masked_triangles()


Question: [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

colors = facecolors[~tri.mask]         else:             colors = facecolors        collection = PolyCollection(verts, alpha=alpha, array=colors,                                    cmap=cmap, norm=norm, **kwargs)         collection = PolyCollection(verts, **kwargs)    collection.set_alpha(alpha)    collection.set_array(colors)    _api.check_isinstance((Normalize, None), norm=norm)    collection.set_cmap(cmap)    collection.set_norm(norm)     collection._scale_norm(norm, vmin, vmax)     ax.grid(False)


Question: [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

"""         Find the point in the contour plot that is closest to ``(x, y)``. <ins>        This method does not support filled contours.</ins>         Parameters         ----------         x, y : float


Question: [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

# sufficiently well that the time is not noticeable.         # Nonetheless, improvements could probably be made.         if self.filled:            raise ValueError("Method does not support filled contours.")         if indices is None:            indices = range(len(self.levels))            indices = range(len(self.collections))          d2min = np.inf         conmin = None


Question: [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

from collections.abc import Sized, Sequence import copy import functools<ins>import importlib</ins> import inspect import io import itertools


Question: [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

class Norm(base_norm_cls):         def __reduce__(self):            cls = type(self)            # If the class is toplevel-accessible, it is possible to directly            # pickle it "by name".  This is required to support norm classes            # defined at a module's toplevel, as the inner base_norm_cls is            # otherwise unpicklable (as it gets shadowed by the generated norm            # class).  If either import or attribute access fails, fall back to            # the general path.            try:                if cls is getattr(importlib.import_module(cls.__module__),                                  cls.__qualname__):                    return (_create_empty_object_of_class, (cls,), vars(self))            except (ImportError, AttributeError):                pass             return (_picklable_norm_constructor,                     (scale_cls, base_norm_cls, bound_init_signature),                    self.__dict__)                    vars(self))          def __init__(self, *args, **kwargs):             ba = bound_init_signature.bind(*args, **kwargs)


Question: [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

return Norm  def _picklable_norm_constructor(*args):    cls = _make_norm_from_scale(*args)def _create_empty_object_of_class(cls):     return cls.__new__(cls)  def _picklable_norm_constructor(*args):    return _create_empty_object_of_class(_make_norm_from_scale(*args)) @make_norm_from_scale(     scale.FuncScale,     init=lambda functions, vmin=None, vmax=None, clip=False: None)


Question: [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

import matplotlib as mpl from . import _api, cbook<ins>from .colors import BoundaryNorm</ins> from .cm import ScalarMappable from .path import Path from .transforms import (Bbox, IdentityTransform, Transform, TransformedBbox,


Question: [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

return "[]"             normed = self.norm(data)             if np.isfinite(normed):                # Midpoints of neighboring color intervals.                neighbors = self.norm.inverse(                    (int(self.norm(data) * n) + np.array([0, 1])) / n)                delta = abs(neighbors - data).max()                if isinstance(self.norm, BoundaryNorm):                    # not an invertible normalization mapping                    cur_idx = np.argmin(np.abs(self.norm.boundaries - data))                    neigh_idx = max(0, cur_idx - 1)                    # use max diff to prevent delta == 0                    delta = np.diff(                        self.norm.boundaries[neigh_idx:cur_idx + 2]                    ).max()                else:                    # Midpoints of neighboring color intervals.                    neighbors = self.norm.inverse(                        (int(normed * n) + np.array([0, 1])) / n)                    delta = abs(neighbors - data).max()                 g_sig_digits = cbook._g_sig_digits(data, delta)             else:                 g_sig_digits = 3  # Consistent with default below.


Question: [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

if not self.drawedges:                 if len(self._y) >= self.n_rasterize:                     self.solids.set_rasterized(True)        self.dividers.set_segments(            np.dstack([X, Y])[1:-1] if self.drawedges else [])        if self.drawedges:            start_idx = 0 if self._extend_lower() else 1            end_idx = len(X) if self._extend_upper() else -1            self.dividers.set_segments(np.dstack([X, Y])[start_idx:end_idx])        else:            self.dividers.set_segments([])      def _add_solids_patches(self, X, Y, C, mappable):         hatches = mappable.hatches * len(C)  # Have enough hatches.


Question: [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

# mostly 0: years,  1: months,  2: days,         # 3: hours, 4: minutes, 5: seconds, 6: microseconds         for level in range(5, -1, -1):            if len(np.unique(tickdate[:, level])) > 1:                if level < 2:            unique = np.unique(tickdate[:, level])            if len(unique) > 1:                # if 1 is included in unique, the year is shown in ticks                if level < 2 and np.any(unique == 1):                     show_offset = False                 break             elif level == 0:


Question: 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

else:         # Color from positional parameter C         if not args:            raise ValueError(                "Missing color parameter. Please pass C positionally or "                "facecolors via keyword")            raise TypeError(                "tripcolor() missing 1 required positional argument: 'C'; or "                "1 required keyword-only argument: 'facecolors'")         elif len(args) > 1:            _api.warn_external(                "Additional positional parameters {args[1:]!r} are ignored")            _api.warn_deprecated(                "3.6", message=f"Additional positional parameters "                f"{args[1:]!r} are ignored; support for them is deprecated "                f"since %(since)s and will be removed %(removal)s")         C = np.asarray(args[0])         if len(C) == len(tri.x):             # having this before the len(tri.triangles) comparison gives


Question: [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

from . import (_api, _docstring, backend_tools, cbook, colors, ticker,                transforms) from .lines import Line2Dfrom .patches import Circle, Rectangle, Ellipsefrom .patches import Circle, Rectangle, Ellipse, Polygon from .transforms import TransformedPatchPath, Affine2D


Question: [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

facecolor=track_color             )             ax.add_patch(self.track)            self.poly = ax.axhspan(valinit[0], valinit[1], 0, 1, **kwargs)            poly_transform = self.ax.get_yaxis_transform(which="grid")             handleXY_1 = [.5, valinit[0]]             handleXY_2 = [.5, valinit[1]]         else:


Question: [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

facecolor=track_color             )             ax.add_patch(self.track)            self.poly = ax.axvspan(valinit[0], valinit[1], 0, 1, **kwargs)            poly_transform = self.ax.get_xaxis_transform(which="grid")             handleXY_1 = [valinit[0], .5]             handleXY_2 = [valinit[1], .5]        self.poly = Polygon(np.zeros([5, 2]), **kwargs)        self._update_selection_poly(*valinit)        self.poly.set_transform(poly_transform)        self.poly.get_path()._interpolation_steps = 100        self.ax.add_patch(self.poly)        self.ax._request_autoscale_view()         self._handles = [             ax.plot(                 *handleXY_1,


Question: [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

self._active_handle = None         self.set_val(valinit) <ins>    def _update_selection_poly(self, vmin, vmax):        """        Update the vertices of the *self.poly* slider in-place        to cover the data range *vmin*, *vmax*.        """        # The vertices are positioned        #  1 ------ 2        #  |        |        # 0, 4 ---- 3        verts = self.poly.xy        if self.orientation == "vertical":            verts[0] = verts[4] = .25, vmin            verts[1] = .25, vmax            verts[2] = .75, vmax            verts[3] = .75, vmin        else:            verts[0] = verts[4] = vmin, .25            verts[1] = vmin, .75            verts[2] = vmax, .75            verts[3] = vmax, .25</ins>     def _min_in_bounds(self, min):         """Ensure the new min value is between valmin and self.val[1]."""         if min <= self.valmin:


Question: [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

"""         val = np.sort(val)         _api.check_shape((2,), val=val)        val[0] = self._min_in_bounds(val[0])        val[1] = self._max_in_bounds(val[1])        xy = self.poly.xy        vmin, vmax = val        vmin = self._min_in_bounds(vmin)        vmax = self._max_in_bounds(vmax)        self._update_selection_poly(vmin, vmax)         if self.orientation == "vertical":            xy[0] = .25, val[0]            xy[1] = .25, val[1]            xy[2] = .75, val[1]            xy[3] = .75, val[0]            xy[4] = .25, val[0]            self._handles[0].set_ydata([val[0]])            self._handles[1].set_ydata([val[1]])            self._handles[0].set_ydata([vmin])            self._handles[1].set_ydata([vmax])         else:            xy[0] = val[0], .25            xy[1] = val[0], .75            xy[2] = val[1], .75            xy[3] = val[1], .25            xy[4] = val[0], .25            self._handles[0].set_xdata([vmin])            self._handles[1].set_xdata([vmax])             self._handles[0].set_xdata([val[0]])            self._handles[1].set_xdata([val[1]])        self.poly.xy = xy        self.valtext.set_text(self._format(val))        self.valtext.set_text(self._format((vmin, vmax)))          if self.drawon:             self.ax.figure.canvas.draw_idle()        self.val = val        self.val = (vmin, vmax)         if self.eventson:            self._observers.process("changed", val)            self._observers.process("changed", (vmin, vmax))      def on_changed(self, func):         """


Question: [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

lines._internal_update(kwargs)          if len(y) > 0:            minx = min(xmin.min(), xmax.min())            maxx = max(xmin.max(), xmax.max())            miny = y.min()            maxy = y.max()            minx = min(np.nanmin(xmin), np.nanmin(xmax))            maxx = max(np.nanmax(xmin), np.nanmax(xmax))            miny = np.nanmin(y)            maxy = np.nanmax(y)              corners = (minx, miny), (maxx, maxy)