# Matplotlib > ::: {.automodule members="" undoc-members="" show-inheritance=""} --- # `matplotlib._afm` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.\_afm ::: --- # `matplotlib._api` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.\_api ::: ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.\_api.deprecation ::: --- # `matplotlib._docstring` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.\_docstring ::: --- # `matplotlib._enums` ::: {.automodule no-members=""} matplotlib.\_enums ::: {.autoclass members="demo" exclude-members="bevel, miter, round, input_description"} JoinStyle ::: ::: {.autoclass members="demo" exclude-members="butt, round, projecting, input_description"} CapStyle ::: ::: --- # `matplotlib._tight_bbox` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.\_tight_bbox ::: --- # `matplotlib._tight_layout` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.\_tight_layout ::: --- # `matplotlib._type1font` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.\_type1font ::: --- # `matplotlib.animation` ::: {.automodule no-members="" no-undoc-members=""} matplotlib.animation ::: ::: {.contents depth="1" local="" backlinks="entry"} Table of Contents ::: ## Animation The easiest way to make a live animation in Matplotlib is to use one of the [Animation]{.title-ref} classes. ::: seealso \- `animations`{.interpreted-text role="ref"} ::: ::: {.inheritance-diagram parts="1"} matplotlib.animation.FuncAnimation matplotlib.animation.ArtistAnimation ::: ::: {.autosummary toctree="_as_gen" nosignatures=""} Animation FuncAnimation ArtistAnimation ::: In both cases it is critical to keep a reference to the instance object. The animation is advanced by a timer (typically from the host GUI framework) which the [Animation]{.title-ref} object holds the only reference to. If you do not hold a reference to the [Animation]{.title-ref} object, it (and hence the timers) will be garbage collected which will stop the animation. To save an animation use [Animation.save]{.title-ref}, [Animation.to_html5_video]{.title-ref}, or [Animation.to_jshtml]{.title-ref}. See `ani_writer_classes`{.interpreted-text role="ref"} below for details about what movie formats are supported. ### `FuncAnimation` {#func-animation} The inner workings of [FuncAnimation]{.title-ref} is more-or-less: for d in frames: artists = func(d, *fargs) fig.canvas.draw_idle() fig.canvas.start_event_loop(interval) with details to handle \'blitting\' (to dramatically improve the live performance), to be non-blocking, not repeatedly start/stop the GUI event loop, handle repeats, multiple animated axes, and easily save the animation to a movie file. \'Blitting\' is a [standard technique](https://en.wikipedia.org/wiki/Bit_blit) in computer graphics. The general gist is to take an existing bit map (in our case a mostly rasterized figure) and then \'blit\' one more artist on top. Thus, by managing a saved \'clean\' bitmap, we can only re-draw the few artists that are changing at each frame and possibly save significant amounts of time. When we use blitting (by passing `blit=True`), the core loop of [FuncAnimation]{.title-ref} gets a bit more complicated: ax = fig.gca() def update_blit(artists): fig.canvas.restore_region(bg_cache) for a in artists: a.axes.draw_artist(a) ax.figure.canvas.blit(ax.bbox) artists = init_func() for a in artists: a.set_animated(True) fig.canvas.draw() bg_cache = fig.canvas.copy_from_bbox(ax.bbox) for f in frames: artists = func(f, *fargs) update_blit(artists) fig.canvas.start_event_loop(interval) This is of course leaving out many details (such as updating the background when the figure is resized or fully re-drawn). However, this hopefully minimalist example gives a sense of how `init_func` and `func` are used inside of [FuncAnimation]{.title-ref} and the theory of how \'blitting\' works. ::: note ::: title Note ::: The zorder of artists is not taken into account when \'blitting\' because the \'blitted\' artists are always drawn on top. ::: The expected signature on `func` and `init_func` is very simple to keep [FuncAnimation]{.title-ref} out of your book keeping and plotting logic, but this means that the callable objects you pass in must know what artists they should be working on. There are several approaches to handling this, of varying complexity and encapsulation. The simplest approach, which works quite well in the case of a script, is to define the artist at a global scope and let Python sort things out. For example: import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation fig, ax = plt.subplots() xdata, ydata = [], [] ln, = ax.plot([], [], 'ro') def init(): ax.set_xlim(0, 2*np.pi) ax.set_ylim(-1, 1) return ln, def update(frame): xdata.append(frame) ydata.append(np.sin(frame)) ln.set_data(xdata, ydata) return ln, ani = FuncAnimation(fig, update, frames=np.linspace(0, 2*np.pi, 128), init_func=init, blit=True) plt.show() The second method is to use [functools.partial]{.title-ref} to pass arguments to the function: import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation from functools import partial fig, ax = plt.subplots() line1, = ax.plot([], [], 'ro') def init(): ax.set_xlim(0, 2*np.pi) ax.set_ylim(-1, 1) return line1, def update(frame, ln, x, y): x.append(frame) y.append(np.sin(frame)) ln.set_data(x, y) return ln, ani = FuncAnimation( fig, partial(update, ln=line1, x=[], y=[]), frames=np.linspace(0, 2*np.pi, 128), init_func=init, blit=True) plt.show() A third method is to use closures to build up the required artists and functions. A fourth method is to create a class. #### Examples - `../gallery/animation/animate_decay`{.interpreted-text role="doc"} - `../gallery/animation/bayes_update`{.interpreted-text role="doc"} - `../gallery/animation/double_pendulum`{.interpreted-text role="doc"} - `../gallery/animation/animated_histogram`{.interpreted-text role="doc"} - `../gallery/animation/rain`{.interpreted-text role="doc"} - `../gallery/animation/random_walk`{.interpreted-text role="doc"} - `../gallery/animation/simple_anim`{.interpreted-text role="doc"} - `../gallery/animation/strip_chart`{.interpreted-text role="doc"} - `../gallery/animation/unchained`{.interpreted-text role="doc"} ### `ArtistAnimation` #### Examples - `../gallery/animation/dynamic_image`{.interpreted-text role="doc"} ## Writer Classes ::: {.inheritance-diagram top-classes="matplotlib.animation.AbstractMovieWriter" parts="1"} matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter matplotlib.animation.PillowWriter matplotlib.animation.HTMLWriter ::: The provided writers fall into a few broad categories. The Pillow writer relies on the Pillow library to write the animation, keeping all data in memory. ::: {.autosummary toctree="_as_gen" nosignatures=""} PillowWriter ::: The HTML writer generates JavaScript-based animations. ::: {.autosummary toctree="_as_gen" nosignatures=""} HTMLWriter ::: The pipe-based writers stream the captured frames over a pipe to an external process. The pipe-based variants tend to be more performant, but may not work on all systems. ::: {.autosummary toctree="_as_gen" nosignatures=""} FFMpegWriter ImageMagickWriter ::: The file-based writers save temporary files for each frame which are stitched into a single file at the end. Although slower, these writers can be easier to debug. ::: {.autosummary toctree="_as_gen" nosignatures=""} FFMpegFileWriter ImageMagickFileWriter ::: The writer classes provide a way to grab sequential frames from the same underlying [\~matplotlib.figure.Figure]{.title-ref}. They all provide three methods that must be called in sequence: - [\~.AbstractMovieWriter.setup]{.title-ref} prepares the writer (e.g. opening a pipe). Pipe-based and file-based writers take different arguments to `setup()`. - [\~.AbstractMovieWriter.grab_frame]{.title-ref} can then be called as often as needed to capture a single frame at a time - [\~.AbstractMovieWriter.finish]{.title-ref} finalizes the movie and writes the output file to disk. Example: moviewriter = MovieWriter(...) moviewriter.setup(fig, 'my_movie.ext', dpi=100) for j in range(n): update_figure(j) moviewriter.grab_frame() moviewriter.finish() If using the writer classes directly (not through [Animation.save]{.title-ref}), it is strongly encouraged to use the [\~.AbstractMovieWriter.saving]{.title-ref} context manager: with moviewriter.saving(fig, 'myfile.mp4', dpi=100): for j in range(n): update_figure(j) moviewriter.grab_frame() to ensure that setup and cleanup are performed as necessary. ### Examples - `../gallery/animation/frame_grabbing_sgskip`{.interpreted-text role="doc"} ## Helper Classes {#ani_writer_classes} ### Animation Base Classes ::: {.autosummary toctree="_as_gen" nosignatures=""} Animation TimedAnimation ::: ### Writer Registry A module-level registry is provided to map between the name of the writer and the class to allow a string to be passed to [Animation.save]{.title-ref} instead of a writer instance. ::: {.autosummary toctree="_as_gen" nosignatures=""} MovieWriterRegistry ::: ### Writer Base Classes To reduce code duplication base classes ::: {.autosummary toctree="_as_gen" nosignatures=""} AbstractMovieWriter MovieWriter FileMovieWriter ::: and mixins ::: {.autosummary toctree="_as_gen" nosignatures=""} FFMpegBase ImageMagickBase ::: are provided. See the source code for how to easily implement new [MovieWriter]{.title-ref} classes. --- # `matplotlib.artist` {#artist-api} ::: {.automodule no-members="" no-undoc-members=""} matplotlib.artist ::: ## Inheritance Diagrams ::: {.inheritance-diagram parts="1" private-bases=""} matplotlib.axes.\_axes.Axes matplotlib.axes.\_base.\_AxesBase matplotlib.axis.Axis matplotlib.axis.Tick matplotlib.axis.XAxis matplotlib.axis.XTick matplotlib.axis.YAxis matplotlib.axis.YTick matplotlib.collections.AsteriskPolygonCollection matplotlib.collections.CircleCollection matplotlib.collections.Collection matplotlib.collections.EllipseCollection matplotlib.collections.EventCollection matplotlib.collections.LineCollection matplotlib.collections.PatchCollection matplotlib.collections.PathCollection matplotlib.collections.PolyCollection matplotlib.collections.QuadMesh matplotlib.collections.RegularPolyCollection matplotlib.collections.StarPolygonCollection matplotlib.collections.TriMesh matplotlib.collections.\_CollectionWithSizes matplotlib.contour.ContourSet matplotlib.contour.QuadContourSet matplotlib.figure.FigureBase matplotlib.figure.Figure matplotlib.figure.SubFigure matplotlib.image.AxesImage matplotlib.image.BboxImage matplotlib.image.FigureImage matplotlib.image.NonUniformImage matplotlib.image.PcolorImage matplotlib.image.\_ImageBase matplotlib.legend.Legend matplotlib.lines.Line2D matplotlib.offsetbox.AnchoredOffsetbox matplotlib.offsetbox.AnchoredText matplotlib.offsetbox.AnnotationBbox matplotlib.offsetbox.AuxTransformBox matplotlib.offsetbox.DrawingArea matplotlib.offsetbox.HPacker matplotlib.offsetbox.OffsetBox matplotlib.offsetbox.OffsetImage matplotlib.offsetbox.PackerBase matplotlib.offsetbox.PaddedBox matplotlib.offsetbox.TextArea matplotlib.offsetbox.VPacker matplotlib.patches.Annulus matplotlib.patches.Arc matplotlib.patches.Arrow matplotlib.patches.Circle matplotlib.patches.CirclePolygon matplotlib.patches.ConnectionPatch matplotlib.patches.Ellipse matplotlib.patches.FancyArrow matplotlib.patches.FancyArrowPatch matplotlib.patches.FancyBboxPatch matplotlib.patches.Patch matplotlib.patches.PathPatch matplotlib.patches.Polygon matplotlib.patches.Rectangle matplotlib.patches.RegularPolygon matplotlib.patches.Shadow matplotlib.patches.StepPatch matplotlib.patches.Wedge matplotlib.projections.geo.AitoffAxes matplotlib.projections.geo.GeoAxes matplotlib.projections.geo.HammerAxes matplotlib.projections.geo.LambertAxes matplotlib.projections.geo.MollweideAxes matplotlib.projections.polar.PolarAxes matplotlib.projections.polar.RadialAxis matplotlib.projections.polar.RadialTick matplotlib.projections.polar.ThetaAxis matplotlib.projections.polar.ThetaTick matplotlib.quiver.Barbs matplotlib.quiver.Quiver matplotlib.quiver.QuiverKey matplotlib.spines.Spine matplotlib.table.Cell matplotlib.table.Table matplotlib.text.Annotation matplotlib.text.Text matplotlib.tri.TriContourSet ::: ## `Artist` class ::: {.autoclass no-members="" no-undoc-members=""} Artist ::: ### Interactive ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.add_callback Artist.remove_callback Artist.pchanged Artist.get_cursor_data Artist.format_cursor_data Artist.set_mouseover Artist.get_mouseover Artist.mouseover Artist.contains Artist.pick Artist.pickable Artist.set_picker Artist.get_picker ::: ### Clipping ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.set_clip_on Artist.get_clip_on Artist.set_clip_box Artist.get_clip_box Artist.set_clip_path Artist.get_clip_path ::: ### Bulk Properties ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.update Artist.update_from Artist.properties Artist.set ::: ### Drawing ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.draw Artist.set_animated Artist.get_animated Artist.set_alpha Artist.get_alpha Artist.set_snap Artist.get_snap Artist.set_visible Artist.get_visible Artist.zorder Artist.set_zorder Artist.get_zorder Artist.set_agg_filter Artist.set_sketch_params Artist.get_sketch_params Artist.set_rasterized Artist.get_rasterized Artist.set_path_effects Artist.get_path_effects Artist.get_agg_filter Artist.get_window_extent Artist.get_tightbbox Artist.get_transformed_clip_path_and_affine ::: ### Figure and Axes ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.remove Artist.axes Artist.set_figure Artist.get_figure ::: ### Children ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.get_children Artist.findobj ::: ### Transform ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.set_transform Artist.get_transform Artist.is_transform_set ::: ### Units ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.convert_xunits Artist.convert_yunits Artist.have_units ::: ### Metadata ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.set_gid Artist.get_gid Artist.set_label Artist.get_label Artist.set_url Artist.get_url ::: ### Miscellaneous ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} Artist.sticky_edges Artist.set_in_layout Artist.get_in_layout Artist.stale ::: ## Functions ::: {.autosummary template="autosummary.rst" toctree="_as_gen" nosignatures=""} allow_rasterization get getp setp kwdoc ArtistInspector ::: --- # `matplotlib.axes` The [\~.axes.Axes]{.title-ref} class represents one (sub-)plot in a figure. It contains the plotted data, axis ticks, labels, title, legend, etc. Its methods are the main interface for manipulating the plot. ::: currentmodule matplotlib.axes ::: ::: {.contents .multicol-toc depth="2" local="" backlinks="entry"} Table of Contents ::: ::: {.automodule no-members="" no-undoc-members=""} matplotlib.axes ::: ## The Axes class ::: {.autosummary toctree="_as_gen" template="autosummary_class_only.rst" nosignatures=""} Axes ::: ### Attributes ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.viewLim Axes.dataLim Axes.spines ::: ## Plotting ### Basic ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.plot Axes.errorbar Axes.scatter Axes.step Axes.loglog Axes.semilogx Axes.semilogy Axes.fill_between Axes.fill_betweenx Axes.bar Axes.barh Axes.bar_label Axes.grouped_bar Axes.stem Axes.eventplot Axes.pie Axes.pie_label Axes.stackplot Axes.broken_barh Axes.vlines Axes.hlines Axes.fill ::: ### Spans ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.axhline Axes.axhspan Axes.axvline Axes.axvspan Axes.axline ::: ### Spectral ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.acorr Axes.angle_spectrum Axes.cohere Axes.csd Axes.magnitude_spectrum Axes.phase_spectrum Axes.psd Axes.specgram Axes.xcorr ::: ### Statistics ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.ecdf Axes.boxplot Axes.violinplot Axes.bxp Axes.violin ::: ### Binned ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.hexbin Axes.hist Axes.hist2d Axes.stairs ::: ### Contours ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.clabel Axes.contour Axes.contourf ::: ### 2D arrays ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.imshow Axes.matshow Axes.pcolor Axes.pcolorfast Axes.pcolormesh Axes.spy ::: ### Unstructured triangles ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.tripcolor Axes.triplot Axes.tricontour Axes.tricontourf ::: ### Text and annotations ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.annotate Axes.text Axes.table Axes.arrow Axes.inset_axes Axes.indicate_inset Axes.indicate_inset_zoom Axes.secondary_xaxis Axes.secondary_yaxis ::: ### Vector fields ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.barbs Axes.quiver Axes.quiverkey Axes.streamplot ::: ## Clearing ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.cla Axes.clear ::: ## Appearance ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.axis Axes.set_axis_off Axes.set_axis_on Axes.set_frame_on Axes.get_frame_on Axes.set_axisbelow Axes.get_axisbelow Axes.grid Axes.get_facecolor Axes.set_facecolor ::: ## Property cycle ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.set_prop_cycle ::: ## Axis / limits {#axes-api-axis} ### Axis access ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.xaxis Axes.yaxis Axes.get_xaxis Axes.get_yaxis ::: ### Axis limits and direction ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.set_xinverted Axes.get_xinverted Axes.invert_xaxis Axes.xaxis_inverted Axes.set_yinverted Axes.get_yinverted Axes.invert_yaxis Axes.yaxis_inverted Axes.set_xlim Axes.get_xlim Axes.set_ylim Axes.get_ylim Axes.update_datalim Axes.set_xbound Axes.get_xbound Axes.set_ybound Axes.get_ybound ::: ### Axis labels, title, and legend ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.set_xlabel Axes.get_xlabel Axes.set_ylabel Axes.get_ylabel Axes.label_outer Axes.set_title Axes.get_title Axes.legend Axes.get_legend Axes.get_legend_handles_labels ::: ### Axis scales ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.set_xscale Axes.get_xscale Axes.set_yscale Axes.get_yscale ::: ### Autoscaling and margins ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.use_sticky_edges Axes.margins Axes.get_xmargin Axes.get_ymargin Axes.set_xmargin Axes.set_ymargin Axes.relim Axes.autoscale Axes.autoscale_view Axes.set_autoscale_on Axes.get_autoscale_on Axes.set_autoscalex_on Axes.get_autoscalex_on Axes.set_autoscaley_on Axes.get_autoscaley_on ::: ### Aspect ratio ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.apply_aspect Axes.set_aspect Axes.get_aspect Axes.set_box_aspect Axes.get_box_aspect Axes.set_adjustable Axes.get_adjustable ::: ### Ticks and tick labels ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.set_xticks Axes.get_xticks Axes.set_xticklabels Axes.get_xticklabels Axes.get_xmajorticklabels Axes.get_xminorticklabels Axes.get_xgridlines Axes.get_xticklines Axes.xaxis_date Axes.set_yticks Axes.get_yticks Axes.set_yticklabels Axes.get_yticklabels Axes.get_ymajorticklabels Axes.get_yminorticklabels Axes.get_ygridlines Axes.get_yticklines Axes.yaxis_date Axes.minorticks_off Axes.minorticks_on Axes.ticklabel_format Axes.tick_params Axes.locator_params ::: ## Units ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.convert_xunits Axes.convert_yunits Axes.have_units ::: ## Adding artists ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.add_artist Axes.add_child_axes Axes.add_collection Axes.add_container Axes.add_image Axes.add_line Axes.add_patch Axes.add_table ::: ## Twinning and sharing ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.twinx Axes.twiny Axes.sharex Axes.sharey Axes.get_shared_x_axes Axes.get_shared_y_axes ::: ## Axes position ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.get_anchor Axes.set_anchor Axes.get_axes_locator Axes.set_axes_locator Axes.get_subplotspec Axes.set_subplotspec Axes.reset_position Axes.get_position Axes.set_position ::: ## Async/event based ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.stale Axes.pchanged Axes.add_callback Axes.remove_callback ::: ## Interactive ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.can_pan Axes.can_zoom Axes.get_navigate Axes.set_navigate Axes.get_navigate_mode Axes.set_navigate_mode Axes.get_forward_navigation_events Axes.set_forward_navigation_events Axes.start_pan Axes.drag_pan Axes.end_pan Axes.format_coord Axes.format_cursor_data Axes.format_xdata Axes.format_ydata Axes.mouseover Axes.in_axes Axes.contains Axes.contains_point Axes.get_cursor_data ::: ## Children ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.get_children Axes.get_images Axes.get_lines Axes.findobj ::: ## Drawing ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.draw Axes.draw_artist Axes.redraw_in_frame Axes.get_rasterization_zorder Axes.set_rasterization_zorder Axes.get_window_extent Axes.get_tightbbox ::: ## Projection Methods used by [\~matplotlib.axis.Axis]{.title-ref} that must be overridden for non-rectilinear Axes. ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.name Axes.get_xaxis_transform Axes.get_yaxis_transform Axes.get_data_ratio Axes.get_xaxis_text1_transform Axes.get_xaxis_text2_transform Axes.get_yaxis_text1_transform Axes.get_yaxis_text2_transform ::: ## Other ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axes.zorder Axes.get_default_bbox_extra_artists Axes.get_transformed_clip_path_and_affine Axes.has_data Axes.set Axes.remove ::: ::: autoclass matplotlib.axes.Axes.ArtistList ::: --- # `matplotlib.axis` ::: {.contents depth="3" local="" backlinks="entry"} Table of Contents ::: ::: {.automodule no-members="" no-undoc-members=""} matplotlib.axis ::: ## Inheritance ::: {.inheritance-diagram private-bases=""} Tick Ticker XAxis YAxis XTick YTick ::: ## `Axis` objects ::: {.autoclass no-members="" no-undoc-members=""} Axis ::: ::: {.autoclass no-members="" no-undoc-members=""} XAxis ::: ::: {.autoclass no-members="" no-undoc-members=""} YAxis ::: ::: {.autoclass no-members="" no-undoc-members=""} Ticker ::: ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.clear Axis.get_scale ::: ### Formatters and Locators ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.get_major_formatter Axis.get_major_locator Axis.get_minor_formatter Axis.get_minor_locator Axis.set_major_formatter Axis.set_major_locator Axis.set_minor_formatter Axis.set_minor_locator Axis.remove_overlapping_locs Axis.get_remove_overlapping_locs Axis.set_remove_overlapping_locs ::: ### Axis Label ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.label Axis.set_label_coords Axis.set_label_position Axis.set_label_text Axis.get_label_position Axis.get_label_text ::: ### Ticks, tick labels and Offset text ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.get_major_ticks Axis.get_majorticklabels Axis.get_majorticklines Axis.get_majorticklocs Axis.get_minor_ticks Axis.get_minorticklabels Axis.get_minorticklines Axis.get_minorticklocs Axis.get_offset_text Axis.get_tick_padding Axis.get_tick_params Axis.get_ticklabels Axis.get_ticklines Axis.get_ticklocs Axis.get_gridlines Axis.grid Axis.set_tick_params Axis.axis_date Axis.minorticks_off Axis.minorticks_on ::: ### Data and view intervals ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.get_data_interval Axis.get_view_interval Axis.get_inverted Axis.set_data_interval Axis.set_view_interval Axis.set_inverted ::: ### Rendering helpers ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.get_minpos Axis.get_tick_space Axis.get_tightbbox ::: ### Interactive ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.contains Axis.pickradius Axis.get_pickradius Axis.set_pickradius ::: ### Units ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.convert_units Axis.set_units Axis.get_units Axis.set_converter Axis.get_converter Axis.update_units ::: ### XAxis Specific ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} XAxis.axis_name XAxis.get_ticks_position XAxis.set_ticks_position XAxis.set_label_position XAxis.tick_bottom XAxis.tick_top ::: ### YAxis Specific ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} YAxis.axis_name YAxis.get_ticks_position YAxis.set_offset_position YAxis.set_ticks_position YAxis.set_label_position YAxis.tick_left YAxis.tick_right ::: ### Other ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.OFFSETTEXTPAD Axis.axes Axis.limit_range_for_scale Axis.reset_ticks Axis.set_clip_path Axis.set_default_intervals ::: ### Discouraged These methods should be used together with care, calling `set_ticks` to specify the desired tick locations **before** calling `set_ticklabels` to specify a matching series of labels. Calling `set_ticks` makes a [\~matplotlib.ticker.FixedLocator]{.title-ref}; it\'s list of locations is then used by `set_ticklabels` to make an appropriate [\~matplotlib.ticker.FuncFormatter]{.title-ref}. ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Axis.get_label Axis.set_label Axis.set_ticks Axis.set_ticklabels ::: ## `Tick` objects ::: {.autoclass no-members="" no-undoc-members=""} Tick ::: ::: {.autoclass no-members="" no-undoc-members=""} XTick ::: ::: {.autoclass no-members="" no-undoc-members=""} YTick ::: ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Tick.get_loc Tick.get_pad Tick.get_tick_padding Tick.get_tickdir Tick.get_view_interval Tick.set_clip_path Tick.set_pad Tick.set_url Tick.update_position ::: --- # `matplotlib.backends.backend_agg` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_agg ::: --- # `matplotlib.backend_bases` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backend_bases ::: --- # `matplotlib.backends.backend_cairo` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_cairo ::: --- # `matplotlib.backends.backend_gtk3agg`, `matplotlib.backends.backend_gtk3cairo` **NOTE** These `backends`{.interpreted-text role="ref"} are not documented here, to avoid adding a dependency to building the docs. ::: redirect-from /api/backend_gtk3agg_api ::: ::: redirect-from /api/backend_gtk3cairo_api ::: ::: module matplotlib.backends.backend_gtk3 ::: ::: module matplotlib.backends.backend_gtk3agg ::: ::: module matplotlib.backends.backend_gtk3cairo ::: --- # `matplotlib.backends.backend_gtk4agg`, `matplotlib.backends.backend_gtk4cairo` **NOTE** These `backends`{.interpreted-text role="ref"} are not documented here, to avoid adding a dependency to building the docs. ::: redirect-from /api/backend_gtk4agg_api ::: ::: redirect-from /api/backend_gtk4cairo_api ::: ::: module matplotlib.backends.backend_gtk4 ::: ::: module matplotlib.backends.backend_gtk4agg ::: ::: module matplotlib.backends.backend_gtk4cairo ::: --- # `matplotlib.backend_managers` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backend_managers ::: --- # `matplotlib.backends.backend_mixed` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_mixed ::: --- # `matplotlib.backends.backend_nbagg` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_nbagg ::: --- # `matplotlib.backends.backend_pdf` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_pdf ::: --- # `matplotlib.backends.backend_pgf` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_pgf ::: --- # `matplotlib.backends.backend_ps` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_ps ::: --- # `matplotlib.backends.backend_qtagg`, `matplotlib.backends.backend_qtcairo` **NOTE** These `backends`{.interpreted-text role="ref"} are not (auto) documented here, to avoid adding a dependency to building the docs. ::: redirect-from /api/backend_qt4agg_api ::: ::: redirect-from /api/backend_qt4cairo_api ::: ::: redirect-from /api/backend_qt5agg_api ::: ::: redirect-from /api/backend_qt5cairo_api ::: ::: module matplotlib.backends.qt_compat ::: ::: module matplotlib.backends.backend_qt ::: ::: module matplotlib.backends.backend_qtagg ::: ::: module matplotlib.backends.backend_qtcairo ::: ::: module matplotlib.backends.backend_qt5agg ::: ::: module matplotlib.backends.backend_qt5cairo ::: ## Qt Bindings {#QT_bindings} There are currently 2 actively supported Qt versions, Qt5 and Qt6, and two supported Python bindings per version \-- [PyQt5](https://www.riverbankcomputing.com/static/Docs/PyQt5/) and [PySide2](https://doc.qt.io/qtforpython-5/contents.html) for Qt5 and [PyQt6](https://www.riverbankcomputing.com/static/Docs/PyQt6/) and [PySide6](https://doc.qt.io/qtforpython/contents.html) for Qt6[^1]. Matplotlib\'s qtagg and qtcairo backends (`matplotlib.backends.backend_qtagg` and `matplotlib.backend.backend_qtcairo`) support all these bindings, with common parts factored out in the `matplotlib.backends.backend_qt` module. At runtime, these backends select the actual binding used as follows: 1. If a binding\'s `QtCore` subpackage is already imported, that binding is selected (the order for the check is `PyQt6`, `PySide6`, `PyQt5`, `PySide2`). 2. If the `QT_API`{.interpreted-text role="envvar"} environment variable is set to one of \"PyQt6\", \"PySide6\", \"PyQt5\", \"PySide2\" (case-insensitive), that binding is selected. (See also the documentation on `environment-variables`{.interpreted-text role="ref"}.) 3. Otherwise, the first available backend in the order `PyQt6`, `PySide6`, `PyQt5`, `PySide2` is selected. In the past, Matplotlib used to have separate backends for each version of Qt (e.g. qt4agg/`matplotlib.backends.backend_qt4agg` and qt5agg/`matplotlib.backends.backend_qt5agg`). This scheme was dropped when support for Qt6 was added. For back-compatibility, qt5agg/`backend_qt5agg` and qt5cairo/`backend_qt5cairo` remain available; selecting one of these backends forces the use of a Qt5 binding. Their use is discouraged and `backend_qtagg` or `backend_qtcairo` should be preferred instead. However, these modules will not be deprecated until we drop support for Qt5. While both PyQt and Qt for Python (aka PySide) closely mirror the underlying C++ API they are wrapping, they are not drop-in replacements for each other[^2]. To account for this, Matplotlib has an internal API compatibility layer in [matplotlib.backends.qt_compat]{.title-ref} which covers our needs. Despite being a public module, we do not consider this to be a stable user-facing API and it may change without warning[^3]. [^1]: There is also [PyQt4](https://www.riverbankcomputing.com/static/Docs/PyQt4/) and [PySide](https://srinikom.github.io/pyside-docs/) for Qt4 but these are no longer supported by Matplotlib and upstream support for Qt4 ended in 2015. [^2]: Despite the slight API differences, the more important distinction between the PyQt and Qt for Python series of bindings is licensing. [^3]: If you are looking for a general purpose compatibility library please see [qtpy](https://github.com/spyder-ide/qtpy). --- # `matplotlib.backends.registry` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.registry ::: --- # `matplotlib.backends.backend_svg` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_svg ::: --- # `matplotlib.backends.backend_template` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_template ::: --- # `matplotlib.backends.backend_tkagg`, `matplotlib.backends.backend_tkcairo` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_tkagg ::: ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_tkcairo ::: --- # `matplotlib.backend_tools` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backend_tools ::: --- # `matplotlib.backends.backend_webagg` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_webagg ::: --- # `matplotlib.backends.backend_webagg_core` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.backends.backend_webagg_core ::: --- # `matplotlib.backends.backend_wxagg`, `matplotlib.backends.backend_wxcairo` **NOTE** These `backends`{.interpreted-text role="ref"} are not documented here, to avoid adding a dependency to building the docs. ::: redirect-from /api/backend_wxagg_api ::: ::: module matplotlib.backends.backend_wx ::: ::: module matplotlib.backends.backend_wxagg ::: ::: module matplotlib.backends.backend_wxcairo ::: --- # `matplotlib.bezier` ::: {.automodule members="" undoc-members="" special-members="__call__" show-inheritance=""} matplotlib.bezier ::: --- # `matplotlib.category` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.category ::: --- # `matplotlib.cbook` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.cbook ::: --- # `matplotlib.cm` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.cm ::: --- # `matplotlib.collections` ::: {.inheritance-diagram parts="2" private-bases=""} matplotlib.collections ::: ::: {.automodule members="" undoc-members="" show-inheritance="" inherited-members=""} matplotlib.collections ::: ::: {.autoclass no-members="" members="get_sizes, set_sizes" class-doc-from="class"} \_CollectionWithSizes ::: ::: {.autoclass no-members="" members="set_array" class-doc-from="class"} \_MeshData ::: --- # `matplotlib.colorbar` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.colorbar ::: --- # `matplotlib.colorizer` ::: {.automodule members="" undoc-members="" show-inheritance="" private-members="_ColorizerInterface, _ScalarMappable"} matplotlib.colorizer ::: --- # `matplotlib.colors` ::: note ::: title Note ::: The Color `tutorials `{.interpreted-text role="ref"} and `examples `{.interpreted-text role="ref"} demonstrate how to set colors and colormaps. You may want to read those instead. ::: ::: currentmodule matplotlib.colors ::: ::: {.automodule no-members="" no-inherited-members=""} matplotlib.colors ::: ## Color norms ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} Norm Normalize NoNorm AsinhNorm BoundaryNorm CenteredNorm FuncNorm LogNorm PowerNorm SymLogNorm TwoSlopeNorm MultiNorm ::: ## Univariate Colormaps ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} Colormap LinearSegmentedColormap ListedColormap ::: ## Multivariate Colormaps ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} BivarColormap SegmentedBivarColormap BivarColormapFromImage ::: ## Other classes ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} ColorSequenceRegistry LightSource ::: ## Functions ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} from_levels_and_colors hsv_to_rgb rgb_to_hsv to_hex to_rgb to_rgba to_rgba_array is_color_like same_color get_named_colors_mapping make_norm_from_scale ::: ## Exported colors The data used to populate the `/gallery/color/named_colors`{.interpreted-text role="doc"} are exposed as dictionaries that map color names to hex strings. --- # `matplotlib.container` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.container ::: --- # `matplotlib.contour` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.contour ::: --- # `matplotlib.dates` ::: {.inheritance-diagram parts="1" top-classes="matplotlib.ticker.Formatter, matplotlib.ticker.Locator"} matplotlib.dates ::: ::: {.automodule members="" undoc-members="" exclude-members="rrule" show-inheritance=""} matplotlib.dates ::: --- # `matplotlib.dviread` ::: {.automodule members="" undoc-members="" exclude-members="Page, Text, Box" show-inheritance=""} matplotlib.dviread ::: --- # `matplotlib.figure` ::: currentmodule matplotlib.figure ::: ::: {.automodule no-members="" no-undoc-members=""} matplotlib.figure ::: ## Figure ### Figure class ::: {.autosummary toctree="_as_gen" template="autosummary_class_only.rst" nosignatures=""} Figure ::: ### Adding Axes and SubFigures ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.add_axes Figure.add_subplot Figure.subplots Figure.subplot_mosaic Figure.add_gridspec Figure.get_axes Figure.axes Figure.delaxes Figure.subfigures Figure.add_subfigure ::: ### Saving ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.savefig ::: ### Annotating ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.colorbar Figure.legend Figure.text Figure.suptitle Figure.get_suptitle Figure.supxlabel Figure.get_supxlabel Figure.supylabel Figure.get_supylabel Figure.align_labels Figure.align_xlabels Figure.align_ylabels Figure.align_titles Figure.autofmt_xdate ::: ### Figure geometry ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.set_size_inches Figure.get_size_inches Figure.set_figheight Figure.get_figheight Figure.set_figwidth Figure.get_figwidth Figure.dpi Figure.set_dpi Figure.get_dpi ::: ### Subplot layout ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.subplots_adjust Figure.set_layout_engine Figure.get_layout_engine ::: #### Discouraged or deprecated ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.tight_layout Figure.set_tight_layout Figure.get_tight_layout Figure.set_constrained_layout Figure.get_constrained_layout Figure.set_constrained_layout_pads Figure.get_constrained_layout_pads ::: ### Interactive ::: seealso - `event-handling`{.interpreted-text role="ref"} ::: ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.ginput Figure.add_axobserver Figure.waitforbuttonpress Figure.pick ::: ### Modifying appearance ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.set_frameon Figure.get_frameon Figure.set_linewidth Figure.get_linewidth Figure.set_facecolor Figure.get_facecolor Figure.set_edgecolor Figure.get_edgecolor ::: ### Adding and getting Artists ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.add_artist Figure.get_children Figure.figimage ::: ### Getting and modifying state ::: seealso - `interactive_figures`{.interpreted-text role="ref"} ::: ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} Figure.clear Figure.gca Figure.sca Figure.get_tightbbox Figure.get_window_extent Figure.show Figure.set_canvas Figure.draw Figure.draw_without_rendering Figure.draw_artist ::: ## SubFigure {#figure-api-subfigure} Matplotlib has the concept of a [\~.SubFigure]{.title-ref}, which is a logical figure inside a parent [\~.Figure]{.title-ref}. It has many of the same methods as the parent. See `nested_axes_layouts`{.interpreted-text role="ref"}. ::: plot fig = plt.figure(layout=\'constrained\', figsize=(4, 2.5), facecolor=\'lightgoldenrodyellow\') \# Make two subfigures, left ones more narrow than right ones: sfigs = fig.subfigures(1, 2, width_ratios=\[0.8, 1\]) sfigs\[0\].set_facecolor(\'khaki\') sfigs\[1\].set_facecolor(\'lightsalmon\') \# Add subplots to left subfigure: lax = sfigs\[0\].subplots(2, 1) sfigs\[0\].suptitle(\'Left subfigure\') \# Add subplots to right subfigure: rax = sfigs\[1\].subplots(1, 2) sfigs\[1\].suptitle(\'Right subfigure\') \# suptitle for the main figure: fig.suptitle(\'Figure\') ::: ### SubFigure class ::: {.autosummary toctree="_as_gen" template="autosummary_class_only.rst" nosignatures=""} SubFigure ::: ### Adding Axes and SubFigures ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} SubFigure.add_axes SubFigure.add_subplot SubFigure.subplots SubFigure.subplot_mosaic SubFigure.add_gridspec SubFigure.delaxes SubFigure.add_subfigure SubFigure.subfigures ::: ### Annotating ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} SubFigure.colorbar SubFigure.legend SubFigure.text SubFigure.suptitle SubFigure.get_suptitle SubFigure.supxlabel SubFigure.get_supxlabel SubFigure.supylabel SubFigure.get_supylabel SubFigure.align_labels SubFigure.align_xlabels SubFigure.align_ylabels SubFigure.align_titles ::: ### Adding and getting Artists ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} SubFigure.add_artist SubFigure.get_children ::: ### Modifying appearance ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} SubFigure.set_frameon SubFigure.get_frameon SubFigure.set_linewidth SubFigure.get_linewidth SubFigure.set_facecolor SubFigure.get_facecolor SubFigure.set_edgecolor SubFigure.get_edgecolor ::: ### Passthroughs ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} SubFigure.set_dpi SubFigure.get_dpi ::: ## FigureBase parent class ::: autoclass FigureBase ::: ## Helper functions ::: autofunction figaspect ::: --- # `matplotlib.font_manager` ::: {.automodule members="" exclude-members="FontEntry" undoc-members="" show-inheritance=""} matplotlib.font_manager ::: ::: data fontManager The global instance of [FontManager]{.title-ref}. ::: ::: {.autoclass no-undoc-members=""} FontEntry ::: --- # `matplotlib.ft2font` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.ft2font ::: --- # `matplotlib.gridspec` ::: currentmodule matplotlib.gridspec ::: ::: {.automodule no-members="" no-inherited-members=""} matplotlib.gridspec ::: ## Classes ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} GridSpec SubplotSpec GridSpecBase GridSpecFromSubplotSpec SubplotParams ::: --- # `matplotlib.hatch` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.hatch ::: --- # `matplotlib.image` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.image ::: --- # API Reference ## Matplotlib interfaces Matplotlib has two interfaces. See `api_interfaces`{.interpreted-text role="ref"} for a more detailed description of both and their recommended use cases. ::: {.grid padding="0" gutter="2"} 1 1 2 2 ::: {.grid-item-card shadow="none" class-footer="api-interface-footer"} **Axes interface** (object-based, explicit) create a [.Figure]{.title-ref} and one or more [\~.axes.Axes]{.title-ref} objects, then *explicitly* use methods on these objects to add data, configure limits, set labels etc. ------------------------------------------------------------------------ API: - \`\~.pyplot.subplots\`: create Figure and Axes - `~matplotlib.axes`{.interpreted-text role="mod"}: add data, limits, labels etc. - \`.Figure\`: for figure-level methods ------------------------------------------------------------------------ Example: ``` {.python .api-interface-example} fig, ax = plt.subplots() ax.plot(x, y) ax.set_title("Sample plot") plt.show() ``` ::: ::: {.grid-item-card shadow="none" class-footer="api-interface-footer"} **pyplot interface** (function-based, implicit) consists of functions in the [.pyplot]{.title-ref} module. Figure and Axes are manipulated through these functions and are only *implicitly* present in the background. ------------------------------------------------------------------------ API: - [matplotlib.pyplot]{.title-ref} ------------------------------------------------------------------------ Example: ``` {.python .api-interface-example} plt.plot(x, y) plt.title("Sample plot") plt.show() ``` ::: ::: ## Modules {#api-index} Alphabetical list of modules: ::: {.toctree maxdepth="1"} matplotlib_configuration_api.rst animation_api.rst artist_api.rst axes_api.rst axis_api.rst backend_bases_api.rst backend_managers_api.rst backend_tools_api.rst index_backend_api.rst bezier_api.rst category_api.rst cbook_api.rst cm_api.rst collections_api.rst colorbar_api.rst colorizer_api.rst colors_api.rst container_api.rst contour_api.rst dates_api.rst dviread.rst figure_api.rst font_manager_api.rst ft2font.rst gridspec_api.rst hatch_api.rst image_api.rst inset_api.rst layout_engine_api.rst legend_api.rst legend_handler_api.rst lines_api.rst markers_api.rst mathtext_api.rst mlab_api.rst offsetbox_api.rst patches_api.rst path_api.rst patheffects_api.rst pyplot_summary.rst projections_api.rst quiver_api.rst rcsetup_api.rst sankey_api.rst scale_api.rst sphinxext_mathmpl_api.rst sphinxext_plot_directive_api.rst sphinxext_figmpl_directive_api.rst sphinxext_roles.rst spines_api.rst style_api.rst table_api.rst testing_api.rst text_api.rst texmanager_api.rst ticker_api.rst transformations.rst tri_api.rst typing_api.rst units_api.rst widgets_api.rst \_afm_api.rst \_api_api.rst \_docstring_api.rst \_enums_api.rst \_type1font.rst \_tight_bbox_api.rst \_tight_layout_api.rst toolkits/mplot3d.rst toolkits/axes_grid1.rst toolkits/axisartist.rst pylab.rst ::: --- # `matplotlib.backends` ::: module matplotlib.backends ::: ::: {.toctree maxdepth="1"} backend_mixed_api.rst backend_template_api.rst backend_agg_api.rst backend_cairo_api.rst backend_gtk3_api.rst backend_gtk4_api.rst backend_nbagg_api.rst backend_pdf_api.rst backend_pgf_api.rst backend_ps_api.rst backend_registry_api.rst backend_qt_api.rst backend_svg_api.rst backend_tk_api.rst backend_webagg_core_api.rst backend_webagg_api.rst backend_wx_api.rst ::: --- # `matplotlib.inset` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.inset ::: --- # `matplotlib.layout_engine` ::: currentmodule matplotlib.layout_engine ::: ::: {.automodule members="" inherited-members=""} matplotlib.layout_engine ::: --- # `matplotlib.legend` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.legend ::: --- # `matplotlib.legend_handler` ::: {.automodule members="" undoc-members=""} matplotlib.legend_handler ::: --- # `matplotlib.lines` ::: currentmodule matplotlib.lines ::: ::: {.automodule no-members="" no-inherited-members=""} matplotlib.lines ::: ## Classes ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} Line2D VertexSelector AxLine ::: ## Functions ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} segment_hits ::: --- # `matplotlib.markers` ::: currentmodule matplotlib.markers ::: ::: {.automodule no-members="" no-inherited-members=""} matplotlib.markers ::: ## Classes ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} MarkerStyle ::: --- # `matplotlib.mathtext` ::: {.inheritance-diagram parts="1"} matplotlib.mathtext ::: ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.mathtext ::: --- # `matplotlib` ::: {.automodule no-members="" no-undoc-members="" noindex=""} matplotlib ::: ## Backend management ::: autofunction use ::: ::: autofunction get_backend ::: ::: autofunction interactive ::: ::: autofunction is_interactive ::: ## Default values and styling > An instance of [RcParams]{.title-ref} for handling default Matplotlib > values. ::: {.autoclass no-members=""} RcParams ::: automethod find_all ::: ::: automethod copy ::: ::: ::: autofunction rc_context ::: ::: autofunction rc ::: ::: autofunction rcdefaults ::: ::: autofunction rc_file_defaults ::: ::: autofunction rc_file ::: ::: autofunction rc_params ::: ::: autofunction rc_params_from_file ::: ::: autofunction get_configdir ::: ::: autofunction matplotlib_fname ::: ::: autofunction get_data_path ::: ## Logging ::: autofunction set_loglevel ::: ## Colormaps and color sequences ::: {.autodata no-value=""} colormaps ::: ::: {.autodata no-value=""} color_sequences ::: ## Miscellaneous ::: autoclass MatplotlibDeprecationWarning ::: ::: autofunction get_cachedir ::: --- # `matplotlib.mlab` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.mlab ::: --- # Behavior change template Enter description here\.... Please rename file with PR number and your initials i.e. \"99999-ABC.rst\" and `git add` the new file. --- # *alpha* parameter handling on images When passing and array to `imshow(..., alpha=...)`, the parameter was silently ignored if the image data was a RGB or RBGA image or if `interpolation_state`{.interpreted-text role="rc"} resolved to \"rbga\". This is now fixed, and the alpha array overwrites any previous transparency information. --- # Minor log tick labels are set depending on number of major log ticks, not on number of decades spanned Previously, by default, on a log-scaled axis, the minor ticks would be unlabeled if the axis limits spanned more than one decade. The meaning of the `minor_thresholds` parameter to [.LogFormatter]{.title-ref} has been altered so that the decision of whether to label the minor ticks is now based on the number of major ticks drawn within the axis limits. For example, for an axis spanning from 4 to 60 (with thus a single major log tick, at 10), minor ticks are now labeled, even though the axis spans more than one decade. --- # Setting titles of figures using webagg backend Previously when using the `webagg` backend the title of a figure was set using `figure.set_label`. Now it is set using `figure.canvas.manager.set_window_title` which is more consistent with other backends. --- # `matplotlib.testing.check_figures_equal` defaults to PNG only In most cases, checking that figures are equal with [.check_figures_equal]{.title-ref} does not depend on the file format. Consequently, the *extensions* parameter now defaults to `['png']` instead of `['png', 'pdf', 'svg']`, reducing default test requirements. --- # Mixing positional and keyword arguments for `legend` handles and labels\... \... is no longer valid. If passing *handles* and *labels* to `legend`, they must now be passed either both positionally or both as keywords. # Legend labels for `plot` Previously if a sequence was passed to the *label* parameter of [\~.Axes.plot]{.title-ref} when plotting a single dataset, the sequence was automatically cast to string for the legend label. Now, if the sequence length is not one an error is raised. To keep the old behavior, cast the sequence to string before passing. --- # `Axes.add_collection(..., autolim=True)` updates view limits `Axes.add_collection(..., autolim=True)` has so far only updated the data limits. Users needed to additionally call [.Axes.autoscale_view]{.title-ref} to update the view limits. View limits are now updated as well if `autolim=True`, using a lazy internal update mechanism, so that the costs only apply once also if you add multiple collections. --- # `font_manager.findfont` logs if selected font weight does not match requested --- # Default name of `ListedColormap` The default name of [.ListedColormap]{.title-ref} has changed from \"from_list\" to \"unnamed\". --- # hist2d no longer forces axes limits Previously, [.Axes.hist2d]{.title-ref} would force the axes x and y limits to the extents of the histogrammed data, ignoring any other artists. [.Axes.hist2d]{.title-ref} now behaves similarly to \`.Axes.imshow\`: axes limits are updated to fit the data, but autoscaling is not otherwise disabled. --- # Template for deprecations Add description here\... Please rename file with PR number and your initials i.e. \"99999-ABC.rst\" and `git add` the new file. --- # `GridFinder.transform_xy` and `GridFinder.inv_transform_xy` \... are deprecated. Directly use the standard transform returned by [.GridFinder.get_transform]{.title-ref} instead. --- # `axes_grid.Grid.ngrids` This attribute has been deprecated and renamed `n_axes`, consistently with the new name of the [\~.axes_grid.Grid]{.title-ref} constructor parameter that allows setting the actual number of axes in the grid (the old parameter, `ngrids`, did not actually work since Matplotlib 3.3). The same change has been made in `axes_grid.ImageGrid`. --- # `violinplot` and `violin` *vert* parameter The parameter *vert: bool* has been deprecated on [\~.Axes.violinplot]{.title-ref} and [\~.Axes.violin]{.title-ref}. It will be replaced by *orientation: {\"vertical\", \"horizontal\"}* for API consistency. --- # `boxplot` and `bxp` *vert* parameter, and `rcParams["boxplot.vertical"]` The parameter *vert: bool* has been deprecated on [\~.Axes.boxplot]{.title-ref} and [\~.Axes.bxp]{.title-ref}. It is replaced by *orientation: {\"vertical\", \"horizontal\"}* for API consistency. `rcParams["boxplot.vertical"]`, which controlled the orientation of `boxplot`, is deprecated without replacement. --- # Parameter `ListedColormap(..., N=...)` Passing the parameter *N* to [.ListedColormap]{.title-ref} is deprecated. Please preprocess the list colors yourself if needed. --- # 3rd party scales do not need to have an *axis* parameter anymore Since matplotlib 3.1 [PR 12831](https://github.com/matplotlib/matplotlib/pull/12831) scale objects should be reusable and therefore independent of any particular Axis. Therefore, the use of the *axis* parameter in the `__init__` had been discouraged. However, having that parameter in the signature was still necessary for API backwards-compatibility. This is no longer the case. [.register_scale]{.title-ref} now accepts scale classes with or without this parameter. The *axis* parameter is pending-deprecated. It will be deprecated in matplotlib 3.13, and removed in matplotlib 3.15. 3rd-party scales are recommended to remove the *axis* parameter now if they can afford to restrict compatibility to matplotlib \>= 3.11 already. Otherwise, they may keep the *axis* parameter and remove it in time for matplotlib 3.13. --- # Capitalization of None in matplotlibrc In `matplotlibrc`{.interpreted-text role="file"} config files every capitalization of None was accepted for denoting the Python constant [None]{.title-ref}. This is deprecated. The only accepted capitalization is now None, i.e. starting with a capital letter and all other letters in lowercase. --- # `DviFont.widths` \... is deprecated with no replacement. # Direct access to `Tfm`\'s `widths`, `heights`, `depths` dicts \... is deprecated; access a glyph\'s metrics with [.Tfm.get_metrics]{.title-ref} instead. --- # Increase to minimum supported versions of dependencies For Matplotlib 3.11, the `minimum supported versions `{.interpreted-text role="ref"} are being bumped: +------------+-----------------+----------------+ | Dependency | > min in | min in mpl3.11 | | | > mpl3.10 | | +============+=================+================+ | > Python | > 3.10 1.23 | > 3.11 1.25 | | > NumPy | | | +------------+-----------------+----------------+ This is consistent with our `min_deps_policy`{.interpreted-text role="ref"} and [SPEC0](https://scientific-python.org/specs/spec-0000/) --- # `testing.widgets.mock_event` and `testing.widgets.do_event` \... are deprecated. Directly construct Event objects (typically [.MouseEvent]{.title-ref} or [.KeyEvent]{.title-ref}) and pass them to `canvas.callbacks.process()` instead. --- # `PdfFile.fontNames`, `PdfFile.dviFontInfo`, `PdfFile.type1Descriptors` \... are deprecated with no replacement. --- # `FT2Image` \... is deprecated. Use 2D uint8 ndarrays instead. In particular: - The `FT2Image` constructor took `width, height` as separate parameters but the ndarray constructor takes `(height, width)` as single tuple parameter. - [.FT2Font.draw_glyph_to_bitmap]{.title-ref} now (also) takes 2D uint8 arrays as input. - `FT2Image.draw_rect_filled` should be replaced by directly setting pixel values to black. - The `image` attribute of the object returned by `MathTextParser("agg").parse` is now a 2D uint8 array. --- # `BezierSegment.point_at_t` \... is deprecated. Instead, it is possible to call the BezierSegment with an argument. --- # *fontfile* parameter of `PdfFile.createType1Descriptor` This parameter is deprecated; all relevant pieces of information are now directly extracted from the *t1font* argument. --- # `matplotlib.style.core` The `matplotlib.style.core` module is deprecated. All APIs intended for public use are now available in [matplotlib.style]{.title-ref} directly (including `USER_LIBRARY_PATHS`, which was previously not reexported). The following APIs of `matplotlib.style.core` have been deprecated with no replacement: `BASE_LIBRARY_PATH`, `STYLE_EXTENSION`, `STYLE_BLACKLIST`, `update_user_library`, `read_style_directory`, `update_nested_dict`. --- # `Axes.set_navigate_mode` is deprecated \... with no replacement. --- # Parameters `Axes3D.set_aspect(..., anchor=..., share=...)` The parameters *anchor* and *share* of [.Axes3D.set_aspect]{.title-ref} are deprecated. They had no effect on 3D axes and will be removed in a future version. --- # `GridFinder.get_grid_info` now takes a single bbox as parameter Passing `x1, y1, x2, y2` as separate parameters is deprecated. --- # The *axes* parameter of `RadialLocator` \... is deprecated. [\~.polar.RadialLocator]{.title-ref} now fetches the relevant information from the Axis\' parent Axes. --- # In-place modifications of colormaps Colormaps are planned to become immutable in the long term. As a first step, in-place modifications of colormaps are now pending-deprecated. This affects the following methods of \`.Colormap\`: - [.Colormap.set_bad]{.title-ref} - use `cmap.with_extremes(bad=...)` instead - [.Colormap.set_under]{.title-ref} - use `cmap.with_extremes(under=...)` instead - [.Colormap.set_over]{.title-ref} - use `cmap.with_extremes(over=...)` instead - [.Colormap.set_extremes]{.title-ref} - use `cmap.with_extremes(...)` instead Use the respective [.Colormap.with_extremes]{.title-ref} and appropriate keyword arguments instead which returns a copy of the colormap (available since matplotlib 3.4). Alternatively, if you create the colormap yourself, you can also pass the respective arguments to the constructor (available since matplotlib 3.11). --- # The *canvas* parameter to `MultiCursor` \... is deprecated. It has been unused for a while already. Please remove the parameter and change the call from `MultiCursor(canvas, axes)` to `MultiCursor(axes)`. Both calls are valid throughout the deprecation period. --- # Development change template Enter description here\.... Please rename file with PR number and your initials i.e. \"99999-ABC.rst\" and `git add` the new file. --- # New minimum version of pyparsing The minimum required version of `pyparsing` has been updated from 2.3.1 to 3.0.0. --- # Removal change template Enter description of methods/classes removed here\.... Please rename file with PR number and your initials i.e. \"99999-ABC.rst\" and `git add` the new file. --- # `plot_date` Use of `plot_date` has been discouraged since Matplotlib 3.5 and deprecated since 3.9. The `plot_date` function has now been removed. - `datetime`-like data should directly be plotted using [\~.Axes.plot]{.title-ref}. - If you need to plot plain numeric data as `date-format`{.interpreted-text role="ref"} or need to set a timezone, call `ax.xaxis.axis_date` / `ax.yaxis.axis_date` before [\~.Axes.plot]{.title-ref}. See [.Axis.axis_date]{.title-ref}. --- # `apply_theta_transforms` option in `PolarTransform` Applying theta transforms in [\~matplotlib.projections.polar.PolarTransform]{.title-ref} and [\~matplotlib.projections.polar.InvertedPolarTransform]{.title-ref} has been removed, and the `apply_theta_transforms` keyword argument removed from both classes. If you need to retain the behaviour where theta values are transformed, chain the `PolarTransform` with a [\~matplotlib.transforms.Affine2D]{.title-ref} transform that performs the theta shift and/or sign shift. --- # `matplotlib.cm.get_cmap` Colormaps are now available through the [.ColormapRegistry]{.title-ref} accessible via [matplotlib.colormaps]{.title-ref} or [matplotlib.pyplot.colormaps]{.title-ref}. If you have the name of a colormap as a string, you can use a direct lookup, `matplotlib.colormaps[name]` or `matplotlib.pyplot.colormaps[name]` . Alternatively, `matplotlib.colormaps.get_cmap` will maintain the existing behavior of additionally passing through [.Colormap]{.title-ref} instances and converting `None` to the default colormap. [matplotlib.pyplot.get_cmap]{.title-ref} will stay as a shortcut to `matplotlib.colormaps.get_cmap`. --- # `GridHelperCurveLinear.get_tick_iterator` \... is removed with no replacement. --- # *nth_coord* parameter to axisartist helpers for fixed axis Helper APIs in [.axisartist]{.title-ref} for generating a \"fixed\" axis on rectilinear axes ([.FixedAxisArtistHelperRectilinear]{.title-ref}) no longer take a *nth_coord* parameter. That parameter is entirely inferred from the (required) *loc* parameter. For curvilinear axes, the *nth_coord* parameter remains supported (it affects the *ticks*, not the axis position itself), but it is now keyword-only. --- # `TransformNode.is_bbox` \... is removed. Instead check the object using `isinstance(..., BboxBase)`. # `rcsetup.interactive_bk`, `rcsetup.non_interactive_bk` and `rcsetup.all_backends` \... are removed and replaced by `matplotlib.backends.backend_registry.list_builtin` with the following arguments - `matplotlib.backends.BackendFilter.INTERACTIVE` - `matplotlib.backends.BackendFilter.NON_INTERACTIVE` - `None` # `BboxTransformToMaxOnly` \... is removed. It can be replaced by `BboxTransformTo(LockableBbox(bbox, x0=0, y0=0))`. # *interval* parameter of `TimerBase.start` The timer interval parameter can no longer be set while starting it. The interval can be specified instead in the timer constructor, or by setting the timer.interval attribute. --- # Next API changes ::: ifconfig releaselevel == \'dev\' This page lists API changes for the next release. ## Behavior changes ::: {.toctree glob="" maxdepth="1"} next_api_changes/behavior/\* ::: ## Deprecations ::: {.toctree glob="" maxdepth="1"} next_api_changes/deprecations/\* ::: ## Removals ::: {.toctree glob="" maxdepth="1"} next_api_changes/removals/\* ::: ## Development changes ::: {.toctree glob="" maxdepth="1"} next_api_changes/development/\* ::: ::: --- # `matplotlib.offsetbox` ::: {.inheritance-diagram parts="1"} matplotlib.offsetbox ::: ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.offsetbox ::: --- # `matplotlib.patches` ::: {.inheritance-diagram parts="1"} matplotlib.patches ::: ::: {.automodule no-members="" no-inherited-members=""} matplotlib.patches ::: ## Classes ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} Annulus Arc Arrow ArrowStyle BoxStyle Circle CirclePolygon ConnectionPatch ConnectionStyle Ellipse FancyArrow FancyArrowPatch FancyBboxPatch Patch PathPatch StepPatch Polygon Rectangle RegularPolygon Shadow Wedge ::: ## Functions ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} bbox_artist draw_bbox ::: --- # `matplotlib.path` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.path ::: --- # `matplotlib.patheffects` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.patheffects ::: --- # Changes for 0.40 ``` text - Artist * __init__ takes a DPI instance and a Bound2D instance which is the bounding box of the artist in display coords * get_window_extent returns a Bound2D instance * set_size is removed; replaced by bbox and dpi * the clip_gc method is removed. Artists now clip themselves with their box * added _clipOn boolean attribute. If True, gc clip to bbox. - AxisTextBase * Initialized with a transx, transy which are Transform instances * set_drawing_area removed * get_left_right and get_top_bottom are replaced by get_window_extent - Line2D Patches now take transx, transy * Initialized with a transx, transy which are Transform instances - Patches * Initialized with a transx, transy which are Transform instances - FigureBase attributes dpi is a DPI instance rather than scalar and new attribute bbox is a Bound2D in display coords, and I got rid of the left, width, height, etc... attributes. These are now accessible as, for example, bbox.x.min is left, bbox.x.interval() is width, bbox.y.max is top, etc... - GcfBase attribute pagesize renamed to figsize - Axes * removed figbg attribute * added fig instance to __init__ * resizing is handled by figure call to resize. - Subplot * added fig instance to __init__ - Renderer methods for patches now take gcEdge and gcFace instances. gcFace=None takes the place of filled=False - True and False symbols provided by cbook in a python2.3 compatible way - new module transforms supplies Bound1D, Bound2D and Transform instances and more - Changes to the MATLAB helpers API * _matlab_helpers.GcfBase is renamed by Gcf. Backends no longer need to derive from this class. Instead, they provide a factory function new_figure_manager(num, figsize, dpi). The destroy method of the GcfDerived from the backends is moved to the derived FigureManager. * FigureManagerBase moved to backend_bases * Gcf.get_all_figwins renamed to Gcf.get_all_fig_managers Jeremy: Make sure to self._reset = False in AxisTextWX._set_font. This was something missing in my backend code. ``` --- # Changes for 0.42 ``` text * Refactoring AxisText to be backend independent. Text drawing and get_window_extent functionality will be moved to the Renderer. * backend_bases.AxisTextBase is now text.Text module * All the erase and reset functionality removed from AxisText - not needed with double buffered drawing. Ditto with state change. Text instances have a get_prop_tup method that returns a hashable tuple of text properties which you can use to see if text props have changed, e.g., by caching a font or layout instance in a dict with the prop tup as a key -- see RendererGTK.get_pango_layout in backend_gtk for an example. * Text._get_xy_display renamed Text.get_xy_display * Artist set_renderer and wash_brushes methods removed * Moved Legend class from matplotlib.axes into matplotlib.legend * Moved Tick, XTick, YTick, Axis, XAxis, YAxis from matplotlib.axes to matplotlib.axis * moved process_text_args to matplotlib.text * After getting Text handled in a backend independent fashion, the import process is much cleaner since there are no longer cyclic dependencies * matplotlib.matlab._get_current_fig_manager renamed to matplotlib.matlab.get_current_fig_manager to allow user access to the GUI window attribute, e.g., figManager.window for GTK and figManager.frame for wx ``` --- # Changes for 0.50 ``` text * refactored Figure class so it is no longer backend dependent. FigureCanvasBackend takes over the backend specific duties of the Figure. matplotlib.backend_bases.FigureBase moved to matplotlib.figure.Figure. * backends must implement FigureCanvasBackend (the thing that controls the figure and handles the events if any) and FigureManagerBackend (wraps the canvas and the window for MATLAB interface). FigureCanvasBase implements a backend switching mechanism * Figure is now an Artist (like everything else in the figure) and is totally backend independent * GDFONTPATH renamed to TTFPATH * backend faceColor argument changed to rgbFace * colormap stuff moved to colors.py * arg_to_rgb in backend_bases moved to class ColorConverter in colors.py * GD users must upgrade to gd-2.0.22 and gdmodule-0.52 since new gd features (clipping, antialiased lines) are now used. * Renderer must implement points_to_pixels Migrating code: MATLAB interface: The only API change for those using the MATLAB interface is in how you call figure redraws for dynamically updating figures. In the old API, you did fig.draw() In the new API, you do manager = get_current_fig_manager() manager.canvas.draw() See the examples system_monitor.py, dynamic_demo.py, and anim.py API There is one important API change for application developers. Figure instances used subclass GUI widgets that enabled them to be placed directly into figures. e.g., FigureGTK subclassed gtk.DrawingArea. Now the Figure class is independent of the backend, and FigureCanvas takes over the functionality formerly handled by Figure. In order to include figures into your apps, you now need to do, for example # gtk example fig = Figure(figsize=(5,4), dpi=100) canvas = FigureCanvasGTK(fig) # a gtk.DrawingArea canvas.show() vbox.pack_start(canvas) If you use the NavigationToolbar, this in now initialized with a FigureCanvas, not a Figure. The examples embedding_in_gtk.py, embedding_in_gtk2.py, and mpl_with_glade.py all reflect the new API so use these as a guide. All prior calls to figure.draw() and figure.print_figure(args) should now be canvas.draw() and canvas.print_figure(args) Apologies for the inconvenience. This refactorization brings significant more freedom in developing matplotlib and should bring better plotting capabilities, so I hope the inconvenience is worth it. ``` --- # Changes for 0.54.3 ``` text removed the set_default_font / get_default_font scheme from the font_manager to unify customization of font defaults with the rest of the rc scheme. See examples/font_properties_demo.py and help(rc) in matplotlib.matlab. ``` --- # Changes for 0.54 ## MATLAB interface ### dpi Several of the backends used a PIXELS_PER_INCH hack that I added to try and make images render consistently across backends. This just complicated matters. So you may find that some font sizes and line widths appear different than before. Apologies for the inconvenience. You should set the dpi to an accurate value for your screen to get true sizes. ### pcolor and scatter There are two changes to the MATLAB interface API, both involving the patch drawing commands. For efficiency, pcolor and scatter have been rewritten to use polygon collections, which are a new set of objects from matplotlib.collections designed to enable efficient handling of large collections of objects. These new collections make it possible to build large scatter plots or pcolor plots with no loops at the python level, and are significantly faster than their predecessors. The original pcolor and scatter functions are retained as pcolor_classic and scatter_classic. The return value from pcolor is a PolyCollection. Most of the properties that are available on rectangles or other patches are also available on PolyCollections, e.g., you can say: c = scatter(blah, blah) c.set_linewidth(1.0) c.set_facecolor('r') c.set_alpha(0.5) or: c = scatter(blah, blah) set(c, 'linewidth', 1.0, 'facecolor', 'r', 'alpha', 0.5) Because the collection is a single object, you no longer need to loop over the return value of scatter or pcolor to set properties for the entire list. If you want the different elements of a collection to vary on a property, e.g., to have different line widths, see matplotlib.collections for a discussion on how to set the properties as a sequence. For scatter, the size argument is now in points\^2 (the area of the symbol in points) as in MATLAB and is not in data coords as before. Using sizes in data coords caused several problems. So you will need to adjust your size arguments accordingly or use scatter_classic. ### mathtext spacing For reasons not clear to me (and which I\'ll eventually fix) spacing no longer works in font groups. However, I added three new spacing commands which compensate for this \'\' (regular space), \'/\' (small space) and \'hspace{frac}\' where frac is a fraction of fontsize in points. You will need to quote spaces in font strings, is: title(r'$\rm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$') ## Object interface - Application programmers ### Autoscaling The x and y axis instances no longer have autoscale view. These are handled by axes.autoscale_view ### Axes creation You should not instantiate your own Axes any more using the OO API. Rather, create a Figure as before and in place of: f = Figure(figsize=(5,4), dpi=100) a = Subplot(f, 111) f.add_axis(a) use: f = Figure(figsize=(5,4), dpi=100) a = f.add_subplot(111) That is, add_axis no longer exists and is replaced by: add_axes(rect, axisbg=defaultcolor, frameon=True) add_subplot(num, axisbg=defaultcolor, frameon=True) ### Artist methods If you define your own Artists, you need to rename the \_draw method to draw ### Bounding boxes matplotlib.transforms.Bound2D is replaced by matplotlib.transforms.Bbox. If you want to construct a bbox from left, bottom, width, height (the signature for Bound2D), use matplotlib.transforms.lbwh_to_bbox, as in: bbox = clickBBox = lbwh_to_bbox(left, bottom, width, height) The Bbox has a different API than the Bound2D. e.g., if you want to get the width and height of the bbox **OLD**: width = fig.bbox.x.interval() height = fig.bbox.y.interval() **NEW**: width = fig.bbox.width() height = fig.bbox.height() ### Object constructors You no longer pass the bbox, dpi, or transforms to the various Artist constructors. The old way or creating lines and rectangles was cumbersome because you had to pass so many attributes to the Line2D and Rectangle classes not related directly to the geometry and properties of the object. Now default values are added to the object when you call axes.add_line or axes.add_patch, so they are hidden from the user. If you want to define a custom transformation on these objects, call o.set_transform(trans) where trans is a Transformation instance. In prior versions of you wanted to add a custom line in data coords, you would have to do: l = Line2D(dpi, bbox, x, y, color = color, transx = transx, transy = transy, ) now all you need is: l = Line2D(x, y, color=color) and the axes will set the transformation for you (unless you have set your own already, in which case it will eave it unchanged) ### Transformations The entire transformation architecture has been rewritten. Previously the x and y transformations where stored in the xaxis and yaxis instances. The problem with this approach is it only allows for separable transforms (where the x and y transformations don\'t depend on one another). But for cases like polar, they do. Now transformations operate on x,y together. There is a new base class matplotlib.transforms.Transformation and two concrete implementations, matplotlib.transforms.SeparableTransformation and matplotlib.transforms.Affine. The SeparableTransformation is constructed with the bounding box of the input (this determines the rectangular coordinate system of the input, i.e., the x and y view limits), the bounding box of the display, and possibly nonlinear transformations of x and y. The 2 most frequently used transformations, data coordinates -\> display and axes coordinates -\> display are available as ax.transData and ax.transAxes. See alignment_demo.py which uses axes coords. Also, the transformations should be much faster now, for two reasons - they are written entirely in extension code - because they operate on x and y together, they can do the entire transformation in one loop. Earlier I did something along the lines of: xt = sx*func(x) + tx yt = sy*func(y) + ty Although this was done in numerix, it still involves 6 length(x) for-loops (the multiply, add, and function evaluation each for x and y). Now all of that is done in a single pass. If you are using transformations and bounding boxes to get the cursor position in data coordinates, the method calls are a little different now. See the updated examples/coords_demo.py which shows you how to do this. Likewise, if you are using the artist bounding boxes to pick items on the canvas with the GUI, the bbox methods are somewhat different. You will need to see the updated examples/object_picker.py. See unit/transforms_unit.py for many examples using the new transformations. --- # Changes for 0.60 ``` text ColormapJet and Grayscale are deprecated. For backwards compatibility, they can be obtained either by doing from matplotlib.cm import ColormapJet or from matplotlib.matlab import * They are replaced by cm.jet and cm.grey ``` --- # Changes for 0.61 ``` text canvas.connect is now deprecated for event handling. use mpl_connect and mpl_disconnect instead. The callback signature is func(event) rather than func(widget, event) ``` --- # Changes for 0.63 ``` text Dates are now represented internally as float days since 0001-01-01, UTC. All date tickers and formatters are now in matplotlib.dates, rather than matplotlib.tickers converters have been abolished from all functions and classes. num2date and date2num are now the converter functions for all date plots Most of the date tick locators have a different meaning in their constructors. In the prior implementation, the first argument was a base and multiples of the base were ticked. e.g., HourLocator(5) # old: tick every 5 minutes In the new implementation, the explicit points you want to tick are provided as a number or sequence HourLocator(range(0,5,61)) # new: tick every 5 minutes This gives much greater flexibility. I have tried to make the default constructors (no args) behave similarly, where possible. Note that YearLocator still works under the base/multiple scheme. The difference between the YearLocator and the other locators is that years are not recurrent. Financial functions: matplotlib.finance.quotes_historical_yahoo(ticker, date1, date2) date1, date2 are now datetime instances. Return value is a list of quotes where the quote time is a float - days since gregorian start, as returned by date2num See examples/finance_demo.py for example usage of new API ``` --- # Changes for 0.65.1 ``` text removed add_axes and add_subplot from backend_bases. Use figure.add_axes and add_subplot instead. The figure now manages the current axes with gca and sca for get and set current axes. If you have code you are porting which called, e.g., figmanager.add_axes, you can now simply do figmanager.canvas.figure.add_axes. ``` --- # Changes for 0.65 ``` text mpl_connect and mpl_disconnect in the MATLAB interface renamed to connect and disconnect Did away with the text methods for angle since they were ambiguous. fontangle could mean fontstyle (oblique, etc) or the rotation of the text. Use style and rotation instead. ``` --- # Changes for 0.70 ``` text MplEvent factored into a base class Event and derived classes MouseEvent and KeyEvent Removed defunct set_measurement in wx toolbar ``` --- # Changes for 0.71 ``` text Significant numerix namespace changes, introduced to resolve namespace clashes between python built-ins and mlab names. Refactored numerix to maintain separate modules, rather than folding all these names into a single namespace. See the following mailing list threads for more information and background http://sourceforge.net/mailarchive/forum.php?thread_id=6398890&forum_id=36187 http://sourceforge.net/mailarchive/forum.php?thread_id=6323208&forum_id=36187 OLD usage from matplotlib.numerix import array, mean, fft NEW usage from matplotlib.numerix import array from matplotlib.numerix.mlab import mean from matplotlib.numerix.fft import fft numerix dir structure mirrors numarray (though it is an incomplete implementation) numerix numerix/mlab numerix/linear_algebra numerix/fft numerix/random_array but of course you can use 'numerix : Numeric' and still get the symbols. pylab still imports most of the symbols from Numerix, MLab, fft, etc, but is more cautious. For names that clash with python names (min, max, sum), pylab keeps the builtins and provides the numeric versions with an a* prefix, e.g., (amin, amax, asum) ``` --- # Changes for 0.72 ``` text - Line2D, Text, and Patch copy_properties renamed update_from and moved into artist base class - LineCollections.color renamed to LineCollections.set_color for consistency with set/get introspection mechanism, - pylab figure now defaults to num=None, which creates a new figure with a guaranteed unique number - contour method syntax changed - now it is MATLAB compatible unchanged: contour(Z) old: contour(Z, x=Y, y=Y) new: contour(X, Y, Z) see http://matplotlib.sf.net/matplotlib.pylab.html#-contour - Increased the default resolution for save command. - Renamed the base attribute of the ticker classes to _base to avoid conflict with the base method. Sitt for subs - subs=none now does autosubbing in the tick locator. - New subplots that overlap old will delete the old axes. If you do not want this behavior, use fig.add_subplot or the axes command ``` --- # Changes for 0.73 ``` text - Removed deprecated ColormapJet and friends - Removed all error handling from the verbose object - figure num of zero is now allowed ``` --- # Changes for 0.80 ``` text - xlim/ylim/axis always return the new limits regardless of arguments. They now take kwargs which allow you to selectively change the upper or lower limits while leaving unnamed limits unchanged. See help(xlim) for example ``` --- # Changes for 0.81 ``` text - pylab and artist "set" functions renamed to setp to avoid clash with python2.4 built-in set. Current version will issue a deprecation warning which will be removed in future versions - imshow interpolation arguments changes for advanced interpolation schemes. See help imshow, particularly the interpolation, filternorm and filterrad kwargs - Support for masked arrays has been added to the plot command and to the Line2D object. Only the valid points are plotted. A "valid_only" kwarg was added to the get_xdata() and get_ydata() methods of Line2D; by default it is False, so that the original data arrays are returned. Setting it to True returns the plottable points. - contour changes: Masked arrays: contour and contourf now accept masked arrays as the variable to be contoured. Masking works correctly for contour, but a bug remains to be fixed before it will work for contourf. The "badmask" kwarg has been removed from both functions. Level argument changes: Old version: a list of levels as one of the positional arguments specified the lower bound of each filled region; the upper bound of the last region was taken as a very large number. Hence, it was not possible to specify that z values between 0 and 1, for example, be filled, and that values outside that range remain unfilled. New version: a list of N levels is taken as specifying the boundaries of N-1 z ranges. Now the user has more control over what is colored and what is not. Repeated calls to contourf (with different colormaps or color specifications, for example) can be used to color different ranges of z. Values of z outside an expected range are left uncolored. Example: Old: contourf(z, [0, 1, 2]) would yield 3 regions: 0-1, 1-2, and >2. New: it would yield 2 regions: 0-1, 1-2. If the same 3 regions were desired, the equivalent list of levels would be [0, 1, 2, 1e38]. ``` --- # Changes for 0.82 ``` text - toolbar import change in GTKAgg, GTKCairo and WXAgg - Added subplot config tool to GTK* backends -- note you must now import the NavigationToolbar2 from your backend of choice rather than from backend_gtk because it needs to know about the backend specific canvas -- see examples/embedding_in_gtk2.py. Ditto for wx backend -- see examples/embedding_in_wxagg.py - hist bin change Sean Richards notes there was a problem in the way we created the binning for histogram, which made the last bin underrepresented. From his post: I see that hist uses the linspace function to create the bins and then uses searchsorted to put the values in their correct bin. That's all good but I am confused over the use of linspace for the bin creation. I wouldn't have thought that it does what is needed, to quote the docstring it creates a "Linear spaced array from min to max". For it to work correctly shouldn't the values in the bins array be the same bound for each bin? (i.e. each value should be the lower bound of a bin). To provide the correct bins for hist would it not be something like def bins(xmin, xmax, N): if N==1: return xmax dx = (xmax-xmin)/N # instead of N-1 return xmin + dx*arange(N) This suggestion is implemented in 0.81. My test script with these changes does not reveal any bias in the binning from matplotlib.numerix.mlab import randn, rand, zeros, Float from matplotlib.mlab import hist, mean Nbins = 50 Ntests = 200 results = zeros((Ntests,Nbins), typecode=Float) for i in range(Ntests): print 'computing', i x = rand(10000) n, bins = hist(x, Nbins) results[i] = n print mean(results) ``` --- # Changes for 0.83 ``` text - Made HOME/.matplotlib the new config dir where the matplotlibrc file, the ttf.cache, and the tex.cache live. The new default filenames in .matplotlib have no leading dot and are not hidden. e.g., the new names are matplotlibrc, tex.cache, and ttffont.cache. This is how ipython does it so it must be right. If old files are found, a warning is issued and they are moved to the new location. - backends/__init__.py no longer imports new_figure_manager, draw_if_interactive and show from the default backend, but puts these imports into a call to pylab_setup. Also, the Toolbar is no longer imported from WX/WXAgg. New usage: from backends import pylab_setup new_figure_manager, draw_if_interactive, show = pylab_setup() - Moved Figure.get_width_height() to FigureCanvasBase. It now returns int instead of float. ``` --- # Changes for 0.84 ``` text Unified argument handling between hlines and vlines. Both now take optionally a fmt argument (as in plot) and a keyword args that can be passed onto Line2D. Removed all references to "data clipping" in rc and lines.py since these were not used and not optimized. I'm sure they'll be resurrected later with a better implementation when needed. 'set' removed - no more deprecation warnings. Use 'setp' instead. Backend developers: Added flipud method to image and removed it from to_str. Removed origin kwarg from backend.draw_image. origin is handled entirely by the frontend now. ``` --- # Changes for 0.85 ``` text Made xtick and ytick separate props in rc made pos=None the default for tick formatters rather than 0 to indicate "not supplied" Removed "feature" of minor ticks which prevents them from overlapping major ticks. Often you want major and minor ticks at the same place, and can offset the major ticks with the pad. This could be made configurable Changed the internal structure of contour.py to a more OO style. Calls to contour or contourf in axes.py or pylab.py now return a ContourSet object which contains references to the LineCollections or PolyCollections created by the call, as well as the configuration variables that were used. The ContourSet object is a "mappable" if a colormap was used. Added a clip_ends kwarg to contourf. From the docstring: * clip_ends = True If False, the limits for color scaling are set to the minimum and maximum contour levels. True (default) clips the scaling limits. Example: if the contour boundaries are V = [-100, 2, 1, 0, 1, 2, 100], then the scaling limits will be [-100, 100] if clip_ends is False, and [-3, 3] if clip_ends is True. Added kwargs linewidths, antialiased, and nchunk to contourf. These are experimental; see the docstring. Changed Figure.colorbar(): kw argument order changed; if mappable arg is a non-filled ContourSet, colorbar() shows lines instead hof polygons. if mappable arg is a filled ContourSet with clip_ends=True, the endpoints are not labelled, so as to give the correct impression of open-endedness. Changed LineCollection.get_linewidths to get_linewidth, for consistency. ``` --- # Changes for 0.86 ``` text Matplotlib data is installed into the matplotlib module. This is similar to package_data. This should get rid of having to check for many possibilities in _get_data_path(). The MATPLOTLIBDATA env key is still checked first to allow for flexibility. 1) Separated the color table data from cm.py out into a new file, _cm.py, to make it easier to find the actual code in cm.py and to add new colormaps. Everything from _cm.py is imported by cm.py, so the split should be transparent. 2) Enabled automatic generation of a colormap from a list of colors in contour; see modified examples/contour_demo.py. 3) Support for imshow of a masked array, with the ability to specify colors (or no color at all) for masked regions, and for regions that are above or below the normally mapped region. See examples/image_masked.py. 4) In support of the above, added two new classes, ListedColormap, and no_norm, to colors.py, and modified the Colormap class to include common functionality. Added a clip kwarg to the normalize class. ``` --- # Changes for 0.87.7 ``` text Completely reworked the annotations API because I found the old API cumbersome. The new design is much more legible and easy to read. See matplotlib.text.Annotation and examples/annotation_demo.py markeredgecolor and markerfacecolor cannot be configured in matplotlibrc any more. Instead, markers are generally colored automatically based on the color of the line, unless marker colors are explicitly set as kwargs - NN Changed default comment character for load to '#' - JDH math_parse_s_ft2font_svg from mathtext.py & mathtext2.py now returns width, height, svg_elements. svg_elements is an instance of Bunch ( cmbook.py) and has the attributes svg_glyphs and svg_lines, which are both lists. Renderer.draw_arc now takes an additional parameter, rotation. It specifies to draw the artist rotated in degrees anti- clockwise. It was added for rotated ellipses. Renamed Figure.set_figsize_inches to Figure.set_size_inches to better match the get method, Figure.get_size_inches. Removed the copy_bbox_transform from transforms.py; added shallowcopy methods to all transforms. All transforms already had deepcopy methods. FigureManager.resize(width, height): resize the window specified in pixels barh: x and y args have been renamed to width and bottom respectively, and their order has been swapped to maintain a (position, value) order. bar and barh: now accept kwarg 'edgecolor'. bar and barh: The left, height, width and bottom args can now all be scalars or sequences; see docstring. barh: now defaults to edge aligned instead of center aligned bars bar, barh and hist: Added a keyword arg 'align' that controls between edge or center bar alignment. Collections: PolyCollection and LineCollection now accept vertices or segments either in the original form [(x,y), (x,y), ...] or as a 2D numerix array, with X as the first column and Y as the second. Contour and quiver output the numerix form. The transforms methods Bbox.update() and Transformation.seq_xy_tups() now accept either form. Collections: LineCollection is now a ScalarMappable like PolyCollection, etc. Specifying a grayscale color as a float is deprecated; use a string instead, e.g., 0.75 -> '0.75'. Collections: initializers now accept any mpl color arg, or sequence of such args; previously only a sequence of rgba tuples was accepted. Colorbar: completely new version and api; see docstring. The original version is still accessible as colorbar_classic, but is deprecated. Contourf: "extend" kwarg replaces "clip_ends"; see docstring. Masked array support added to pcolormesh. Modified aspect-ratio handling: Removed aspect kwarg from imshow Axes methods: set_aspect(self, aspect, adjustable=None, anchor=None) set_adjustable(self, adjustable) set_anchor(self, anchor) Pylab interface: axis('image') Backend developers: ft2font's load_char now takes a flags argument, which you can OR together from the LOAD_XXX constants. ``` --- # Changes for 0.90.0 ``` text All artists now implement a "pick" method which users should not call. Rather, set the "picker" property of any artist you want to pick on (the epsilon distance in points for a hit test) and register with the "pick_event" callback. See examples/pick_event_demo.py for details Bar, barh, and hist have "log" binary kwarg: log=True sets the ordinate to a log scale. Boxplot can handle a list of vectors instead of just an array, so vectors can have different lengths. Plot can handle 2-D x and/or y; it plots the columns. Added linewidth kwarg to bar and barh. Made the default Artist._transform None (rather than invoking identity_transform for each artist only to have it overridden later). Use artist.get_transform() rather than artist._transform, even in derived classes, so that the default transform will be created lazily as needed New LogNorm subclass of Normalize added to colors.py. All Normalize subclasses have new inverse() method, and the __call__() method has a new clip kwarg. Changed class names in colors.py to match convention: normalize -> Normalize, no_norm -> NoNorm. Old names are still available for now. Removed obsolete pcolor_classic command and method. Removed lineprops and markerprops from the Annotation code and replaced them with an arrow configurable with kwarg arrowprops. See examples/annotation_demo.py - JDH ``` --- # Changes for 0.90.1 ``` text The file dviread.py has a (very limited and fragile) dvi reader for usetex support. The API might change in the future so don't depend on it yet. Removed deprecated support for a float value as a gray-scale; now it must be a string, like '0.5'. Added alpha kwarg to ColorConverter.to_rgba_list. New method set_bounds(vmin, vmax) for formatters, locators sets the viewInterval and dataInterval from floats. Removed deprecated colorbar_classic. Line2D.get_xdata and get_ydata valid_only=False kwarg is replaced by orig=True. When True, it returns the original data, otherwise the processed data (masked, converted) Some modifications to the units interface. units.ConversionInterface.tickers renamed to units.ConversionInterface.axisinfo and it now returns a units.AxisInfo object rather than a tuple. This will make it easier to add axis info functionality (e.g., I added a default label on this iteration) w/o having to change the tuple length and hence the API of the client code every time new functionality is added. Also, units.ConversionInterface.convert_to_value is now simply named units.ConversionInterface.convert. Axes.errorbar uses Axes.vlines and Axes.hlines to draw its error limits in the vertical and horizontal direction. As you'll see in the changes below, these functions now return a LineCollection rather than a list of lines. The new return signature for errorbar is ylins, caplines, errorcollections where errorcollections is a xerrcollection, yerrcollection Axes.vlines and Axes.hlines now create and returns a LineCollection, not a list of lines. This is much faster. The kwarg signature has changed, so consult the docs MaxNLocator accepts a new Boolean kwarg ('integer') to force ticks to integer locations. Commands that pass an argument to the Text constructor or to Text.set_text() now accept any object that can be converted with '%s'. This affects xlabel(), title(), etc. Barh now takes a **kwargs dict instead of most of the old arguments. This helps ensure that bar and barh are kept in sync, but as a side effect you can no longer pass e.g., color as a positional argument. ft2font.get_charmap() now returns a dict that maps character codes to glyph indices (until now it was reversed) Moved data files into lib/matplotlib so that setuptools' develop mode works. Re-organized the mpl-data layout so that this source structure is maintained in the installation. (i.e., the 'fonts' and 'images' sub-directories are maintained in site-packages.). Suggest removing site-packages/matplotlib/mpl-data and ~/.matplotlib/ttffont.cache before installing ``` --- # Changes for 0.91.0 - Changed `cbook.is_file_like` to `cbook.is_writable_file_like` and corrected behavior. - Added *ax* keyword argument to `.pyplot.colorbar`{.interpreted-text role="func"} and `.Figure.colorbar`{.interpreted-text role="meth"} so that one can specify the axes object from which space for the colorbar is to be taken, if one does not want to make the colorbar axes manually. - Changed `cbook.reversed` so it yields a tuple rather than a (index, tuple). This agrees with the Python reversed builtin, and cbook only defines reversed if Python doesn\'t provide the builtin. - Made skiprows=1 the default on `csv2rec` - The gd and paint backends have been deleted. - The errorbar method and function now accept additional kwargs so that upper and lower limits can be indicated by capping the bar with a caret instead of a straight line segment. - The `matplotlib.dviread`{.interpreted-text role="mod"} file now has a parser for files like psfonts.map and pdftex.map, to map TeX font names to external files. - The file `matplotlib.type1font` contains a new class for Type 1 fonts. Currently it simply reads pfa and pfb format files and stores the data in a way that is suitable for embedding in pdf files. In the future the class might actually parse the font to allow e.g., subsetting. - `matplotlib.ft2font` now supports `FT_Attach_File`. In practice this can be used to read an afm file in addition to a pfa/pfb file, to get metrics and kerning information for a Type 1 font. - The `AFM` class now supports querying CapHeight and stem widths. The get_name_char method now has an isord kwarg like get_width_char. - Changed `.pcolor`{.interpreted-text role="func"} default to `shading='flat'`; but as noted now in the docstring, it is preferable to simply use the *edgecolor* keyword argument. - The mathtext font commands (`\cal`, `\rm`, `\it`, `\tt`) now behave as TeX does: they are in effect until the next font change command or the end of the grouping. Therefore uses of `$\cal{R}$` should be changed to `${\cal R}$`. Alternatively, you may use the new LaTeX-style font commands (`\mathcal`, `\mathrm`, `\mathit`, `\mathtt`) which do affect the following group, e.g., `$\mathcal{R}$`. - Text creation commands have a new default linespacing and a new `linespacing` kwarg, which is a multiple of the maximum vertical extent of a line of ordinary text. The default is 1.2; `linespacing=2` would be like ordinary double spacing, for example. - Changed default kwarg in [matplotlib.colors.Normalize]{.title-ref} to `clip=False`; clipping silently defeats the purpose of the special over, under, and bad values in the colormap, thereby leading to unexpected behavior. The new default should reduce such surprises. - Made the emit property of `~matplotlib.axes.Axes.set_xlim`{.interpreted-text role="meth"} and `~matplotlib.axes.Axes.set_ylim`{.interpreted-text role="meth"} `True` by default; removed the Axes custom callback handling into a \'callbacks\' attribute which is a `~matplotlib.cbook.CallbackRegistry`{.interpreted-text role="class"} instance. This now supports the \'xlim_changed\' and \'ylim_changed\' Axes events. --- # Changes for 0.91.2 - For `csv2rec`, checkrows=0 is the new default indicating all rows will be checked for type inference - A warning is issued when an image is drawn on log-scaled axes, since it will not log-scale the image data. - Moved `rec2gtk` to `matplotlib.toolkits.gtktools` - Moved `rec2excel` to `matplotlib.toolkits.exceltools` - Removed, dead/experimental ExampleInfo, Namespace and Importer code from `matplotlib`{.interpreted-text role="mod"} --- # Changes for 0.98.0 - `matplotlib.image.imread`{.interpreted-text role="func"} now no longer always returns RGBA data\-\--if the image is luminance or RGB, it will return a MxN or MxNx3 array if possible. Also uint8 is no longer always forced to float. - Rewrote the `matplotlib.cm.ScalarMappable`{.interpreted-text role="class"} callback infrastructure to use `matplotlib.cbook.CallbackRegistry`{.interpreted-text role="class"} rather than custom callback handling. Any users of `matplotlib.cm.ScalarMappable.add_observer` of the `~matplotlib.cm.ScalarMappable`{.interpreted-text role="class"} should use the `matplotlib.cm.ScalarMappable.callbacksSM` `~matplotlib.cbook.CallbackRegistry`{.interpreted-text role="class"} instead. - New axes function and Axes method provide control over the plot color cycle: `matplotlib.axes.set_default_color_cycle` and `matplotlib.axes.Axes.set_color_cycle`. - Matplotlib now requires Python 2.4, so `matplotlib.cbook`{.interpreted-text role="mod"} will no longer provide `set`{.interpreted-text role="class"}, `enumerate`{.interpreted-text role="func"}, `reversed`{.interpreted-text role="func"} or `izip` compatibility functions. - In Numpy 1.0, bins are specified by the left edges only. The axes method `matplotlib.axes.Axes.hist`{.interpreted-text role="meth"} now uses future Numpy 1.3 semantics for histograms. Providing `binedges`, the last value gives the upper-right edge now, which was implicitly set to +infinity in Numpy 1.0. This also means that the last bin doesn\'t contain upper outliers any more by default. - New axes method and pyplot function, `~matplotlib.pyplot.hexbin`{.interpreted-text role="func"}, is an alternative to `~matplotlib.pyplot.scatter`{.interpreted-text role="func"} for large datasets. It makes something like a `~matplotlib.pyplot.pcolor`{.interpreted-text role="func"} of a 2-D histogram, but uses hexagonal bins. - New kwarg, `symmetric`, in `matplotlib.ticker.MaxNLocator`{.interpreted-text role="class"} allows one require an axis to be centered around zero. - Toolkits must now be imported from `mpl_toolkits` (not `matplotlib.toolkits`) ## Notes about the transforms refactoring A major new feature of the 0.98 series is a more flexible and extensible transformation infrastructure, written in Python/Numpy rather than a custom C extension. The primary goal of this refactoring was to make it easier to extend matplotlib to support new kinds of projections. This is mostly an internal improvement, and the possible user-visible changes it allows are yet to come. See `matplotlib.transforms`{.interpreted-text role="mod"} for a description of the design of the new transformation framework. For efficiency, many of these functions return views into Numpy arrays. This means that if you hold on to a reference to them, their contents may change. If you want to store a snapshot of their current values, use the Numpy array method copy(). The view intervals are now stored only in one place \-- in the `matplotlib.axes.Axes`{.interpreted-text role="class"} instance, not in the locator instances as well. This means locators must get their limits from their `matplotlib.axis.Axis`{.interpreted-text role="class"}, which in turn looks up its limits from the `~matplotlib.axes.Axes`{.interpreted-text role="class"}. If a locator is used temporarily and not assigned to an Axis or Axes, (e.g., in `matplotlib.contour`{.interpreted-text role="mod"}), a dummy axis must be created to store its bounds. Call `matplotlib.ticker.TickHelper.create_dummy_axis`{.interpreted-text role="meth"} to do so. The functionality of `Pbox` has been merged with `~matplotlib.transforms.Bbox`{.interpreted-text role="class"}. Its methods now all return copies rather than modifying in place. The following lists many of the simple changes necessary to update code from the old transformation framework to the new one. In particular, methods that return a copy are named with a verb in the past tense, whereas methods that alter an object in place are named with a verb in the present tense. ### `matplotlib.transforms`{.interpreted-text role="mod"} --------------------------------------------------------------------------------------------------- Old method New method ------------------------------------------ -------------------------------------------------------- `Bbox.get_bounds` `.transforms.Bbox.bounds`{.interpreted-text role="attr"} `Bbox.width` `transforms.Bbox.width <.transforms.BboxBase.width>`{.interpreted-text role="attr"} `Bbox.height` `transforms.Bbox.height <.transforms.BboxBase.height>`{.interpreted-text role="attr"} `Bbox.intervalx().get_bounds()` `.transforms.Bbox.intervalx`{.interpreted-text `Bbox.intervalx().set_bounds()` role="attr"} \[It is now a property.\] `Bbox.intervaly().get_bounds()` `.transforms.Bbox.intervaly`{.interpreted-text `Bbox.intervaly().set_bounds()` role="attr"} \[It is now a property.\] `Bbox.xmin` `.transforms.Bbox.x0`{.interpreted-text role="attr"} or `transforms.Bbox.xmin <.transforms.BboxBase.xmin>`{.interpreted-text role="attr"}[^1] `Bbox.ymin` `.transforms.Bbox.y0`{.interpreted-text role="attr"} or `transforms.Bbox.ymin <.transforms.BboxBase.ymin>`{.interpreted-text role="attr"}[^2] `Bbox.xmax` `.transforms.Bbox.x1`{.interpreted-text role="attr"} or `transforms.Bbox.xmax <.transforms.BboxBase.xmax>`{.interpreted-text role="attr"}[^3] `Bbox.ymax` `.transforms.Bbox.y1`{.interpreted-text role="attr"} or `transforms.Bbox.ymax <.transforms.BboxBase.ymax>`{.interpreted-text role="attr"}[^4] `Bbox.overlaps(bboxes)` [Bbox.count_overlaps(bboxes) \<.BboxBase.count_overlaps\>]{.title-ref} `bbox_all(bboxes)` [Bbox.union(bboxes) \<.BboxBase.union\>]{.title-ref} \[It is a staticmethod.\] `lbwh_to_bbox(l, b, w, h)` [Bbox.from_bounds(x0, y0, w, h) \<.Bbox.from_bounds\>]{.title-ref} \[It is a staticmethod.\] `inverse_transform_bbox(trans, bbox)` `bbox.inverse_transformed(trans)` `Interval.contains_open(v)` [interval_contains_open(tuple, v) \<.interval_contains_open\>]{.title-ref} `Interval.contains(v)` [interval_contains(tuple, v) \<.interval_contains\>]{.title-ref} `identity_transform()` `.transforms.IdentityTransform`{.interpreted-text role="class"} `blend_xy_sep_transform(xtrans, ytrans)` [blended_transform_factory(xtrans, ytrans) \<.blended_transform_factory\>]{.title-ref} `scale_transform(xs, ys)` [Affine2D().scale(xs\[, ys\]) \<.Affine2D.scale\>]{.title-ref} `get_bbox_transform(boxin, boxout)` [BboxTransform(boxin, boxout) \<.BboxTransform\>]{.title-ref} or [BboxTransformFrom(boxin) \<.BboxTransformFrom\>]{.title-ref} or [BboxTransformTo(boxout) \<.BboxTransformTo\>]{.title-ref} `Transform.seq_xy_tup(points)` [Transform.transform(points) \<.Transform.transform\>]{.title-ref} `Transform.inverse_xy_tup(points)` [Transform.inverted() \<.Transform.inverted\>]{.title-ref}.transform(points) --------------------------------------------------------------------------------------------------- ### `matplotlib.axes`{.interpreted-text role="mod"} Old method New method ----------------------------------------------------------- --------------------------------------------------------------------------------------------- `Axes.get_position()` `matplotlib.axes.Axes.get_position`{.interpreted-text role="meth"}[^5] \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- `Axes.set_position()` `matplotlib.axes.Axes.set_position`{.interpreted-text role="meth"}[^6] \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- `Axes.toggle_log_lineary()` `matplotlib.axes.Axes.set_yscale`{.interpreted-text role="meth"}[^7] \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- `Subplot` class removed The `Polar` class has moved to `matplotlib.projections.polar`{.interpreted-text role="mod"}. ### `matplotlib.artist`{.interpreted-text role="mod"} Old method New method ------------------------------ --------------------------------------------- `Artist.set_clip_path(path)` `Artist.set_clip_path(path, transform)`[^8] ### `matplotlib.collections`{.interpreted-text role="mod"} Old method New method ------------- ------------------ *linestyle* *linestyles*[^9] ### `matplotlib.colors`{.interpreted-text role="mod"} Old method New method ---------------------------------- ----------------------------------------------------------------------------------------------------------------------------------------------------- `ColorConvertor.to_rgba_list(c)` `colors.to_rgba_array(c)` \[`matplotlib.colors.to_rgba_array`{.interpreted-text role="meth"} returns an Nx4 NumPy array of RGBA color quadruples.\] ### `matplotlib.contour`{.interpreted-text role="mod"} Old method New method --------------------- -------------------------------------------------------------------------------------------------------------------------------- `Contour._segments` `matplotlib.contour.Contour.get_paths` \[Returns a list of `matplotlib.path.Path`{.interpreted-text role="class"} instances.\] ### `matplotlib.figure`{.interpreted-text role="mod"} ------------------------------------------------------------------------- Old method New method ---------------------- -------------------------------------------------- `Figure.dpi.get()` `matplotlib.figure.Figure.dpi`{.interpreted-text `Figure.dpi.set()` role="attr"} *(a property)* ------------------------------------------------------------------------- ### `matplotlib.patches`{.interpreted-text role="mod"} Old method New method --------------------- -------------------------------------------------------------------------------------------------------------------------------------------------- `Patch.get_verts()` `matplotlib.patches.Patch.get_path`{.interpreted-text role="meth"} \[Returns a `matplotlib.path.Path`{.interpreted-text role="class"} instance\] ### `matplotlib.backend_bases`{.interpreted-text role="mod"} Old method New method ------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- `GraphicsContext.set_clip_rectangle(tuple)` [GraphicsContext.set_clip_rectangle(bbox) \<.GraphicsContextBase.set_clip_rectangle\>]{.title-ref} \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- `GraphicsContext.get_clip_path()` [GraphicsContext.get_clip_path() \<.GraphicsContextBase.get_clip_path\>]{.title-ref}[^10] \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-- `GraphicsContext.set_clip_path()` [GraphicsContext.set_clip_path() \<.GraphicsContextBase.set_clip_path\>]{.title-ref}[^11] ### `~matplotlib.backend_bases.RendererBase`{.interpreted-text role="class"} New methods: - `draw_path(self, gc, path, transform, rgbFace) `{.interpreted-text role="meth"} - `draw_markers(self, gc, marker_path, marker_trans, path, trans, rgbFace) `{.interpreted-text role="meth"} - `draw_path_collection(self, master_transform, cliprect, clippath, clippath_trans, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds) `{.interpreted-text role="meth"} *\[optional\]* Changed methods: - `draw_image(self, x, y, im, bbox)` is now `draw_image(self, x, y, im, bbox, clippath, clippath_trans) `{.interpreted-text role="meth"} Removed methods: - `draw_arc` - `draw_line_collection` - `draw_line` - `draw_lines` - `draw_point` - `draw_quad_mesh` - `draw_poly_collection` - `draw_polygon` - `draw_rectangle` - `draw_regpoly_collection` [^1]: The `~matplotlib.transforms.Bbox`{.interpreted-text role="class"} is bound by the points (x0, y0) to (x1, y1) and there is no defined order to these points, that is, x0 is not necessarily the left edge of the box. To get the left edge of the `.Bbox`{.interpreted-text role="class"}, use the read-only property `xmin `{.interpreted-text role="attr"}. [^2]: The `~matplotlib.transforms.Bbox`{.interpreted-text role="class"} is bound by the points (x0, y0) to (x1, y1) and there is no defined order to these points, that is, x0 is not necessarily the left edge of the box. To get the left edge of the `.Bbox`{.interpreted-text role="class"}, use the read-only property `xmin `{.interpreted-text role="attr"}. [^3]: The `~matplotlib.transforms.Bbox`{.interpreted-text role="class"} is bound by the points (x0, y0) to (x1, y1) and there is no defined order to these points, that is, x0 is not necessarily the left edge of the box. To get the left edge of the `.Bbox`{.interpreted-text role="class"}, use the read-only property `xmin `{.interpreted-text role="attr"}. [^4]: The `~matplotlib.transforms.Bbox`{.interpreted-text role="class"} is bound by the points (x0, y0) to (x1, y1) and there is no defined order to these points, that is, x0 is not necessarily the left edge of the box. To get the left edge of the `.Bbox`{.interpreted-text role="class"}, use the read-only property `xmin `{.interpreted-text role="attr"}. [^5]: `matplotlib.axes.Axes.get_position`{.interpreted-text role="meth"} used to return a list of points, now it returns a `matplotlib.transforms.Bbox`{.interpreted-text role="class"} instance. [^6]: `matplotlib.axes.Axes.set_position`{.interpreted-text role="meth"} now accepts either four scalars or a `matplotlib.transforms.Bbox`{.interpreted-text role="class"} instance. [^7]: Since the refactoring allows for more than two scale types (\'log\' or \'linear\'), it no longer makes sense to have a toggle. `Axes.toggle_log_lineary()` has been removed. [^8]: `matplotlib.artist.Artist.set_clip_path`{.interpreted-text role="meth"} now accepts a `matplotlib.path.Path`{.interpreted-text role="class"} instance and a `matplotlib.transforms.Transform`{.interpreted-text role="class"} that will be applied to the path immediately before clipping. [^9]: Linestyles are now treated like all other collection attributes, i.e. a single value or multiple values may be provided. [^10]: `matplotlib.backend_bases.GraphicsContextBase.get_clip_path`{.interpreted-text role="meth"} returns a tuple of the form (*path*, *affine_transform*), where *path* is a `matplotlib.path.Path`{.interpreted-text role="class"} instance and *affine_transform* is a `matplotlib.transforms.Affine2D`{.interpreted-text role="class"} instance. [^11]: `matplotlib.backend_bases.GraphicsContextBase.set_clip_path`{.interpreted-text role="meth"} now only accepts a `matplotlib.transforms.TransformedPath`{.interpreted-text role="class"} instance. --- # Changes for 0.98.1 - Removed broken `matplotlib.axes3d` support and replaced it with a non-implemented error pointing to 0.91.x --- # Changes for 0.98.x - `psd()`, `csd()`, and `cohere()` will now automatically wrap negative frequency components to the beginning of the returned arrays. This is much more sensible behavior and makes them consistent with `specgram()`. The previous behavior was more of an oversight than a design decision. - Added new keyword parameters *nonposx*, *nonposy* to `matplotlib.axes.Axes`{.interpreted-text role="class"} methods that set log scale parameters. The default is still to mask out non-positive values, but the kwargs accept \'clip\', which causes non-positive values to be replaced with a very small positive value. - Added new `matplotlib.pyplot.fignum_exists`{.interpreted-text role="func"} and `matplotlib.pyplot.get_fignums`{.interpreted-text role="func"}; they merely expose information that had been hidden in `matplotlib._pylab_helpers`. - Deprecated numerix package. - Added new `matplotlib.image.imsave`{.interpreted-text role="func"} and exposed it to the `matplotlib.pyplot`{.interpreted-text role="mod"} interface. - Remove support for pyExcelerator in exceltools \-- use xlwt instead - Changed the defaults of acorr and xcorr to use usevlines=True, maxlags=10 and normed=True since these are the best defaults - Following keyword parameters for `matplotlib.legend.Legend`{.interpreted-text role="class"} are now deprecated and new set of parameters are introduced. The new parameters are given as a fraction of the font-size. Also, *scatteryoffsets*, *fancybox* and *columnspacing* are added as keyword parameters. Deprecated New ---------------- --------------- pad borderpad labelsep labelspacing handlelen handlelength handlestextsep handletextpad axespad borderaxespad - Removed the configobj and experimental traits rc support - Modified `matplotlib.mlab.psd`{.interpreted-text role="func"}, `matplotlib.mlab.csd`{.interpreted-text role="func"}, `matplotlib.mlab.cohere`{.interpreted-text role="func"}, and `matplotlib.mlab.specgram`{.interpreted-text role="func"} to scale one-sided densities by a factor of 2. Also, optionally scale the densities by the sampling frequency, which gives true values of densities that can be integrated by the returned frequency values. This also gives better MATLAB compatibility. The corresponding `matplotlib.axes.Axes`{.interpreted-text role="class"} methods and `matplotlib.pyplot`{.interpreted-text role="mod"} functions were updated as well. - Font lookup now uses a nearest-neighbor approach rather than an exact match. Some fonts may be different in plots, but should be closer to what was requested. - `matplotlib.axes.Axes.set_xlim`{.interpreted-text role="meth"}, `matplotlib.axes.Axes.set_ylim`{.interpreted-text role="meth"} now return a copy of the `viewlim` array to avoid modify-in-place surprises. - `matplotlib.afm.AFM.get_fullname` and `matplotlib.afm.AFM.get_familyname` no longer raise an exception if the AFM file does not specify these optional attributes, but returns a guess based on the required FontName attribute. - Changed precision kwarg in `matplotlib.pyplot.spy`{.interpreted-text role="func"}; default is 0, and the string value \'present\' is used for sparse arrays only to show filled locations. - `matplotlib.collections.EllipseCollection`{.interpreted-text role="class"} added. - Added `angles` kwarg to `matplotlib.pyplot.quiver`{.interpreted-text role="func"} for more flexible specification of the arrow angles. - Deprecated (raise NotImplementedError) all the mlab2 functions from `matplotlib.mlab`{.interpreted-text role="mod"} out of concern that some of them were not clean room implementations. - Methods `matplotlib.collections.Collection.get_offsets`{.interpreted-text role="meth"} and `matplotlib.collections.Collection.set_offsets`{.interpreted-text role="meth"} added to `~matplotlib.collections.Collection`{.interpreted-text role="class"} base class. - `matplotlib.figure.Figure.figurePatch` renamed `matplotlib.figure.Figure.patch`; `matplotlib.axes.Axes.axesPatch` renamed `matplotlib.axes.Axes.patch`; `matplotlib.axes.Axes.axesFrame` renamed `matplotlib.axes.Axes.frame`. `matplotlib.axes.Axes.get_frame`, which returns `matplotlib.axes.Axes.patch`, is deprecated. - Changes in the `matplotlib.contour.ContourLabeler`{.interpreted-text role="class"} attributes (`matplotlib.pyplot.clabel`{.interpreted-text role="func"} function) so that they all have a form like `.labelAttribute`. The three attributes that are most likely to be used by end users, `.cl`, `.cl_xy` and `.cl_cvalues` have been maintained for the moment (in addition to their renamed versions), but they are deprecated and will eventually be removed. - Moved several functions in `matplotlib.mlab`{.interpreted-text role="mod"} and `matplotlib.cbook`{.interpreted-text role="mod"} into a separate module `matplotlib.numerical_methods` because they were unrelated to the initial purpose of mlab or cbook and appeared more coherent elsewhere. --- # Changes in 0.99 - pylab no longer provides a load and save function. These are available in matplotlib.mlab, or you can use numpy.loadtxt and numpy.savetxt for text files, or np.save and np.load for binary NumPy arrays. - User-generated colormaps can now be added to the set recognized by `matplotlib.cm.get_cmap`. Colormaps can be made the default and applied to the current image using `matplotlib.pyplot.set_cmap`{.interpreted-text role="func"}. - changed use_mrecords default to False in mlab.csv2rec since this is partially broken - Axes instances no longer have a \"frame\" attribute. Instead, use the new \"spines\" attribute. Spines is a dictionary where the keys are the names of the spines (e.g., \'left\',\'right\' and so on) and the values are the artists that draw the spines. For normal (rectilinear) axes, these artists are Line2D instances. For other axes (such as polar axes), these artists may be Patch instances. - Polar plots no longer accept a resolution kwarg. Instead, each Path must specify its own number of interpolation steps. This is unlikely to be a user-visible change \-- if interpolation of data is required, that should be done before passing it to Matplotlib. --- # Changes beyond 0.99.x - The default behavior of `matplotlib.axes.Axes.set_xlim`{.interpreted-text role="meth"}, `matplotlib.axes.Axes.set_ylim`{.interpreted-text role="meth"}, and `matplotlib.axes.Axes.axis`{.interpreted-text role="meth"}, and their corresponding pyplot functions, has been changed: when view limits are set explicitly with one of these methods, autoscaling is turned off for the matching axis. A new *auto* kwarg is available to control this behavior. The limit kwargs have been renamed to *left* and *right* instead of *xmin* and *xmax*, and *bottom* and *top* instead of *ymin* and *ymax*. The old names may still be used, however. - There are five new Axes methods with corresponding pyplot functions to facilitate autoscaling, tick location, and tick label formatting, and the general appearance of ticks and tick labels: - `matplotlib.axes.Axes.autoscale`{.interpreted-text role="meth"} turns autoscaling on or off, and applies it. - `matplotlib.axes.Axes.margins`{.interpreted-text role="meth"} sets margins used to autoscale the `matplotlib.axes.Axes.viewLim` based on the `matplotlib.axes.Axes.dataLim`. - `matplotlib.axes.Axes.locator_params`{.interpreted-text role="meth"} allows one to adjust axes locator parameters such as *nbins*. - `matplotlib.axes.Axes.ticklabel_format`{.interpreted-text role="meth"} is a convenience method for controlling the `matplotlib.ticker.ScalarFormatter`{.interpreted-text role="class"} that is used by default with linear axes. - `matplotlib.axes.Axes.tick_params`{.interpreted-text role="meth"} controls direction, size, visibility, and color of ticks and their labels. - The `matplotlib.axes.Axes.bar`{.interpreted-text role="meth"} method accepts a *error_kw* kwarg; it is a dictionary of kwargs to be passed to the errorbar function. - The `matplotlib.axes.Axes.hist`{.interpreted-text role="meth"} *color* kwarg now accepts a sequence of color specs to match a sequence of datasets. - The `~matplotlib.collections.EllipseCollection`{.interpreted-text role="class"} has been changed in two ways: - There is a new *units* option, \'xy\', that scales the ellipse with the data units. This matches the :class:\'\~matplotlib.patches.Ellipse\` scaling. - The *height* and *width* kwargs have been changed to specify the height and width, again for consistency with `~matplotlib.patches.Ellipse`{.interpreted-text role="class"}, and to better match their names; previously they specified the half-height and half-width. - There is a new rc parameter `axes.color_cycle`, and the color cycle is now independent of the rc parameter `lines.color`. `matplotlib.Axes.set_default_color_cycle` is deprecated. - You can now print several figures to one pdf file and modify the document information dictionary of a pdf file. See the docstrings of the class `matplotlib.backends.backend_pdf.PdfPages`{.interpreted-text role="class"} for more information. - Removed [configobj](http://www.voidspace.org.uk/python/configobj.html) and [enthought.traits](http://code.enthought.com/pages/traits.html) packages, which are only required by the experimental traited config and are somewhat out of date. If needed, install them independently. - The new rc parameter `savefig.extension` sets the filename extension that is used by `matplotlib.figure.Figure.savefig`{.interpreted-text role="meth"} if its *fname* argument lacks an extension. - In an effort to simplify the backend API, all clipping rectangles and paths are now passed in using GraphicsContext objects, even on collections and images. Therefore: draw_path_collection(self, master_transform, cliprect, clippath, clippath_trans, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds, urls) # is now draw_path_collection(self, gc, master_transform, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds, urls) draw_quad_mesh(self, master_transform, cliprect, clippath, clippath_trans, meshWidth, meshHeight, coordinates, offsets, offsetTrans, facecolors, antialiased, showedges) # is now draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight, coordinates, offsets, offsetTrans, facecolors, antialiased, showedges) draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None) # is now draw_image(self, gc, x, y, im) - There are four new Axes methods with corresponding pyplot functions that deal with unstructured triangular grids: - `matplotlib.axes.Axes.tricontour`{.interpreted-text role="meth"} draws contour lines on a triangular grid. - `matplotlib.axes.Axes.tricontourf`{.interpreted-text role="meth"} draws filled contours on a triangular grid. - `matplotlib.axes.Axes.tripcolor`{.interpreted-text role="meth"} draws a pseudocolor plot on a triangular grid. - `matplotlib.axes.Axes.triplot`{.interpreted-text role="meth"} draws a triangular grid as lines and/or markers. --- # API Changes in 1.1.x - Added new `matplotlib.sankey.Sankey`{.interpreted-text role="class"} for generating Sankey diagrams. - In `~matplotlib.pyplot.imshow`{.interpreted-text role="meth"}, setting *interpolation* to \'nearest\' will now always mean that the nearest-neighbor interpolation is performed. If you want the no-op interpolation to be performed, choose \'none\'. - There were errors in how the tri-functions were handling input parameters that had to be fixed. If your tri-plots are not working correctly anymore, or you were working around apparent mistakes, please see issue #203 in the github tracker. When in doubt, use kwargs. - The \'symlog\' scale had some bad behavior in previous versions. This has now been fixed and users should now be able to use it without frustrations. The fixes did result in some minor changes in appearance for some users who may have been depending on the bad behavior. - There is now a common set of markers for all plotting functions. Previously, some markers existed only for `~matplotlib.pyplot.scatter`{.interpreted-text role="meth"} or just for `~matplotlib.pyplot.plot`{.interpreted-text role="meth"}. This is now no longer the case. This merge did result in a conflict. The string \'d\' now means \"thin diamond\" while \'D\' will mean \"regular diamond\". --- # API Changes in 1.2.x - The `classic` option of the rc parameter `toolbar` is deprecated and will be removed in the next release. - The `matplotlib.cbook.isvector` method has been removed since it is no longer functional. - The `rasterization_zorder` property on [\~matplotlib.axes.Axes]{.title-ref} sets a zorder below which artists are rasterized. This has defaulted to -30000.0, but it now defaults to *None*, meaning no artists will be rasterized. In order to rasterize artists below a given zorder value, [.set_rasterization_zorder]{.title-ref} must be explicitly called. - In `~matplotlib.axes.Axes.scatter`{.interpreted-text role="meth"}, and [\~.pyplot.scatter]{.title-ref}, when specifying a marker using a tuple, the angle is now specified in degrees, not radians. - Using `~matplotlib.axes.Axes.twinx`{.interpreted-text role="meth"} or `~matplotlib.axes.Axes.twiny`{.interpreted-text role="meth"} no longer overrides the current locaters and formatters on the axes. - In `~matplotlib.axes.Axes.contourf`{.interpreted-text role="meth"}, the handling of the *extend* kwarg has changed. Formerly, the extended ranges were mapped after to 0, 1 after being normed, so that they always corresponded to the extreme values of the colormap. Now they are mapped outside this range so that they correspond to the special colormap values determined by the `~matplotlib.colors.Colormap.set_under`{.interpreted-text role="meth"} and `~matplotlib.colors.Colormap.set_over`{.interpreted-text role="meth"} methods, which default to the colormap end points. - The new rc parameter `savefig.format` replaces `cairo.format` and `savefig.extension`, and sets the default file format used by `matplotlib.figure.Figure.savefig`{.interpreted-text role="meth"}. - In `.pyplot.pie`{.interpreted-text role="func"} and `.axes.Axes.pie`{.interpreted-text role="meth"}, one can now set the radius of the pie; setting the *radius* to \'None\' (the default value), will result in a pie with a radius of 1 as before. - Use of `matplotlib.projections.projection_factory` is now deprecated in favour of axes class identification using `matplotlib.projections.process_projection_requirements` followed by direct axes class invocation (at the time of writing, functions which do this are: `~matplotlib.figure.Figure.add_axes`{.interpreted-text role="meth"}, `~matplotlib.figure.Figure.add_subplot`{.interpreted-text role="meth"} and `~matplotlib.figure.Figure.gca`{.interpreted-text role="meth"}). Therefore: key = figure._make_key(*args, **kwargs) ispolar = kwargs.pop('polar', False) projection = kwargs.pop('projection', None) if ispolar: if projection is not None and projection != 'polar': raise ValueError('polar and projection args are inconsistent') projection = 'polar' ax = projection_factory(projection, self, rect, **kwargs) key = self._make_key(*args, **kwargs) # is now projection_class, kwargs, key = \ process_projection_requirements(self, *args, **kwargs) ax = projection_class(self, rect, **kwargs) This change means that third party objects can expose themselves as Matplotlib axes by providing a `_as_mpl_axes` method. See `matplotlib.projections`{.interpreted-text role="mod"} for more detail. - A new keyword *extendfrac* in `~matplotlib.pyplot.colorbar`{.interpreted-text role="meth"} and `~matplotlib.colorbar.ColorbarBase`{.interpreted-text role="class"} allows one to control the size of the triangular minimum and maximum extensions on colorbars. - A new keyword *capthick* in `~matplotlib.pyplot.errorbar`{.interpreted-text role="meth"} has been added as an intuitive alias to the *markeredgewidth* and *mew* keyword arguments, which indirectly controlled the thickness of the caps on the errorbars. For backwards compatibility, specifying either of the original keyword arguments will override any value provided by *capthick*. - Transform subclassing behaviour is now subtly changed. If your transform implements a non-affine transformation, then it should override the `transform_non_affine` method, rather than the generic `transform` method. Previously transforms would define `transform` and then copy the method into `transform_non_affine`: class MyTransform(mtrans.Transform): def transform(self, xy): ... transform_non_affine = transform This approach will no longer function correctly and should be changed to: class MyTransform(mtrans.Transform): def transform_non_affine(self, xy): ... - Artists no longer have `x_isdata` or `y_isdata` attributes; instead any artist\'s transform can be interrogated with `artist_instance.get_transform().contains_branch(ax.transData)` - Lines added to an axes now take into account their transform when updating the data and view limits. This means transforms can now be used as a pre-transform. For instance: >>> import matplotlib.pyplot as plt >>> import matplotlib.transforms as mtrans >>> ax = plt.axes() >>> ax.plot(range(10), transform=mtrans.Affine2D().scale(10) + ax.transData) >>> print(ax.viewLim) Bbox('array([[ 0., 0.],\n [ 90., 90.]])') - One can now easily get a transform which goes from one transform\'s coordinate system to another, in an optimized way, using the new subtract method on a transform. For instance, to go from data coordinates to axes coordinates: >>> import matplotlib.pyplot as plt >>> ax = plt.axes() >>> data2ax = ax.transData - ax.transAxes >>> print(ax.transData.depth, ax.transAxes.depth) 3, 1 >>> print(data2ax.depth) 2 for versions before 1.2 this could only be achieved in a sub-optimal way, using `ax.transData + ax.transAxes.inverted()` (depth is a new concept, but had it existed it would return 4 for this example). - `twinx` and `twiny` now returns an instance of SubplotBase if parent axes is an instance of SubplotBase. - All Qt3-based backends are now deprecated due to the lack of py3k bindings. Qt and QtAgg backends will continue to work in v1.2.x for py2.6 and py2.7. It is anticipated that the Qt3 support will be completely removed for the next release. - `matplotlib.colors.ColorConverter`, `~matplotlib.colors.Colormap`{.interpreted-text role="class"} and `~matplotlib.colors.Normalize`{.interpreted-text role="class"} now subclasses `object` - ContourSet instances no longer have a `transform` attribute. Instead, access the transform with the `get_transform` method. --- # API Changes in 1.3.x {#changes_in_1_3} ## Changes in 1.3.1 It is rare that we make an API change in a micro release, however, for 1.3.1 since 1.3.0 the following change was made: - `text.Text.cached` (used to cache font objects) has been made into a private variable. Among the obvious encapsulation benefit, this removes this confusing-looking member from the documentation. - The method `~matplotlib.axes.Axes.hist`{.interpreted-text role="meth"} now always returns bin occupancies as an array of type [float]{.title-ref}. Previously, it was sometimes an array of type [int]{.title-ref}, depending on the call. ## Code removal - The following items that were deprecated in version 1.2 or earlier have now been removed completely. - The Qt 3.x backends (`qt` and `qtagg`) have been removed in favor of the Qt 4.x backends (`qt4` and `qt4agg`). - The FltkAgg and Emf backends have been removed. - The `matplotlib.nxutils` module has been removed. Use the functionality on [matplotlib.path.Path.contains_point]{.title-ref} and friends instead. - Instead of `axes.Axes.get_frame`, use `axes.Axes.patch`. - The following keyword arguments to the [\~.axes.Axes.legend]{.title-ref} function have been renamed: - *pad* -\> *borderpad* - *labelsep* -\> *labelspacing* - *handlelen* -\> *handlelength* - *handletextsep* -\> *handletextpad* - *axespad* -\> *borderaxespad* Related to this, the following rcParams have been removed: - `legend.pad`, - `legend.labelsep`, - `legend.handlelen`, - `legend.handletextsep` and - `legend.axespad` - For the [\~.axes.Axes.hist]{.title-ref} function, instead of *width*, use *rwidth* (relative width). - On [.patches.Circle]{.title-ref}, the *resolution* keyword argument has been removed. For a circle made up of line segments, use [.patches.CirclePolygon]{.title-ref}. - The printing functions in the Wx backend have been removed due to the burden of keeping them up-to-date. - `mlab.liaupunov` has been removed. - `mlab.save`, `mlab.load`, `pylab.save` and `pylab.load` have been removed. We recommend using [numpy.savetxt]{.title-ref} and [numpy.loadtxt]{.title-ref} instead. - `widgets.HorizontalSpanSelector` has been removed. Use [.widgets.SpanSelector]{.title-ref} instead. ## Code deprecation - The CocoaAgg backend has been deprecated, with the possibility for deletion or resurrection in a future release. - The top-level functions in [matplotlib.path]{.title-ref} that are implemented in C++ were never meant to be public. Instead, users should use the Pythonic wrappers for them in the [.path.Path]{.title-ref} and [.collections.Collection]{.title-ref} classes. Use the following mapping to update your code: - `point_in_path` -\> [.path.Path.contains_point]{.title-ref} - `get_path_extents` -\> [.path.Path.get_extents]{.title-ref} - `point_in_path_collection` -\> [.collections.Collection.contains]{.title-ref} - `path_in_path` -\> [.path.Path.contains_path]{.title-ref} - `path_intersects_path` -\> [.path.Path.intersects_path]{.title-ref} - `convert_path_to_polygons` -\> [.path.Path.to_polygons]{.title-ref} - `cleanup_path` -\> [.path.Path.cleaned]{.title-ref} - `points_in_path` -\> [.path.Path.contains_points]{.title-ref} - `clip_path_to_rect` -\> [.path.Path.clip_to_bbox]{.title-ref} - `matplotlib.colors.normalize` and `matplotlib.colors.no_norm` have been deprecated in favour of [matplotlib.colors.Normalize]{.title-ref} and [matplotlib.colors.NoNorm]{.title-ref} respectively. - The [.ScalarMappable]{.title-ref} class\' `set_colorbar` method is now deprecated. Instead, the `matplotlib.cm.ScalarMappable.colorbar`{.interpreted-text role="attr"} attribute should be used. In previous Matplotlib versions this attribute was an undocumented tuple of `(colorbar_instance, colorbar_axes)` but is now just `colorbar_instance`. To get the colorbar axes it is possible to just use the `matplotlib.colorbar.ColorbarBase.ax` attribute on a colorbar instance. - The `matplotlib.mpl` module is now deprecated. Those who relied on this module should transition to simply using `import matplotlib as mpl`. ## Code changes - `~matplotlib.patches.Patch`{.interpreted-text role="class"} now fully supports using RGBA values for its `facecolor` and `edgecolor` attributes, which enables faces and edges to have different alpha values. If the `~matplotlib.patches.Patch`{.interpreted-text role="class"} object\'s `alpha` attribute is set to anything other than `None`, that value will override any alpha-channel value in both the face and edge colors. Previously, if `~matplotlib.patches.Patch`{.interpreted-text role="class"} had `alpha=None`, the alpha component of `edgecolor` would be applied to both the edge and face. - The optional `isRGB` argument to `~matplotlib.backend_bases.GraphicsContextBase.set_foreground`{.interpreted-text role="meth"} (and the other GraphicsContext classes that descend from it) has been renamed to `isRGBA`, and should now only be set to `True` if the `fg` color argument is known to be an RGBA tuple. - For `~matplotlib.patches.Patch`{.interpreted-text role="class"}, the `capstyle` used is now `butt`, to be consistent with the default for most other objects, and to avoid problems with non-solid `linestyle` appearing solid when using a large `linewidth`. Previously, `~matplotlib.patches.Patch`{.interpreted-text role="class"} used `capstyle='projecting'`. - [.Path]{.title-ref} objects can now be marked as *readonly* by passing `readonly=True` to its constructor. The built-in path singletons, obtained through `Path.unit*` class methods return readonly paths. If you have code that modified these, you will need to make a deepcopy first, using either: import copy path = copy.deepcopy(Path.unit_circle()) # or path = Path.unit_circle().deepcopy() Deep copying a [.Path]{.title-ref} always creates an editable (i.e. non-readonly) [.Path]{.title-ref}. - The list at `Path.NUM_VERTICES` was replaced by a dictionary mapping Path codes to the number of expected vertices at `~matplotlib.path.Path.NUM_VERTICES_FOR_CODE`{.interpreted-text role="attr"}. - To support XKCD style plots, the `matplotlib.path.cleanup_path` method\'s signature was updated to require a sketch argument. Users of `matplotlib.path.cleanup_path` are encouraged to use the new `~matplotlib.path.Path.cleaned`{.interpreted-text role="meth"} Path method. - Data limits on a plot now start from a state of having \"null\" limits, rather than limits in the range (0, 1). This has an effect on artists that only control limits in one direction, such as [.axes.Axes.axvline]{.title-ref} and [.axes.Axes.axhline]{.title-ref}, since their limits will no longer also include the range (0, 1). This fixes some problems where the computed limits would be dependent on the order in which artists were added to the axes. - Fixed a bug in setting the position for the right/top spine with data position type. Previously, it would draw the right or top spine at +1 data offset. - In `~matplotlib.patches.FancyArrow`{.interpreted-text role="class"}, the default arrow head width, `head_width`, has been made larger to produce a visible arrow head. The new value of this kwarg is `head_width = 20 * width`. - It is now possible to provide `number of levels + 1` colors in the case of `extend='both'` for contourf (or just `number of levels` colors for an extend value `min` or `max`) such that the resulting colormap\'s `set_under` and `set_over` are defined appropriately. Any other number of colors will continue to behave as before (if more colors are provided than levels, the colors will be unused). A similar change has been applied to contour, where `extend='both'` would expect `number of levels + 2` colors. - A new keyword *extendrect* in `~matplotlib.pyplot.colorbar`{.interpreted-text role="meth"} and `~matplotlib.colorbar.ColorbarBase`{.interpreted-text role="class"} allows one to control the shape of colorbar extensions. - The extension of `~matplotlib.widgets.MultiCursor`{.interpreted-text role="class"} to both vertical (default) and/or horizontal cursor implied that `self.line` is replaced by `self.vline` for vertical cursors lines and `self.hline` is added for the horizontal cursors lines. - On POSIX platforms, the `matplotlib.cbook.report_memory` function raises `NotImplementedError`{.interpreted-text role="class"} instead of `OSError`{.interpreted-text role="class"} if the `ps`{.interpreted-text role="command"} command cannot be run. - The `matplotlib.cbook.check_output` function has been moved to `matplotlib.compat.subprocess`. ## Configuration and rcParams - On Linux, the user-specific `matplotlibrc`{.interpreted-text role="file"} configuration file is now located in `~/.config/matplotlib/matplotlibrc`{.interpreted-text role="file"} to conform to the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html). - The `font.*` rcParams now affect only text objects created after the rcParam has been set, and will not retroactively affect already existing text objects. This brings their behavior in line with most other rcParams. - Removed call of `~matplotlib.axes.Axes.grid`{.interpreted-text role="meth"} in `matplotlib.pyplot.plotfile`. To draw the axes grid, set the `axes.grid` rcParam to *True*, or explicitly call `~matplotlib.axes.Axes.grid`{.interpreted-text role="meth"}. --- # API Changes in 1.4.x ## Code changes - A major refactoring of the axes module was made. The axes module has been split into smaller modules: - the `_base` module, which contains a new private `_AxesBase` class. This class contains all methods except plotting and labelling methods. - the [\~matplotlib.axes]{.title-ref} module, which contains the [.axes.Axes]{.title-ref} class. This class inherits from `_AxesBase`, and contains all plotting and labelling methods. - the `_subplot` module, with all the classes concerning subplotting. There are a couple of things that do not exists in the [\~matplotlib.axes]{.title-ref} module\'s namespace anymore. If you use them, you need to import them from their original location: - `math` -\> `import math` - `ma` -\> `from numpy import ma` - `cbook` -\> `from matplotlib import cbook` - `docstring` -\> `from matplotlib import docstring` - `is_sequence_of_strings` -\> `from matplotlib.cbook import is_sequence_of_strings` - `is_string_like` -\> `from matplotlib.cbook import is_string_like` - `iterable` -\> `from matplotlib.cbook import iterable` - `itertools` -\> `import itertools` - `martist` -\> `from matplotlib import artist as martist` - `matplotlib` -\> `import matplotlib` - `mcoll` -\> `from matplotlib import collections as mcoll` - `mcolors` -\> `from matplotlib import colors as mcolors` - `mcontour` -\> `from matplotlib import contour as mcontour` - `mpatches` -\> `from matplotlib import patches as mpatches` - `mpath` -\> `from matplotlib import path as mpath` - `mquiver` -\> `from matplotlib import quiver as mquiver` - `mstack` -\> `from matplotlib import stack as mstack` - `mstream` -\> `from matplotlib import stream as mstream` - `mtable` -\> `from matplotlib import table as mtable` - As part of the refactoring to enable Qt5 support, the module `matplotlib.backends.qt4_compat` was renamed to `matplotlib.backends.qt_compat`. `qt4_compat` is deprecated in 1.4 and will be removed in 1.5. - The `~matplotlib.pyplot.errorbar`{.interpreted-text role="func"} method has been changed such that the upper and lower limits (*lolims*, *uplims*, *xlolims*, *xuplims*) now point in the correct direction. - The *fmt* kwarg for `~matplotlib.pyplot.errorbar`{.interpreted-text role="func"} now supports the string \'none\' to suppress drawing of a line and markers; use of the *None* object for this is deprecated. The default *fmt* value is changed to the empty string (\'\'), so the line and markers are governed by the `~matplotlib.pyplot.plot`{.interpreted-text role="func"} defaults. - A bug has been fixed in the path effects rendering of fonts, which now means that the font size is consistent with non-path effect fonts. See for more detail. - The Sphinx extensions `ipython_directive` and `ipython_console_highlighting` have been moved to the IPython project itself. While they remain in Matplotlib for this release, they have been deprecated. Update your extensions in `conf.py`{.interpreted-text role="file"} to point to `IPython.sphinxext.ipython_directive` instead of `matplotlib.sphinxext.ipython_directive`. - In `matplotlib.finance`, almost all functions have been deprecated and replaced with a pair of functions name `*_ochl` and `*_ohlc`. The former is the \'open-close-high-low\' order of quotes used previously in this module, and the latter is the \'open-high-low-close\' order that is standard in finance. - For consistency the `face_alpha` keyword to `matplotlib.patheffects.SimplePatchShadow`{.interpreted-text role="class"} has been deprecated in favour of the `alpha` keyword. Similarly, the keyword `offset_xy` is now named `offset` across all `~matplotlib.patheffects.AbstractPathEffect`{.interpreted-text role="class"}s. `matplotlib.patheffects._Base` has been renamed to `matplotlib.patheffects.AbstractPathEffect`{.interpreted-text role="class"}. `matplotlib.patheffect.ProxyRenderer` has been renamed to `matplotlib.patheffects.PathEffectRenderer`{.interpreted-text role="class"} and is now a full RendererBase subclass. - The artist used to draw the outline of a [.Figure.colorbar]{.title-ref} has been changed from a [matplotlib.lines.Line2D]{.title-ref} to [matplotlib.patches.Polygon]{.title-ref}, thus `colorbar.ColorbarBase.outline` is now a [matplotlib.patches.Polygon]{.title-ref} object. - The legend handler interface has changed from a callable, to any object which implements the `legend_artists` method (a deprecation phase will see this interface be maintained for v1.4). See `legend_guide`{.interpreted-text role="ref"} for further details. Further legend changes include: - `matplotlib.axes.Axes._get_legend_handles` now returns a generator of handles, rather than a list. - The `~matplotlib.pyplot.legend`{.interpreted-text role="func"} function\'s *loc* positional argument has been deprecated. Use the *loc* keyword argument instead. - The `savefig.transparent`{.interpreted-text role="rc"} has been added to control default transparency when saving figures. - Slightly refactored the [.Annotation]{.title-ref} family. The text location in [.Annotation]{.title-ref} is now entirely handled by the underlying [.Text]{.title-ref} object so `.set_position` works as expected. The attributes *xytext* and *textcoords* have been deprecated in favor of *xyann* and *anncoords* so that [.Annotation]{.title-ref} and [.AnnotationBbox]{.title-ref} can share a common sensibly named api for getting/setting the location of the text or box. - *xyann* -\> set the location of the annotation - *xy* -\> set where the arrow points to - *anncoords* -\> set the units of the annotation location - *xycoords* -\> set the units of the point location - `set_position()` -\> [.Annotation]{.title-ref} only set location of annotation - [matplotlib.mlab.specgram]{.title-ref}, [matplotlib.mlab.psd]{.title-ref}, [matplotlib.mlab.csd]{.title-ref}, [matplotlib.mlab.cohere]{.title-ref}, `matplotlib.mlab.cohere_pairs`, [matplotlib.pyplot.specgram]{.title-ref}, [matplotlib.pyplot.psd]{.title-ref}, [matplotlib.pyplot.csd]{.title-ref}, and [matplotlib.pyplot.cohere]{.title-ref} now raise ValueError where they previously raised AssertionError. - For [matplotlib.mlab.psd]{.title-ref}, [matplotlib.mlab.csd]{.title-ref}, [matplotlib.mlab.cohere]{.title-ref}, `matplotlib.mlab.cohere_pairs`, [matplotlib.pyplot.specgram]{.title-ref}, [matplotlib.pyplot.psd]{.title-ref}, [matplotlib.pyplot.csd]{.title-ref}, and [matplotlib.pyplot.cohere]{.title-ref}, in cases where a shape (n, 1) array is returned, this is now converted to a (n, ) array. Previously, (n, m) arrays were averaged to an (n, ) array, but (n, 1) arrays were returned unchanged. This change makes the dimensions consistent in both cases. - Added the `axes.formatter.useoffset`{.interpreted-text role="rc"} to control the default value of *useOffset* in [.ticker.ScalarFormatter]{.title-ref} - Added [.Formatter]{.title-ref} sub-class [.StrMethodFormatter]{.title-ref} which does the exact same thing as [.FormatStrFormatter]{.title-ref}, but for new-style formatting strings. - Deprecated `matplotlib.testing.image_util` and the only function within, `matplotlib.testing.image_util.autocontrast`. These will be removed completely in v1.5.0. - The `fmt` argument of `Axes.plot_date` has been changed from `bo` to just `o`, so color cycling can happen by default. - Removed the class `FigureManagerQTAgg` and deprecated `NavigationToolbar2QTAgg` which will be removed in 1.5. - Removed formerly public (non-prefixed) attributes `rect` and `drawRect` from `FigureCanvasQTAgg`; they were always an implementation detail of the (preserved) `drawRectangle()` function. - The function signatures of `matplotlib.tight_bbox.adjust_bbox` and `matplotlib.tight_bbox.process_figure_for_rasterizing` have been changed. A new *fixed_dpi* parameter allows for overriding the `figure.dpi` setting instead of trying to deduce the intended behaviour from the file format. - Added support for horizontal/vertical axes padding to [mpl_toolkits.axes_grid1.axes_grid.ImageGrid]{.title-ref} \-\-- argument *axes_pad* can now be tuple-like if separate axis padding is required. The original behavior is preserved. - Added support for skewed transforms to [matplotlib.transforms.Affine2D]{.title-ref}, which can be created using the [\~.Affine2D.skew]{.title-ref} and [\~.Affine2D.skew_deg]{.title-ref} methods. - Added clockwise parameter to control sectors direction in [.axes.Axes.pie]{.title-ref} - In [matplotlib.lines.Line2D]{.title-ref} the *markevery* functionality has been extended. Previously an integer start-index and stride-length could be specified using either a two-element-list or a two-element-tuple. Now this can only be done using a two-element-tuple. If a two-element-list is used then it will be treated as NumPy fancy indexing and only the two markers corresponding to the given indexes will be shown. - Removed *prop* keyword argument from [mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar]{.title-ref} call. It was passed through to the base-class `__init__` and is only used for setting padding. Now *fontproperties* (which is what is really used to set the font properties of [.AnchoredSizeBar]{.title-ref}) is passed through in place of *prop*. If *fontproperties* is not passed in, but *prop* is, then *prop* is used in place of *fontproperties*. If both are passed in, *prop* is silently ignored. - The use of the index 0 in [.pyplot.subplot]{.title-ref} and related commands is deprecated. Due to a lack of validation, calling `plt.subplots(2, 2, 0)` does not raise an exception, but puts an axes in the \_[last]() position. This is due to the indexing in subplot being 1-based (to mirror MATLAB) so before indexing into the [.GridSpec]{.title-ref} object used to determine where the axes should go, 1 is subtracted off. Passing in 0 results in passing -1 to [.GridSpec]{.title-ref} which results in getting the last position back. Even though this behavior is clearly wrong and not intended, we are going through a deprecation cycle in an abundance of caution that any users are exploiting this \'feature\'. The use of 0 as an index will raise a warning in 1.4 and an exception in 1.5. - Clipping is now off by default on offset boxes. - Matplotlib now uses a less-aggressive call to `gc.collect(1)` when closing figures to avoid major delays with large numbers of user objects in memory. - The default clip value of *all* pie artists now defaults to `False`. ## Code removal - Removed `mlab.levypdf`. The code raised a NumPy error (and has for a long time) and was not the standard form of the Levy distribution. `scipy.stats.levy` should be used instead --- # API Changes in 1.5.0 ## Code Changes ### Reversed [matplotlib.cbook.ls_mapper]{.title-ref}, added [.ls_mapper_r]{.title-ref} Formerly, [matplotlib.cbook.ls_mapper]{.title-ref} was a dictionary with the long-form line-style names (`"solid"`) as keys and the short forms (`"-"`) as values. This long-to-short mapping is now done by [.ls_mapper_r]{.title-ref}, and the short-to-long mapping is done by the [.ls_mapper]{.title-ref}. ### Prevent moving artists between Axes, Property-ify Artist.axes, deprecate Artist.{get,set}\_axes This was done to prevent an Artist that is already associated with an Axes from being moved/added to a different Axes. This was never supported as it causes havoc with the transform stack. The apparent support for this (as it did not raise an exception) was the source of multiple bug reports and questions on SO. For almost all use-cases, the assignment of the axes to an artist should be taken care of by the axes as part of the `Axes.add_*` method, hence the deprecation of {get,set}\_axes. Removing the `set_axes` method will also remove the \'axes\' line from the ACCEPTS kwarg tables (assuming that the removal date gets here before that gets overhauled). ### Tightened input validation on \'pivot\' kwarg to quiver Tightened validation so that only {\'tip\', \'tail\', \'mid\', and \'middle\'} (but any capitalization) are valid values for the *pivot* keyword argument in the [.Quiver]{.title-ref} class (and hence [.axes.Axes.quiver]{.title-ref} and [.pyplot.quiver]{.title-ref} which both fully delegate to [.Quiver]{.title-ref}). Previously any input matching \'mid.*\' would be interpreted as \'middle\', \'tip.*\' as \'tip\' and any string not matching one of those patterns as \'tail\'. The value of `Quiver.pivot` is normalized to be in the set {\'tip\', \'tail\', \'middle\'} in [.Quiver]{.title-ref}. ### Reordered `Axes.get_children` The artist order returned by [.axes.Axes.get_children]{.title-ref} did not match the one used by [.axes.Axes.draw]{.title-ref}. They now use the same order, as [.axes.Axes.draw]{.title-ref} now calls [.axes.Axes.get_children]{.title-ref}. ### Changed behaviour of contour plots The default behaviour of `~matplotlib.pyplot.contour`{.interpreted-text role="func"} and `~matplotlib.pyplot.contourf`{.interpreted-text role="func"} when using a masked array is now determined by the new keyword argument *corner_mask*, or if this is not specified then the new `contour.corner_mask`{.interpreted-text role="rc"} instead. The new default behaviour is equivalent to using `corner_mask=True`; the previous behaviour can be obtained using `corner_mask=False` or by changing the rcParam. The example demonstrates the difference. Use of the old contouring algorithm, which is obtained with `corner_mask='legacy'`, is now deprecated. Contour labels may now appear in different places than in earlier versions of Matplotlib. In addition, the keyword argument *nchunk* now applies to `~matplotlib.pyplot.contour`{.interpreted-text role="func"} as well as `~matplotlib.pyplot.contourf`{.interpreted-text role="func"}, and it subdivides the domain into subdomains of exactly *nchunk* by *nchunk* quads, whereas previously it was only roughly *nchunk* by *nchunk* quads. The C/C++ object that performs contour calculations used to be stored in the public attribute `QuadContourSet.Cntr`, but is now stored in a private attribute and should not be accessed by end users. ### Added set_params function to all Locator types This was a bug fix targeted at making the api for Locators more consistent. In the old behavior, only locators of type MaxNLocator have set_params() defined, causing its use on any other Locator to raise an AttributeError *( aside: set_params(args) is a function that sets the parameters of a Locator instance to be as specified within args)*. The fix involves moving set_params() to the Locator class such that all subtypes will have this function defined. Since each of the Locator subtypes have their own modifiable parameters, a universal set_params() in Locator isn\'t ideal. Instead, a default no-operation function that raises a warning is implemented in Locator. Subtypes extending Locator will then override with their own implementations. Subtypes that do not have a need for set_params() will fall back onto their parent\'s implementation, which raises a warning as intended. In the new behavior, Locator instances will not raise an AttributeError when set_params() is called. For Locators that do not implement set_params(), the default implementation in Locator is used. ### Disallow `None` as x or y value in ax.plot Do not allow `None` as a valid input for the `x` or `y` args in [.axes.Axes.plot]{.title-ref}. This may break some user code, but this was never officially supported (ex documented) and allowing `None` objects through can lead to confusing exceptions downstream. To create an empty line use : ln1, = ax.plot([], [], ...) ln2, = ax.plot([], ...) In either case to update the data in the [.Line2D]{.title-ref} object you must update both the `x` and `y` data. ### Removed *args* and *kwargs* from `MicrosecondLocator.__call__` The call signature of `matplotlib.dates.MicrosecondLocator.__call__` has changed from `__call__(self, *args, **kwargs)` to `__call__(self)`. This is consistent with the superclass `~matplotlib.ticker.Locator`{.interpreted-text role="class"} and also all the other Locators derived from this superclass. ### No [ValueError]{.title-ref} for the MicrosecondLocator and YearLocator The `~matplotlib.dates.MicrosecondLocator`{.interpreted-text role="class"} and `~matplotlib.dates.YearLocator`{.interpreted-text role="class"} objects when called will return an empty list if the axes have no data or the view has no interval. Previously, they raised a [ValueError]{.title-ref}. This is consistent with all the Date Locators. ### \'OffsetBox.DrawingArea\' respects the \'clip\' keyword argument The call signature was `OffsetBox.DrawingArea(..., clip=True)` but nothing was done with the *clip* argument. The object did not do any clipping regardless of that parameter. Now the object can and does clip the child [.Artist]{.title-ref}s if they are set to be clipped. You can turn off the clipping on a per-child basis using `child.set_clip_on(False)`. ### Add salt to clipPath id Add salt to the hash used to determine the id of the `clipPath` nodes. This is to avoid conflicts when two svg documents with the same clip path are included in the same document (see and ), however this means that the svg output is no longer deterministic if the same figure is saved twice. It is not expected that this will affect any users as the current ids are generated from an md5 hash of properties of the clip path and any user would have a very difficult time anticipating the value of the id. ### Changed snap threshold for circle markers to inf When drawing circle markers above some marker size (previously 6.0) the path used to generate the marker was snapped to pixel centers. However, this ends up distorting the marker away from a circle. By setting the snap threshold to inf snapping is never done on circles. This change broke several tests, but is an improvement. ### Preserve units with Text position Previously the \'get_position\' method on Text would strip away unit information even though the units were still present. There was no inherent need to do this, so it has been changed so that unit data (if present) will be preserved. Essentially a call to \'get_position\' will return the exact value from a call to \'set_position\'. If you wish to get the old behaviour, then you can use the new method called \'get_unitless_position\'. ### New API for custom Axes view changes Interactive pan and zoom were previously implemented using a Cartesian-specific algorithm that was not necessarily applicable to custom Axes. Three new private methods, `matplotlib.axes._base._AxesBase._get_view`, `matplotlib.axes._base._AxesBase._set_view`, and `matplotlib.axes._base._AxesBase._set_view_from_bbox`, allow for custom *Axes* classes to override the pan and zoom algorithms. Implementers of custom *Axes* who override these methods may provide suitable behaviour for both pan and zoom as well as the view navigation buttons on the interactive toolbars. ## MathTex visual changes The spacing commands in mathtext have been changed to more closely match vanilla TeX. ### Improved spacing in mathtext The extra space that appeared after subscripts and superscripts has been removed. ### No annotation coordinates wrap In #2351 for 1.4.0 the behavior of \[\'axes points\', \'axes pixel\', \'figure points\', \'figure pixel\'\] as coordinates was change to no longer wrap for negative values. In 1.4.3 this change was reverted for \'axes points\' and \'axes pixel\' and in addition caused \'axes fraction\' to wrap. For 1.5 the behavior has been reverted to as it was in 1.4.0-1.4.2, no wrapping for any type of coordinate. ## Deprecation ### Deprecated `GraphicsContextBase.set_graylevel` The `GraphicsContextBase.set_graylevel` function has been deprecated in 1.5 and will be removed in 1.6. It has been unused. The [.GraphicsContextBase.set_foreground]{.title-ref} could be used instead. ### deprecated idle_event The `idle_event` was broken or missing in most backends and causes spurious warnings in some cases, and its use in creating animations is now obsolete due to the animations module. Therefore code involving it has been removed from all but the wx backend (where it partially works), and its use is deprecated. The [.animation]{.title-ref} module may be used instead to create animations. ### `color_cycle` deprecated In light of the new property cycling feature, the Axes method `set_color_cycle` is now deprecated. Calling this method will replace the current property cycle with one that cycles just the given colors. Similarly, the rc parameter *axes.color_cycle* is also deprecated in lieu of the new `axes.prop_cycle`{.interpreted-text role="rc"} parameter. Having both parameters in the same rc file is not recommended as the result cannot be predicted. For compatibility, setting *axes.color_cycle* will replace the cycler in `axes.prop_cycle`{.interpreted-text role="rc"} with a color cycle. Accessing *axes.color_cycle* will return just the color portion of the property cycle, if it exists. Timeline for removal has not been set. ## Bundled jquery The version of jquery bundled with the webagg backend has been upgraded from 1.7.1 to 1.11.3. If you are using the version of jquery bundled with webagg you will need to update your html files as such ``` diff - + ``` ## Code Removed ### Removed `Image` from main namespace `Image` was imported from PIL/pillow to test if PIL is available, but there is no reason to keep `Image` in the namespace once the availability has been determined. ### Removed `lod` from Artist Removed the method `set_lod` and all references to the attribute `_lod` as they are not used anywhere else in the code base. It appears to be a feature stub that was never built out. ### Removed threading related classes from cbook The classes `Scheduler`, `Timeout`, and `Idle` were in cbook, but are not used internally. They appear to be a prototype for the idle event system which was not working and has recently been pulled out. ### Removed *Lena* images from sample_data The `lena.png` and `lena.jpg` images have been removed from Matplotlib\'s sample_data directory. The images are also no longer available from [matplotlib.cbook.get_sample_data]{.title-ref}. We suggest using `matplotlib.cbook.get_sample_data('grace_hopper.png')` or `matplotlib.cbook.get_sample_data('grace_hopper.jpg')` instead. ### Legend Removed handling of *loc* as a positional argument to [.Legend]{.title-ref} ### Legend handlers Remove code to allow legend handlers to be callable. They must now implement a method `legend_artist`. ### Axis Removed method `set_scale`. This is now handled via a private method which should not be used directly by users. It is called via `Axes.set_{x,y}scale` which takes care of ensuring the related changes are also made to the Axes object. ### finance.py Removed functions with ambiguous argument order from finance.py ### Annotation Removed `textcoords` and `xytext` proprieties from Annotation objects. ### [sphinxext.ipython]()\*.py Both `ipython_console_highlighting` and `ipython_directive` have been moved to IPython. Change your import from `matplotlib.sphinxext.ipython_directive` to `IPython.sphinxext.ipython_directive` and from `matplotlib.sphinxext.ipython_directive` to `IPython.sphinxext.ipython_directive` ### LineCollection.color Deprecated in 2005, use `set_color` ### remove `'faceted'` as a valid value for *shading* in `tri.tripcolor` Use *edgecolor* instead. Added validation on *shading* to only be valid values. ### Remove `faceted` kwarg from scatter Remove support for the `faceted` kwarg. This was deprecated in d48b34288e9651ff95c3b8a071ef5ac5cf50bae7 (2008-04-18!) and replaced by `edgecolor`. ### Remove `set_colorbar` method from `ScalarMappable` Remove `set_colorbar` method, use [\~.cm.ScalarMappable.colorbar]{.title-ref} attribute directly. ### patheffects.svg - remove `get_proxy_renderer` method from `AbstractPathEffect` class - remove `patch_alpha` and `offset_xy` from `SimplePatchShadow` ### Remove `testing.image_util.py` Contained only a no-longer used port of functionality from PIL ### Remove `mlab.FIFOBuffer` Not used internally and not part of core mission of mpl. ### Remove `mlab.prepca` Deprecated in 2009. ### Remove `NavigationToolbar2QTAgg` Added no functionality over the base `NavigationToolbar2Qt` ### mpl.py Remove the module `matplotlib.mpl`. Deprecated in 1.3 by PR #1670 and commit 78ce67d161625833cacff23cfe5d74920248c5b2 --- # API Changes in 1.5.2 ## Default Behavior Changes ### Changed default `autorange` behavior in boxplots Prior to v1.5.2, the whiskers of boxplots would extend to the minimum and maximum values if the quartiles were all equal (i.e., Q1 = median = Q3). This behavior has been disabled by default to restore consistency with other plotting packages. To restore the old behavior, simply set `autorange=True` when calling `plt.boxplot`. --- # API Changes in 1.5.3 ## `ax.plot(..., marker=None)` gives default marker Prior to 1.5.3 keyword arguments passed to [\~matplotlib.axes.Axes.plot]{.title-ref} were handled in two parts \-- default keyword arguments generated internal to [\~matplotlib.axes.Axes.plot]{.title-ref} (such as the cycled styles) and user supplied keyword arguments. The internally generated keyword arguments were passed to the [matplotlib.lines.Line2D]{.title-ref} and the user keyword arguments were passed to `ln.set(**kwargs)` to update the artist after it was created. Now both sets of keyword arguments are merged and passed to [\~matplotlib.lines.Line2D]{.title-ref}. This change was made to allow *None* to be passed in via the user keyword arguments to mean \'do the default thing\' as is the convention through out Matplotlib rather than raising an exception. Unlike most [\~matplotlib.lines.Line2D]{.title-ref} setter methods [\~matplotlib.lines.Line2D.set_marker]{.title-ref} did accept [None]{.title-ref} as a valid input which was mapped to \'no marker\'. Thus, by routing this `marker=None` through `__init__` rather than `set(...)` the meaning of `ax.plot(..., marker=None)` changed from \'no markers\' to \'default markers from rcparams\'. This is change is only evident if `mpl.rcParams['lines.marker']` has a value other than `'None'` (which is string `'None'` which means \'no marker\'). --- # API Changes in 2.0.0 ## Deprecation and removal ### Color of Axes The `axisbg` and `axis_bgcolor` properties on *Axes* have been deprecated in favor of `facecolor`. ### GTK and GDK backends deprecated The GDK and GTK backends have been deprecated. These obsolete backends allow figures to be rendered via the GDK API to files and GTK2 figures. They are untested and known to be broken, and their use has been discouraged for some time. Instead, use the `GTKAgg` and `GTKCairo` backends for rendering to GTK2 windows. ### WX backend deprecated The WX backend has been deprecated. It is untested, and its use has been discouraged for some time. Instead, use the `WXAgg` backend for rendering figures to WX windows. ### CocoaAgg backend removed The deprecated and not fully functional CocoaAgg backend has been removed. ### [round]{.title-ref} removed from TkAgg Backend The TkAgg backend had its own implementation of the [round]{.title-ref} function. This was unused internally and has been removed. Instead, use either the [round]{.title-ref} builtin function or [numpy.around]{.title-ref}. ### \'hold\' functionality deprecated {#v200_deprecate_hold} The \'hold\' keyword argument and all functions and methods related to it are deprecated, along with the `axes.hold` rcParams entry. The behavior will remain consistent with the default `hold=True` state that has long been in place. Instead of using a function or keyword argument (`hold=False`) to change that behavior, explicitly clear the axes or figure as needed prior to subsequent plotting commands. ## [.Artist.update]{.title-ref} has return value The methods [matplotlib.artist.Artist.set]{.title-ref}, [matplotlib.artist.Artist.update]{.title-ref}, and the function [matplotlib.artist.setp]{.title-ref} now use a common codepath to look up how to update the given artist properties (either using the setter methods or an attribute/property). The behavior of [matplotlib.artist.Artist.update]{.title-ref} is slightly changed to return a list of the values returned from the setter methods to avoid changing the API of [matplotlib.artist.Artist.set]{.title-ref} and [matplotlib.artist.setp]{.title-ref}. The keys passed into [matplotlib.artist.Artist.update]{.title-ref} are now converted to lower case before being processed, to match the behavior of [matplotlib.artist.Artist.set]{.title-ref} and [matplotlib.artist.setp]{.title-ref}. This should not break any user code because there are no set methods with capitals in their names, but this puts a constraint on naming properties in the future. ## [.Legend]{.title-ref} initializers gain *edgecolor* and *facecolor* keyword arguments The `~matplotlib.legend.Legend`{.interpreted-text role="class"} background patch (or \'frame\') can have its `edgecolor` and `facecolor` determined by the corresponding keyword arguments to the `matplotlib.legend.Legend`{.interpreted-text role="class"} initializer, or to any of the methods or functions that call that initializer. If left to their default values of [None]{.title-ref}, their values will be taken from `matplotlib.rcParams`. The previously-existing `framealpha` kwarg still controls the alpha transparency of the patch. ## Qualitative colormaps Colorbrewer\'s qualitative/discrete colormaps (\"Accent\", \"Dark2\", \"Paired\", \"Pastel1\", \"Pastel2\", \"Set1\", \"Set2\", \"Set3\") are now implemented as [.ListedColormap]{.title-ref} instead of [.LinearSegmentedColormap]{.title-ref}. To use these for images where categories are specified as integers, for instance, use: plt.imshow(x, cmap='Dark2', norm=colors.NoNorm()) ## Change in the `draw_image` backend API The `draw_image` method implemented by backends has changed its interface. This change is only relevant if the backend declares that it is able to transform images by returning `True` from `option_scale_image`. See the `draw_image` docstring for more information. ## `matplotlib.ticker.LinearLocator` algorithm update The [matplotlib.ticker.LinearLocator]{.title-ref} is used to define the range and location of axis ticks when the user wants an exact number of ticks. `LinearLocator` thus differs from the default locator `MaxNLocator`, for which the user specifies a maximum number of intervals rather than a precise number of ticks. The view range algorithm in `matplotlib.ticker.LinearLocator` has been changed so that more convenient tick locations are chosen. The new algorithm returns a plot view range that is a multiple of the user-requested number of ticks. This ensures tick marks will be located at whole integers more consistently. For example, when both y-axes of a`twinx` plot use `matplotlib.ticker.LinearLocator` with the same number of ticks, their y-tick locations and grid lines will coincide. ## [matplotlib.ticker.LogLocator]{.title-ref} gains numticks kwarg The maximum number of ticks generated by the [\~matplotlib.ticker.LogLocator]{.title-ref} can now be controlled explicitly via setting the new \'numticks\' kwarg to an integer. By default the kwarg is None which internally sets it to the \'auto\' string, triggering a new algorithm for adjusting the maximum according to the axis length relative to the ticklabel font size. ## \`matplotlib.ticker.LogFormatter\`: two new kwargs Previously, minor ticks on log-scaled axes were not labeled by default. An algorithm has been added to the [\~matplotlib.ticker.LogFormatter]{.title-ref} to control the labeling of ticks between integer powers of the base. The algorithm uses two parameters supplied in a kwarg tuple named \'minor_thresholds\'. See the docstring for further explanation. To improve support for axes using [\~matplotlib.ticker.SymmetricalLogLocator]{.title-ref}, a *linthresh* keyword argument was added. ## New defaults for 3D quiver function in mpl_toolkits.mplot3d.axes3d.py Matplotlib has both a 2D and a 3D `quiver` function. These changes affect only the 3D function and make the default behavior of the 3D function match the 2D version. There are two changes: 1) The 3D quiver function previously normalized the arrows to be the same length, which makes it unusable for situations where the arrows should be different lengths and does not match the behavior of the 2D function. This normalization behavior is now controlled with the `normalize` keyword, which defaults to False. 2) The `pivot` keyword now defaults to `tail` instead of `tip`. This was done in order to match the default behavior of the 2D quiver function. To obtain the previous behavior with the 3D quiver function, one can call the function with : ax.quiver(x, y, z, u, v, w, normalize=True, pivot='tip') where \"ax\" is an `Axes3d` object created with something like : import mpl_toolkits.mplot3d.axes3d ax = plt.subplot(111, projection='3d') ## Stale figure behavior Attempting to draw the figure will now mark it as not stale (independent if the draw succeeds). This change is to prevent repeatedly trying to re-draw a figure which is raising an error on draw. The previous behavior would only mark a figure as not stale after a full re-draw succeeded. ## The spectral colormap is now nipy_spectral The colormaps formerly known as `spectral` and `spectral_r` have been replaced by `nipy_spectral` and `nipy_spectral_r` since Matplotlib 1.3.0. Even though the colormap was deprecated in Matplotlib 1.3.0, it never raised a warning. As of Matplotlib 2.0.0, using the old names raises a deprecation warning. In the future, using the old names will raise an error. ## Default install no longer includes test images To reduce the size of wheels and source installs, the tests and baseline images are no longer included by default. To restore installing the tests and images, use a `setup.cfg`{.interpreted-text role="file"} with : [packages] tests = True toolkits_tests = True in the source directory at build/install time. --- # API Changes in 2.0.1 ## Extensions to [matplotlib.backend_bases.GraphicsContextBase]{.title-ref} To better support controlling the color of hatches, the method [matplotlib.backend_bases.GraphicsContextBase.set_hatch_color]{.title-ref} was added to the expected API of `GraphicsContext` classes. Calls to this method are currently wrapped with a `try:...except Attribute:` block to preserve back-compatibility with any third-party backends which do not extend [\~matplotlib.backend_bases.GraphicsContextBase]{.title-ref}. This value can be accessed in the backends via [matplotlib.backend_bases.GraphicsContextBase.get_hatch_color]{.title-ref} (which was added in 2.0 see `gc_get_hatch_color_wn`{.interpreted-text role="ref"}) and should be used to color the hatches. In the future there may also be `hatch_linewidth` and `hatch_density` related methods added. It is encouraged, but not required that third-party backends extend [\~matplotlib.backend_bases.GraphicsContextBase]{.title-ref} to make adapting to these changes easier. ## `afm.get_fontconfig_fonts` returns a list of paths and does not check for existence `afm.get_fontconfig_fonts` used to return a set of paths encoded as a `{key: 1, ...}` dict, and checked for the existence of the paths. It now returns a list and dropped the existence check, as the same check is performed by the caller (`afm.findSystemFonts`) as well. ## `bar` now returns rectangles of negative height or width if the corresponding input is negative [.pyplot.bar]{.title-ref} used to normalize the coordinates of the rectangles that it created, to keep their height and width positives, even if the corresponding input was negative. This normalization has been removed to permit a simpler computation of the correct [.Artist.sticky_edges]{.title-ref} to use. ## Do not clip line width when scaling dashes The algorithm to scale dashes was changed to no longer clip the scaling factor: the dash patterns now continue to shrink at thin line widths. If the line width is smaller than the effective pixel size, this may result in dashed lines turning into solid gray-ish lines. This also required slightly tweaking the default patterns for \'\--\', \':\', and \'.-\' so that with the default line width the final patterns would not change. There is no way to restore the old behavior. ## Deprecate \'Vega\' colormaps The \"Vega\" colormaps are deprecated in Matplotlib 2.0.1 and will be removed in Matplotlib 2.2. Use the \"tab\" colormaps instead: \"tab10\", \"tab20\", \"tab20b\", \"tab20c\". --- # API Changes in 2.1.0 ## Default behavior of log scales changed to mask \<= 0 values Calling [matplotlib.axes.Axes.set_xscale]{.title-ref} or [matplotlib.axes.Axes.set_yscale]{.title-ref} now uses \'mask\' as the default method to handle invalid values (as opposed to \'clip\'). This means that any values \<= 0 on a log scale will not be shown. Previously they were clipped to a very small number and shown. ## `matplotlib.cbook.CallbackRegistry.process`{.interpreted-text role="meth"} suppresses exceptions by default Matplotlib uses instances of `~matplotlib.cbook.CallbackRegistry`{.interpreted-text role="obj"} as a bridge between user input event from the GUI and user callbacks. Previously, any exceptions raised in a user call back would bubble out of the `process` method, which is typically in the GUI event loop. Most GUI frameworks simple print the traceback to the screen and continue as there is not always a clear method of getting the exception back to the user. However PyQt5 now exits the process when it receives an un-handled python exception in the event loop. Thus, `~matplotlib.cbook.CallbackRegistry.process`{.interpreted-text role="meth"} now suppresses and prints tracebacks to stderr by default. What `~matplotlib.cbook.CallbackRegistry.process`{.interpreted-text role="meth"} does with exceptions is now user configurable via the `exception_handler` attribute and kwarg. To restore the previous behavior pass `None` : cb = CallbackRegistry(exception_handler=None) A function which take and `Exception` as its only argument may also be passed : def maybe_reraise(exc): if isinstance(exc, RuntimeError): pass else: raise exc cb = CallbackRegistry(exception_handler=maybe_reraise) ## Improved toggling of the axes grids The `g` key binding now switches the states of the `x` and `y` grids independently (by cycling through all four on/off combinations). The new `G` key binding switches the states of the minor grids. Both bindings are disabled if only a subset of the grid lines (in either direction) is visible, to avoid making irreversible changes to the figure. ## Ticklabels are turned off instead of being invisible Internally, the [.Tick]{.title-ref}\'s `~matplotlib.axis.Tick.label1On` attribute is now used to hide tick labels instead of setting the visibility on the tick label objects. This improves overall performance and fixes some issues. As a consequence, in case those labels ought to be shown, `~matplotlib.axes.Axes.tick_params`{.interpreted-text role="func"} needs to be used, e.g. ax.tick_params(labelbottom=True) ## Removal of warning on empty legends [.pyplot.legend]{.title-ref} used to issue a warning when no labeled artist could be found. This warning has been removed. ## More accurate legend autopositioning Automatic positioning of legends now prefers using the area surrounded by a [.Line2D]{.title-ref} rather than placing the legend over the line itself. ## Cleanup of stock sample data The sample data of stocks has been cleaned up to remove redundancies and increase portability. The `AAPL.dat.gz`, `INTC.dat.gz` and `aapl.csv` files have been removed entirely and will also no longer be available from [matplotlib.cbook.get_sample_data]{.title-ref}. If a CSV file is required, we suggest using the `msft.csv` that continues to be shipped in the sample data. If a NumPy binary file is acceptable, we suggest using one of the following two new files. The `aapl.npy.gz` and `goog.npy` files have been replaced by `aapl.npz` and `goog.npz`, wherein the first column\'s type has changed from [datetime.date]{.title-ref} to [numpy.datetime64]{.title-ref} for better portability across Python versions. Note that Matplotlib does not fully support [numpy.datetime64]{.title-ref} as yet. ## Updated qhull to 2015.2 The version of qhull shipped with Matplotlib, which is used for Delaunay triangulation, has been updated from version 2012.1 to 2015.2. ## Improved Delaunay triangulations with large offsets Delaunay triangulations now deal with large x,y offsets in a better way. This can cause minor changes to any triangulations calculated using Matplotlib, i.e. any use of [matplotlib.tri.Triangulation]{.title-ref} that requests that a Delaunay triangulation is calculated, which includes [matplotlib.pyplot.tricontour]{.title-ref}, [matplotlib.pyplot.tricontourf]{.title-ref}, [matplotlib.pyplot.tripcolor]{.title-ref}, [matplotlib.pyplot.triplot]{.title-ref}, `matplotlib.mlab.griddata` and [mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf]{.title-ref}. ## Use `backports.functools_lru_cache` instead of `functools32` It\'s better maintained and more widely used (by pylint, jaraco, etc). ## `cbook.is_numlike` only performs an instance check `matplotlib.cbook.is_numlike` now only checks that its argument is an instance of `(numbers.Number, np.Number)`. In particular, this means that arrays are now not num-like. ## Elliptical arcs now drawn between correct angles The [matplotlib.patches.Arc]{.title-ref} patch is now correctly drawn between the given angles. Previously a circular arc was drawn and then stretched into an ellipse, so the resulting arc did not lie between *theta1* and *theta2*. ## `-d$backend` no longer sets the backend It is no longer possible to set the backend by passing `-d$backend` at the command line. Use the `MPLBACKEND` environment variable instead. ## Path.intersects_bbox always treats the bounding box as filled Previously, when `Path.intersects_bbox` was called with `filled` set to `False`, it would treat both the path and the bounding box as unfilled. This behavior was not well documented and it is usually not the desired behavior, since bounding boxes are used to represent more complex shapes located inside the bounding box. This behavior has now been changed: when `filled` is `False`, the path will be treated as unfilled, but the bounding box is still treated as filled. The old behavior was arguably an implementation bug. When `Path.intersects_bbox` is called with `filled` set to `True` (the default value), there is no change in behavior. For those rare cases where `Path.intersects_bbox` was called with `filled` set to `False` and where the old behavior is actually desired, the suggested workaround is to call `Path.intersects_path` with a rectangle as the path: from matplotlib.path import Path from matplotlib.transforms import Bbox, BboxTransformTo rect = Path.unit_rectangle().transformed(BboxTransformTo(bbox)) result = path.intersects_path(rect, filled=False) ## WX no longer calls generates `IdleEvent` events or calls `idle_event` Removed unused private method `_onIdle` from `FigureCanvasWx`. The `IdleEvent` class and `FigureCanvasBase.idle_event` method will be removed in 2.2 ## Correct scaling of `magnitude_spectrum()` The functions `matplotlib.mlab.magnitude_spectrum()`{.interpreted-text role="func"} and `matplotlib.pyplot.magnitude_spectrum()`{.interpreted-text role="func"} implicitly assumed the sum of windowing function values to be one. In Matplotlib and Numpy the standard windowing functions are scaled to have maximum value of one, which usually results in a sum of the order of n/2 for a n-point signal. Thus the amplitude scaling `magnitude_spectrum()` was off by that amount when using standard windowing functions ([Bug 8417](https://github.com/matplotlib/matplotlib/issues/8417) ). Now the behavior is consistent with `matplotlib.pyplot.psd()`{.interpreted-text role="func"} and `scipy.signal.welch()`{.interpreted-text role="func"}. The following example demonstrates the new and old scaling: import matplotlib.pyplot as plt import numpy as np tau, n = 10, 1024 # 10 second signal with 1024 points T = tau/n # sampling interval t = np.arange(n)*T a = 4 # amplitude x = a*np.sin(40*np.pi*t) # 20 Hz sine with amplitude a # New correct behavior: Amplitude at 20 Hz is a/2 plt.magnitude_spectrum(x, Fs=1/T, sides='onesided', scale='linear') # Original behavior: Amplitude at 20 Hz is (a/2)*(n/2) for a Hanning window w = np.hanning(n) # default window is a Hanning window plt.magnitude_spectrum(x*np.sum(w), Fs=1/T, sides='onesided', scale='linear') ## Change to signatures of `~matplotlib.axes.Axes.bar`{.interpreted-text role="meth"} & `~matplotlib.axes.Axes.barh`{.interpreted-text role="meth"} For 2.0 the `default value of *align* `{.interpreted-text role="ref"} changed to `'center'`. However this caused the signature of `~matplotlib.axes.Axes.bar`{.interpreted-text role="meth"} and `~matplotlib.axes.Axes.barh`{.interpreted-text role="meth"} to be misleading as the first parameters were still *left* and *bottom* respectively: bar(left, height, *, align='center', **kwargs) barh(bottom, width, *, align='center', **kwargs) despite behaving as the center in both cases. The methods now take `*args, **kwargs` as input and are documented to have the primary signatures of: bar(x, height, *, align='center', **kwargs) barh(y, width, *, align='center', **kwargs) Passing *left* and *bottom* as keyword arguments to `~matplotlib.axes.Axes.bar`{.interpreted-text role="meth"} and `~matplotlib.axes.Axes.barh`{.interpreted-text role="meth"} respectively will warn. Support will be removed in Matplotlib 3.0. ## Font cache as json The font cache is now saved as json, rather than a pickle. ## Invalid (Non-finite) Axis Limit Error When using `~matplotlib.axes.Axes.set_xlim`{.interpreted-text role="func"} and `~matplotlib.axes.Axes.set_ylim`{.interpreted-text role="func"}, passing non-finite values now results in a `ValueError`. The previous behavior resulted in the limits being erroneously reset to `(-0.001, 0.001)`. ## `scatter` and `Collection` offsets are no longer implicitly flattened [\~matplotlib.collections.Collection]{.title-ref} (and thus both 2D [\~matplotlib.axes.Axes.scatter]{.title-ref} and 3D [\~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter]{.title-ref}) no longer implicitly flattens its offsets. As a consequence, `scatter`\'s `x` and `y` arguments can no longer be 2+-dimensional arrays. ## Deprecations ### `GraphicsContextBase`\'s `linestyle` property. The `GraphicsContextBase.get_linestyle` and `GraphicsContextBase.set_linestyle` methods, which had no effect, have been deprecated. All of the backends Matplotlib ships use `GraphicsContextBase.get_dashes` and `GraphicsContextBase.set_dashes` which are more general. Third-party backends should also migrate to the `*_dashes` methods. ### `NavigationToolbar2.dynamic_update` Use [\~.FigureCanvasBase.draw_idle]{.title-ref} method on the `Canvas` instance instead. ### Testing `matplotlib.testing.noseclasses` is deprecated and will be removed in 2.3 ### `EngFormatter` *num* arg as string Passing a string as *num* argument when calling an instance of [matplotlib.ticker.EngFormatter]{.title-ref} is deprecated and will be removed in 2.3. ### `mpl_toolkits.axes_grid` module All functionally from `mpl_toolkits.axes_grid` can be found in either [mpl_toolkits.axes_grid1]{.title-ref} or [mpl_toolkits.axisartist]{.title-ref}. Axes classes from `mpl_toolkits.axes_grid` based on `Axis` from [mpl_toolkits.axisartist]{.title-ref} can be found in [mpl_toolkits.axisartist]{.title-ref}. ### `Axes` collision in `Figure.add_axes` Adding an axes instance to a figure by using the same arguments as for a previous axes instance currently reuses the earlier instance. This behavior has been deprecated in Matplotlib 2.1. In a future version, a *new* instance will always be created and returned. Meanwhile, in such a situation, a deprecation warning is raised by `matplotlib.figure.AxesStack`. This warning can be suppressed, and the future behavior ensured, by passing a *unique* label to each axes instance. See the docstring of `~matplotlib.figure.Figure.add_axes`{.interpreted-text role="meth"} for more information. Additional details on the rationale behind this deprecation can be found in `7377`{.interpreted-text role="ghissue"} and `9024`{.interpreted-text role="ghissue"}. ### Former validators for `contour.negative_linestyle` The former public validation functions `validate_negative_linestyle` and `validate_negative_linestyle_legacy` will be deprecated in 2.1 and may be removed in 2.3. There are no public functions to replace them. ### `cbook` Many unused or near-unused `matplotlib.cbook`{.interpreted-text role="mod"} functions and classes have been deprecated: `converter`, `tostr`, `todatetime`, `todate`, `tofloat`, `toint`, `unique`, `is_string_like`, `is_sequence_of_strings`, `is_scalar`, `Sorter`, `Xlator`, `soundex`, `Null`, `dict_delall`, `RingBuffer`, `get_split_ind`, `wrap`, `get_recursive_filelist`, `pieces`, `exception_to_str`, `allequal`, `alltrue`, `onetrue`, `allpairs`, `finddir`, `reverse_dict`, `restrict_dict`, `issubclass_safe`, `recursive_remove`, `unmasked_index_ranges`. ## Code Removal ### qt4_compat.py Moved to `qt_compat.py`. Renamed because it now handles Qt5 as well. ### Previously Deprecated methods The `GraphicsContextBase.set_graylevel`, `FigureCanvasBase.onHilite` and `mpl_toolkits.axes_grid1.mpl_axes.Axes.toggle_axisline` methods have been removed. The `ArtistInspector.findobj` method, which was never working due to the lack of a `get_children` method, has been removed. The deprecated `point_in_path`, `get_path_extents`, `point_in_path_collection`, `path_intersects_path`, `convert_path_to_polygons`, `cleanup_path` and `clip_path_to_rect` functions in the `matplotlib.path` module have been removed. Their functionality remains exposed as methods on the `Path` class. The deprecated `Artist.get_axes` and `Artist.set_axes` methods have been removed The `matplotlib.backends.backend_ps.seq_allequal` function has been removed. Use `np.array_equal` instead. The deprecated `matplotlib.rcsetup.validate_maskedarray`, `matplotlib.rcsetup.deprecate_savefig_extension` and `matplotlib.rcsetup.validate_tkpythoninspect` functions, and associated `savefig.extension` and `tk.pythoninspect` rcparams entries have been removed. The keyword argument *resolution* of `matplotlib.projections.polar.PolarAxes`{.interpreted-text role="class"} has been removed. It has deprecation with no effect from version *0.98.x*. ### `Axes.set_aspect("normal")` Support for setting an `Axes`\'s aspect to `"normal"` has been removed, in favor of the synonym `"auto"`. ### `shading` kwarg to `pcolor` The `shading` kwarg to [\~matplotlib.axes.Axes.pcolor]{.title-ref} has been removed. Set `edgecolors` appropriately instead. ### Functions removed from the `lines` module The `matplotlib.lines`{.interpreted-text role="mod"} module no longer imports the `pts_to_prestep`, `pts_to_midstep` and `pts_to_poststep` functions from `matplotlib.cbook`{.interpreted-text role="mod"}. ### PDF backend functions The methods `embedTeXFont` and `tex_font_mapping` of `matplotlib.backends.backend_pdf.PdfFile`{.interpreted-text role="class"} have been removed. It is unlikely that external users would have called these methods, which are related to the font system internal to the PDF backend. ### matplotlib.delaunay Remove the delaunay triangulation code which is now handled by Qhull via `matplotlib.tri`{.interpreted-text role="mod"}. --- # API Changes in 2.1.1 ## Default behavior of log scales reverted to clip \<= 0 values The change it 2.1.0 to mask in logscale by default had more disruptive changes than anticipated and has been reverted, however the clipping is now done in a way that fixes the issues that motivated changing the default behavior to `'mask'`. As a side effect of this change, error bars which go negative now work as expected on log scales. --- # API Changes in 2.1.2 ## [.Figure.legend]{.title-ref} no longer checks for repeated lines to ignore [matplotlib.figure.Figure.legend]{.title-ref} used to check if a line had the same label as an existing legend entry. If it also had the same line color or marker color legend didn\'t add a new entry for that line. However, the list of conditions was incomplete, didn\'t handle RGB tuples, didn\'t handle linewidths or linestyles etc. This logic did not exist in [.axes.Axes.legend]{.title-ref}. It was included (erroneously) in Matplotlib 2.1.1 when the legend argument parsing was unified `9324`{.interpreted-text role="ghpull"}. This change removes that check in [.axes.Axes.legend]{.title-ref} again to restore the old behavior. This logic has also been dropped from [.Figure.legend]{.title-ref}, where it was previously undocumented. Repeated lines with the same label will now each have an entry in the legend. If you do not want the duplicate entries, don\'t add a label to the line, or prepend the label with an underscore. --- # API Changes in 2.2.0 ## New dependency [kiwisolver](https://github.com/nucleic/kiwi) is now a required dependency to support the new constrained_layout, see `constrainedlayout_guide`{.interpreted-text role="ref"} for more details. ## Deprecations ### Classes, functions, and methods The unused and untested `Artist.onRemove` and `Artist.hitlist` methods have been deprecated. The now unused `mlab.less_simple_linear_interpolation` function is deprecated. The unused `ContourLabeler.get_real_label_width` method is deprecated. The unused `FigureManagerBase.show_popup` method is deprecated. This introduced in e945059b327d42a99938b939a1be867fa023e7ba in 2005 but never built out into any of the backends. `backend_tkagg.AxisMenu` is deprecated, as it has become unused since the removal of \"classic\" toolbars. ### Changed function signatures kwarg `fig` to [.GridSpec.get_subplot_params]{.title-ref} is deprecated, use `figure` instead. Using [.pyplot.axes]{.title-ref} with an [\~matplotlib.axes.Axes]{.title-ref} as argument is deprecated. This sets the current axes, i.e. it has the same effect as [.pyplot.sca]{.title-ref}. For clarity `plt.sca(ax)` should be preferred over `plt.axes(ax)`. Using strings instead of booleans to control grid and tick visibility is deprecated. Using `"on"`, `"off"`, `"true"`, or `"false"` to control grid and tick visibility has been deprecated. Instead, use normal booleans (`True`/`False`) or boolean-likes. In the future, all non-empty strings may be interpreted as `True`. When given 2D inputs with non-matching numbers of columns, [\~.pyplot.plot]{.title-ref} currently cycles through the columns of the narrower input, until all the columns of the wider input have been plotted. This behavior is deprecated; in the future, only broadcasting (1 column to *n* columns) will be performed. ### rcparams The `backend.qt4` and `backend.qt5` rcParams were deprecated in version 2.2. In order to force the use of a specific Qt binding, either import that binding first, or set the `QT_API` environment variable. Deprecation of the `nbagg.transparent` rcParam. To control transparency of figure patches in the nbagg (or any other) backend, directly set `figure.patch.facecolor`, or the `figure.facecolor` rcParam. ### Deprecated `Axis.unit_data` Use `Axis.units` (which has long existed) instead. ## Removals ### Function Signatures Contouring no longer supports `legacy` corner masking. The deprecated `ContourSet.vmin` and `ContourSet.vmax` properties have been removed. Passing `None` instead of `"none"` as format to [\~.Axes.errorbar]{.title-ref} is no longer supported. The `bgcolor` keyword argument to `Axes` has been removed. ### Modules, methods, and functions The `matplotlib.finance`, `mpl_toolkits.exceltools` and `mpl_toolkits.gtktools` modules have been removed. `matplotlib.finance` remains available at . The `mpl_toolkits.mplot3d.art3d.iscolor` function has been removed. The `Axes.get_axis_bgcolor`, `Axes.set_axis_bgcolor`, `Bbox.update_from_data`, `Bbox.update_datalim_numerix`, `MaxNLocator.bin_boundaries` methods have been removed. `mencoder` can no longer be used to encode animations. The unused `FONT_SCALE` and `fontd` attributes of the [.RendererSVG]{.title-ref} class have been removed. ### colormaps The `spectral` colormap has been removed. The `Vega*` colormaps, which were aliases for the `tab*` colormaps, have been removed. ### rcparams The following deprecated rcParams have been removed: - `axes.color_cycle` (see `axes.prop_cycle`), - `legend.isaxes`, - `svg.embed_char_paths` (see `svg.fonttype`), - `text.fontstyle`, `text.fontangle`, `text.fontvariant`, `text.fontweight`, `text.fontsize` (renamed to `text.style`, etc.), - `tick.size` (renamed to `tick.major.size`). ## Only accept string-like for Categorical input Do not accept mixed string / float / int input, only strings are valid categoricals. ## Removal of unused imports Many unused imports were removed from the codebase. As a result, trying to import certain classes or functions from the \"wrong\" module (e.g. [\~.Figure]{.title-ref} from `matplotlib.backends.backend_agg`{.interpreted-text role="mod"} instead of `matplotlib.figure`{.interpreted-text role="mod"}) will now raise an [ImportError]{.title-ref}. ## `Axes3D.get_xlim`, `get_ylim` and `get_zlim` now return a tuple They previously returned an array. Returning a tuple is consistent with the behavior for 2D axes. ## Exception type changes If [.MovieWriterRegistry]{.title-ref} can\'t find the requested [.MovieWriter]{.title-ref}, a more helpful [RuntimeError]{.title-ref} message is now raised instead of the previously raised [KeyError]{.title-ref}. `matplotlib.tight_layout.auto_adjust_subplotpars` now raises [ValueError]{.title-ref} instead of [RuntimeError]{.title-ref} when sizes of input lists don\'t match ## [.Figure.set_figwidth]{.title-ref} and [.Figure.set_figheight]{.title-ref} default *forward* to True [matplotlib.figure.Figure.set_figwidth]{.title-ref} and [matplotlib.figure.Figure.set_figheight]{.title-ref} had the keyword argument `forward=False` by default, but [.figure.Figure.set_size_inches]{.title-ref} now defaults to `forward=True`. This makes these functions consistent. ## Do not truncate svg sizes to nearest point There is no reason to size the SVG out put in integer points, change to out putting floats for the *height*, *width*, and *viewBox* attributes of the *svg* element. ## Fontsizes less than 1 pt are clipped to be 1 pt. FreeType doesn\'t allow fonts to get smaller than 1 pt, so all Agg backends were silently rounding up to 1 pt. PDF (other vector backends?) were letting us write fonts that were less than 1 pt, but they could not be placed properly because position information comes from FreeType. This change makes it so no backends can use fonts smaller than 1 pt, consistent with FreeType and ensuring more consistent results across backends. ## Changes to Qt backend class MRO To support both Agg and cairo rendering for Qt backends all of the non-Agg specific code previously in `backend_qt5agg.FigureCanvasQTAggBase` has been moved to `backend_qt5.FigureCanvasQT` so it can be shared with the cairo implementation. The `FigureCanvasQTAggBase.paintEvent`, `FigureCanvasQTAggBase.blit`, and `FigureCanvasQTAggBase.print_figure` methods have moved to `FigureCanvasQTAgg.paintEvent`, `FigureCanvasQTAgg.blit`, and `FigureCanvasQTAgg.print_figure`. The first two methods assume that the instance is also a `QWidget` so to use `FigureCanvasQTAggBase` it was required to multiple inherit from a `QWidget` sub-class. Having moved all of its methods either up or down the class hierarchy `FigureCanvasQTAggBase` has been deprecated. To do this without warning and to preserve as much API as possible, `.backend_qt5agg.FigureCanvasQTAggBase` now inherits from `backend_qt5.FigureCanvasQTAgg`. The MRO for `FigureCanvasQTAgg` and `FigureCanvasQTAggBase` used to be : [matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg, matplotlib.backends.backend_qt5agg.FigureCanvasQTAggBase, matplotlib.backends.backend_agg.FigureCanvasAgg, matplotlib.backends.backend_qt5.FigureCanvasQT, PyQt5.QtWidgets.QWidget, PyQt5.QtCore.QObject, sip.wrapper, PyQt5.QtGui.QPaintDevice, sip.simplewrapper, matplotlib.backend_bases.FigureCanvasBase, object] and : [matplotlib.backends.backend_qt5agg.FigureCanvasQTAggBase, matplotlib.backends.backend_agg.FigureCanvasAgg, matplotlib.backend_bases.FigureCanvasBase, object] respectively. They are now : [matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg, matplotlib.backends.backend_agg.FigureCanvasAgg, matplotlib.backends.backend_qt5.FigureCanvasQT, PyQt5.QtWidgets.QWidget, PyQt5.QtCore.QObject, sip.wrapper, PyQt5.QtGui.QPaintDevice, sip.simplewrapper, matplotlib.backend_bases.FigureCanvasBase, object] and : [matplotlib.backends.backend_qt5agg.FigureCanvasQTAggBase, matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg, matplotlib.backends.backend_agg.FigureCanvasAgg, matplotlib.backends.backend_qt5.FigureCanvasQT, PyQt5.QtWidgets.QWidget, PyQt5.QtCore.QObject, sip.wrapper, PyQt5.QtGui.QPaintDevice, sip.simplewrapper, matplotlib.backend_bases.FigureCanvasBase, object] ## [.axes.Axes.imshow]{.title-ref} clips RGB values to the valid range When [.axes.Axes.imshow]{.title-ref} is passed an RGB or RGBA value with out-of-range values, it now logs a warning and clips them to the valid range. The old behaviour, wrapping back in to the range, often hid outliers and made interpreting RGB images unreliable. ## GTKAgg and GTKCairo backends deprecated The GTKAgg and GTKCairo backends have been deprecated. These obsolete backends allow figures to be rendered via the GTK+ 2 toolkit. They are untested, known to be broken, will not work with Python 3, and their use has been discouraged for some time. Instead, use the `GTK3Agg` and `GTK3Cairo` backends for rendering to GTK+ 3 windows. --- # API Changes for 3.0.0 ## Drop support for python 2 Matplotlib 3 only supports python 3.5 and higher. ## Changes to backend loading Failure to load backend modules (`macosx` on non-framework builds and `gtk3` when running headless) now raises [ImportError]{.title-ref} (instead of [RuntimeError]{.title-ref} and [TypeError]{.title-ref}, respectively). Third-party backends that integrate with an interactive framework are now encouraged to define the `required_interactive_framework` global value to one of the following values: \"qt5\", \"qt4\", \"gtk3\", \"wx\", \"tk\", or \"macosx\". This information will be used to determine whether it is possible to switch from a backend to another (specifically, whether they use the same interactive framework). ## [.Axes.hist2d]{.title-ref} now uses [\~.Axes.pcolormesh]{.title-ref} instead of [\~.Axes.pcolorfast]{.title-ref} [.Axes.hist2d]{.title-ref} now uses [\~.Axes.pcolormesh]{.title-ref} instead of [\~.Axes.pcolorfast]{.title-ref}, which will improve the handling of log-axes. Note that the returned *image* now is of type [\~.matplotlib.collections.QuadMesh]{.title-ref} instead of [\~.matplotlib.image.AxesImage]{.title-ref}. ## [.matplotlib.axes.Axes.get_tightbbox]{.title-ref} now includes all artists For Matplotlib 3.0, *all* artists are now included in the bounding box returned by [.matplotlib.axes.Axes.get_tightbbox]{.title-ref}. [.matplotlib.axes.Axes.get_tightbbox]{.title-ref} adds a new kwarg `bbox_extra_artists` to manually specify the list of artists on the axes to include in the tight bounding box calculation. Layout tools like [.Figure.tight_layout]{.title-ref}, `constrained_layout`, and `fig.savefig('fname.png', bbox_inches="tight")` use [.matplotlib.axes.Axes.get_tightbbox]{.title-ref} to determine the bounds of each axes on a figure and adjust spacing between axes. In Matplotlib 2.2 `get_tightbbox` started to include legends made on the axes, but still excluded some other artists, like text that may overspill an axes. This has been expanded to include *all* artists. This new default may be overridden in either of three ways: 1. Make the artist to be excluded a child of the figure, not the axes. E.g., call `fig.legend()` instead of `ax.legend()` (perhaps using [\~.matplotlib.axes.Axes.get_legend_handles_labels]{.title-ref} to gather handles and labels from the parent axes). 2. If the artist is a child of the axes, set the artist property `artist.set_in_layout(False)`. 3. Manually specify a list of artists in the new kwarg `bbox_extra_artists`. ## [.Text.set_text]{.title-ref} with string argument `None` sets string to empty [.Text.set_text]{.title-ref} when passed a string value of `None` would set the string to `"None"`, so subsequent calls to [.Text.get_text]{.title-ref} would return the ambiguous `"None"` string. This change sets text objects passed `None` to have empty strings, so that [.Text.get_text]{.title-ref} returns an empty string. ## `Axes3D.get_xlim`, `get_ylim` and `get_zlim` now return a tuple They previously returned an array. Returning a tuple is consistent with the behavior for 2D axes. ## `font_manager.list_fonts` now follows the platform\'s casefolding semantics i.e., it behaves case-insensitively on Windows only. ## `bar` / `barh` no longer accepts `left` / `bottom` as first named argument These arguments were renamed in 2.0 to `x` / `y` following the change of the default alignment from `edge` to `center`. ## Different exception types for undocumented options - Passing `style='comma'` to `~matplotlib.axes.Axes.ticklabel_format`{.interpreted-text role="meth"} was never supported. It now raises `ValueError` like all other unsupported styles, rather than `NotImplementedError`. - Passing the undocumented `xmin` or `xmax` arguments to `~matplotlib.axes.Axes.set_xlim`{.interpreted-text role="meth"} would silently override the `left` and `right` arguments. `~matplotlib.axes.Axes.set_ylim`{.interpreted-text role="meth"} and the 3D equivalents (e.g. [\~.Axes3D.set_zlim]{.title-ref}) had a corresponding problem. A `TypeError` will be raised if they would override the earlier limit arguments. In 3.0 these were kwargs were deprecated, but in 3.1 the deprecation was undone. ## Improved call signature for `Axes.margins` [.Axes.margins]{.title-ref} and [.Axes3D.margins]{.title-ref} no longer accept arbitrary keywords. `TypeError` will therefore be raised if unknown kwargs are passed; previously they would be silently ignored. If too many positional arguments are passed, `TypeError` will be raised instead of `ValueError`, for consistency with other call-signature violations. [.Axes3D.margins]{.title-ref} now raises `TypeError` instead of emitting a deprecation warning if only two positional arguments are passed. To supply only `x` and `y` margins, use keyword arguments. ## Explicit arguments instead of \*args, \*\*kwargs [PEP 3102](http://www.python.org/dev/peps/pep-3102/ "PEP 3102") describes keyword-only arguments, which allow Matplotlib to provide explicit call signatures - where we previously used `*args, **kwargs` and `kwargs.pop`, we can now expose named arguments. In some places, unknown kwargs were previously ignored but now raise `TypeError` because `**kwargs` has been removed. - `matplotlib.axes.Axes.stem`{.interpreted-text role="meth"} no longer accepts unknown keywords, and raises `TypeError` instead of emitting a deprecation. - `matplotlib.axes.Axes.stem`{.interpreted-text role="meth"} now raises TypeError when passed unhandled positional arguments. If two or more arguments are passed (ie X, Y, \[linefmt\], \...) and Y cannot be cast to an array, an error will be raised instead of treating X as Y and Y as linefmt. - [mpl_toolkits.axes_grid1.axes_divider.SubplotDivider]{.title-ref} raises `TypeError` instead of `Exception` when passed unknown kwargs. ## Cleanup decorators and test classes no longer destroy warnings filter on exit The decorators and classes in matplotlib.testing.decorators no longer destroy the warnings filter on exit. Instead, they restore the warnings filter that existed before the test started using `warnings.catch_warnings`. ## Non-interactive FigureManager classes are now aliases of FigureManagerBase The `FigureManagerPdf`, `FigureManagerPS`, and `FigureManagerSVG` classes, which were previously empty subclasses of [.FigureManagerBase]{.title-ref} (i.e., not adding or overriding any attribute or method), are now direct aliases for [.FigureManagerBase]{.title-ref}. ## Change to the output of [.image.thumbnail]{.title-ref} When called with `preview=False`, [.image.thumbnail]{.title-ref} previously returned an figure whose canvas class was set according to the output file extension. It now returns a figure whose canvas class is the base [.FigureCanvasBase]{.title-ref} (and relies on [.FigureCanvasBase.print_figure]{.title-ref}) to handle the canvas switching properly). As a side effect of this change, [.image.thumbnail]{.title-ref} now also supports .ps, .eps, and .svgz output. ## [.FuncAnimation]{.title-ref} now draws artists according to their zorder when blitting [.FuncAnimation]{.title-ref} now draws artists returned by the user-function according to their zorder when using blitting, instead of using the order in which they are being passed. However, note that only zorder of passed artists will be respected, as they are drawn on top of any existing artists (see [#11369](https://github.com/matplotlib/matplotlib/issues/11369)). ## Contour color autoscaling improvements Selection of contour levels is now the same for contour and contourf; previously, for contour, levels outside the data range were deleted. (Exception: if no contour levels are found within the data range, the `levels` attribute is replaced with a list holding only the minimum of the data range.) When contour is called with levels specified as a target number rather than a list, and the \'extend\' kwarg is used, the levels are now chosen such that some data typically will fall in the extended range. When contour is called with a [.LogNorm]{.title-ref} or a [.LogLocator]{.title-ref}, it will now select colors using the geometric mean rather than the arithmetic mean of the contour levels. ## Streamplot last row and column fixed A bug was fixed where the last row and column of data in [\~.Axes.streamplot]{.title-ref} were being dropped. ## Changed default [.AutoDateLocator]{.title-ref} kwarg *interval_multiples* to `True` The default value of the tick locator for dates, [.dates.AutoDateLocator]{.title-ref} kwarg *interval_multiples* was set to `False` which leads to not-nice looking automatic ticks in many instances. The much nicer `interval_multiples=True` is the new default. See below to get the old behavior back: ::: plot import matplotlib.pyplot as plt import datetime import matplotlib.dates as mdates t0 = datetime.datetime(2009, 8, 20, 1, 10, 12) tf = datetime.datetime(2009, 8, 20, 1, 42, 11) fig, axs = plt.subplots(1, 2, constrained_layout=True) ax = axs\[0\] ax.axhspan(t0, tf, facecolor=\"blue\", alpha=0.25) ax.set_ylim(t0 - datetime.timedelta(minutes=3), tf + datetime.timedelta(minutes=3)) ax.set_title(\'NEW DEFAULT\') ax = axs\[1\] ax.axhspan(t0, tf, facecolor=\"blue\", alpha=0.25) ax.set_ylim(t0 - datetime.timedelta(minutes=3), tf + datetime.timedelta(minutes=3)) \# old behavior locator = mdates.AutoDateLocator(interval_multiples=False, ) ax.yaxis.set_major_locator(locator) ax.yaxis.set_major_formatter(mdates.AutoDateFormatter(locator)) ax.set_title(\'OLD\') plt.show() ::: ## [.Axes.get_position]{.title-ref} now returns actual position if aspect changed [.Axes.get_position]{.title-ref} used to return the original position unless a draw had been triggered or [.Axes.apply_aspect]{.title-ref} had been called, even if the kwarg *original* was set to `False`. Now [.Axes.apply_aspect]{.title-ref} is called so `ax.get_position()` will return the new modified position. To get the old behavior use `ax.get_position(original=True)`. ## The ticks for colorbar now adjust for the size of the colorbar Colorbar ticks now adjust for the size of the colorbar if the colorbar is made from a mappable that is not a contour or doesn\'t have a BoundaryNorm, or boundaries are not specified. If boundaries, etc are specified, the colorbar maintains the original behavior. ## Colorbar for log-scaled hexbin When using [\~.Axes.hexbin]{.title-ref} and plotting with a logarithmic color scale, the colorbar ticks are now correctly log scaled. Previously the tick values were linear scaled log(number of counts). ## PGF backend now explicitly makes black text black Previous behavior with the pgf backend was for text specified as black to actually be the default color of whatever was rendering the pgf file (which was of course usually black). The new behavior is that black text is black, regardless of the default color. However, this means that there is no way to fall back on the default color of the renderer. ## Blacklisted rcparams no longer updated by [\~matplotlib.rcdefaults]{.title-ref}, [\~matplotlib.rc_file_defaults]{.title-ref}, [\~matplotlib.rc_file]{.title-ref} The rc modifier functions [\~matplotlib.rcdefaults]{.title-ref}, [\~matplotlib.rc_file_defaults]{.title-ref} and [\~matplotlib.rc_file]{.title-ref} now ignore rcParams in the `matplotlib.style.core.STYLE_BLACKLIST` set. In particular, this prevents the `backend` and `interactive` rcParams from being incorrectly modified by these functions. ## [.CallbackRegistry]{.title-ref} now stores callbacks using stdlib\'s [weakref.WeakMethod]{.title-ref}s In particular, this implies that `CallbackRegistry.callbacks[signal]` is now a mapping of callback ids to [weakref.WeakMethod]{.title-ref}s (i.e., they need to be first called with no arguments to retrieve the method itself). ## Changes regarding the text.latex.unicode rcParam The rcParam now defaults to True and is deprecated (i.e., in future versions of Matplotlib, unicode input will always be supported). Moreover, the underlying implementation now uses `\usepackage[utf8]{inputenc}` instead of `\usepackage{ucs}\usepackage[utf8x]{inputenc}`. ## Return type of ArtistInspector.get_aliases changed `ArtistInspector.get_aliases` previously returned the set of aliases as `{fullname: {alias1: None, alias2: None, ...}}`. The dict-to-None mapping was used to simulate a set in earlier versions of Python. It has now been replaced by a set, i.e. `{fullname: {alias1, alias2, ...}}`. This value is also stored in `ArtistInspector.aliasd`, which has likewise changed. ## Removed `pytz` as a dependency Since `dateutil` and `pytz` both provide time zones, and matplotlib already depends on `dateutil`, matplotlib will now use `dateutil` time zones internally and drop the redundant dependency on `pytz`. While `dateutil` time zones are preferred (and currently recommended in the Python documentation), the explicit use of `pytz` zones is still supported. ## Deprecations ### Modules The following modules are deprecated: - `matplotlib.compat.subprocess`. This was a python 2 workaround, but all the functionality can now be found in the python 3 standard library `subprocess`{.interpreted-text role="mod"}. - `matplotlib.backends.wx_compat`. Python 3 is only compatible with wxPython 4, so support for wxPython 3 or earlier can be dropped. ### Classes, methods, functions, and attributes The following classes, methods, functions, and attributes are deprecated: - `RcParams.msg_depr`, `RcParams.msg_depr_ignore`, `RcParams.msg_depr_set`, `RcParams.msg_obsolete`, `RcParams.msg_backend_obsolete` - `afm.parse_afm` - `backend_pdf.PdfFile.texFontMap` - `backend_pgf.get_texcommand` - `backend_ps.get_bbox` - `backend_qt5.FigureCanvasQT.keyAutoRepeat` (directly check `event.guiEvent.isAutoRepeat()` in the event handler to decide whether to handle autorepeated key presses). - `backend_qt5.error_msg_qt`, `backend_qt5.exception_handler` - `backend_wx.FigureCanvasWx.macros` - `backends.pylab_setup` - `cbook.GetRealpathAndStat`, `cbook.Locked` - `cbook.is_numlike` (use `isinstance(..., numbers.Number)` instead), `cbook.listFiles`, `cbook.unicode_safe` - `container.Container.set_remove_method`, - `contour.ContourLabeler.cl`, `.cl_xy`, and `.cl_cvalues` - `dates.DateFormatter.strftime_pre_1900`, `dates.DateFormatter.strftime` - `font_manager.TempCache` - `image._ImageBase.iterpnames`, use the `interpolation_names` property instead. (this affects classes that inherit from `_ImageBase` including [.FigureImage]{.title-ref}, [.BboxImage]{.title-ref}, and [.AxesImage]{.title-ref}) - `mathtext.unichr_safe` (use `chr` instead) - `patches.Polygon.xy` - `table.Table.get_child_artists` (use `get_children` instead) - `testing.compare.ImageComparisonTest`, `testing.compare.compare_float` - `testing.decorators.CleanupTest`, `testing.decorators.skip_if_command_unavailable` - `FigureCanvasQT.keyAutoRepeat` (directly check `event.guiEvent.isAutoRepeat()` in the event handler to decide whether to handle autorepeated key presses) - `FigureCanvasWx.macros` - `_ImageBase.iterpnames`, use the `interpolation_names` property instead. (this affects classes that inherit from `_ImageBase` including [.FigureImage]{.title-ref}, [.BboxImage]{.title-ref}, and [.AxesImage]{.title-ref}) - `patches.Polygon.xy` - `texmanager.dvipng_hack_alpha` - `text.Annotation.arrow` - `Legend.draggable()`, in favor of [.Legend.set_draggable()]{.title-ref} : (`Legend.draggable` may be reintroduced as a property in future releases) - `textpath.TextToPath.tex_font_map` - `matplotlib.cbook.deprecation.mplDeprecation` will be removed in future versions. It is just an alias for `matplotlib.cbook.deprecation.MatplotlibDeprecationWarning`. Please use `matplotlib.cbook.MatplotlibDeprecationWarning` directly if necessary. - The `matplotlib.cbook.Bunch` class has been deprecated. Instead, use [types.SimpleNamespace]{.title-ref} from the standard library which provides the same functionality. - `Axes.mouseover_set` is now a frozenset, and deprecated. Directly manipulate the artist\'s `.mouseover` attribute to change their mouseover status. The following keyword arguments are deprecated: - passing `verts` to `Axes.scatter` (use `marker` instead) - passing `obj_type` to `cbook.deprecated` The following call signatures are deprecated: - passing a `wx.EvtHandler` as first argument to `backend_wx.TimerWx` ### rcParams The following rcParams are deprecated: - `examples.directory` (use `datapath` instead) - `pgf.debug` (the pgf backend relies on logging) - `text.latex.unicode` (always True now) ### marker styles - Using `(n, 3)` as marker style to specify a circle marker is deprecated. Use `"o"` instead. - Using `([(x0, y0), (x1, y1), ...], 0)` as marker style to specify a custom marker path is deprecated. Use `[(x0, y0), (x1, y1), ...]` instead. ### Deprecation of `LocatableAxes` in toolkits The `LocatableAxes` classes in toolkits have been deprecated. The base [\~.axes.Axes]{.title-ref} classes provide the same functionality to all subclasses, thus these mixins are no longer necessary. Related functions have also been deprecated. Specifically: - `mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase`: no specific replacement; use any other `Axes`-derived class directly instead. - `mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory`: no specific replacement; use any other `Axes`-derived class directly instead. - `mpl_toolkits.axes_grid1.axes_divider.Axes`: use [mpl_toolkits.axes_grid1.mpl_axes.Axes]{.title-ref} directly. - `mpl_toolkits.axes_grid1.axes_divider.LocatableAxes`: use [mpl_toolkits.axes_grid1.mpl_axes.Axes]{.title-ref} directly. - `mpl_toolkits.axisartist.axes_divider.Axes`: use [mpl_toolkits.axisartist.axislines.Axes]{.title-ref} directly. - `mpl_toolkits.axisartist.axes_divider.LocatableAxes`: use [mpl_toolkits.axisartist.axislines.Axes]{.title-ref} directly. ## Removals ### Hold machinery Setting or unsetting `hold` (`deprecated in version 2.0`{.interpreted-text role="ref"}) has now been completely removed. Matplotlib now always behaves as if `hold=True`. To clear an axes you can manually use `~.axes.Axes.cla()`{.interpreted-text role="meth"}, or to clear an entire figure use `~.figure.Figure.clear()`{.interpreted-text role="meth"}. ### Removal of deprecated backends Deprecated backends have been removed: - GTKAgg - GTKCairo - GTK - GDK ### Deprecated APIs The following deprecated API elements have been removed: - The deprecated methods `knownfailureif` and `remove_text` have been removed from `matplotlib.testing.decorators`{.interpreted-text role="mod"}. - The entire contents of `testing.noseclasses` have also been removed. - `matplotlib.checkdep_tex`, `matplotlib.checkdep_xmllint` - `backend_bases.IdleEvent` - `cbook.converter`, `cbook.tostr`, `cbook.todatetime`, `cbook.todate`, `cbook.tofloat`, `cbook.toint`, `cbook.unique`, `cbook.is_string_like`, `cbook.is_sequence_of_strings`, `cbook.is_scalar`, `cbook.soundex`, `cbook.dict_delall`, `cbook.get_split_ind`, `cbook.wrap`, `cbook.get_recursive_filelist`, `cbook.pieces`, `cbook.exception_to_str`, `cbook.allequal`, `cbook.alltrue`, `cbook.onetrue`, `cbook.allpairs`, `cbook.finddir`, `cbook.reverse_dict`, `cbook.restrict_dict`, `cbook.issubclass_safe`, `cbook.recursive_remove`, `cbook.unmasked_index_ranges`, `cbook.Null`, `cbook.RingBuffer`, `cbook.Sorter`, `cbook.Xlator`, - `font_manager.weight_as_number`, `font_manager.ttfdict_to_fnames` - `pyplot.colors`, `pyplot.spectral` - `rcsetup.validate_negative_linestyle`, `rcsetup.validate_negative_linestyle_legacy`, - `testing.compare.verifiers`, `testing.compare.verify` - `testing.decorators.knownfailureif`, `testing.decorators.ImageComparisonTest.remove_text` - `tests.assert_str_equal`, `tests.test_tinypages.file_same` - `texmanager.dvipng_hack_alpha`, - `_AxesBase.axesPatch`, `_AxesBase.set_color_cycle`, `_AxesBase.get_cursor_props`, `_AxesBase.set_cursor_props` - `_ImageBase.iterpnames` - `FigureCanvasBase.start_event_loop_default`; - `FigureCanvasBase.stop_event_loop_default`; - `Figure.figurePatch`, - `FigureCanvasBase.dynamic_update`, `FigureCanvasBase.idle_event`, `FigureCanvasBase.get_linestyle`, `FigureCanvasBase.set_linestyle` - `FigureCanvasQTAggBase` - `FigureCanvasQTAgg.blitbox` - `FigureCanvasTk.show` (alternative: `FigureCanvasTk.draw`) - `FigureManagerTkAgg` (alternative: `FigureManagerTk`) - `NavigationToolbar2TkAgg` (alternative: `NavigationToolbar2Tk`) - `backend_wxagg.Toolbar` (alternative: `backend_wxagg.NavigationToolbar2WxAgg`) - `RendererAgg.debug()` - passing non-numbers to `EngFormatter.format_eng` - passing `frac` to `PolarAxes.set_theta_grids` - any mention of idle events The following API elements have been removed: - `backend_cairo.HAS_CAIRO_CFFI` - `sphinxext.sphinx_version` ### Proprietary sphinx directives The matplotlib documentation used the proprietary sphinx directives `.. htmlonly::`, and `.. latexonly::`. These have been replaced with the standard sphinx directives `.. only:: html` and `.. only:: latex`. This change will not affect any users. Only downstream package maintainers, who have used the proprietary directives in their docs, will have to switch to the sphinx directives. ### lib/mpl_examples symlink The symlink from lib/mpl_examples to ../examples has been removed. This is not installed as an importable package and should not affect end users, however this may require down-stream packagers to adjust. The content is still available top-level examples directory. --- # API Changes for 3.0.1 `matplotlib.tight_layout.auto_adjust_subplotpars` can return `None` now if the new subplotparams will collapse axes to zero width or height. This prevents `tight_layout` from being executed. Similarly `matplotlib.tight_layout.get_tight_layout_figure` will return None. To improve import (startup) time, private modules are now imported lazily. These modules are no longer available at these locations: - `matplotlib.backends.backend_agg._png` - `matplotlib.contour._contour` - `matplotlib.image._png` - `matplotlib.mathtext._png` - `matplotlib.testing.compare._png` - `matplotlib.texmanager._png` - `matplotlib.tri.triangulation._tri` - `matplotlib.tri.triangulation._qhull` - `matplotlib.tri.tricontour._tri` - `matplotlib.tri.trifinder._tri` --- # API Changes for 3.1.0 ::: {.contents local="" depth="1"} ::: ## Behavior changes ### Matplotlib.use Switching backends via [matplotlib.use]{.title-ref} is now allowed by default, regardless of whether [matplotlib.pyplot]{.title-ref} has been imported. If the user tries to switch from an already-started interactive backend to a different interactive backend, an [ImportError]{.title-ref} will be raised. ### Invalid points in PathCollections PathCollections created with [\~.Axes.scatter]{.title-ref} now keep track of invalid points. Previously, points with nonfinite (infinite or nan) coordinates would not be included in the offsets (as returned by [.PathCollection.get_offsets]{.title-ref}) of a [.PathCollection]{.title-ref} created by [\~.Axes.scatter]{.title-ref}, and points with nonfinite values (as specified by the *c* kwarg) would not be included in the array (as returned by [.PathCollection.get_array]{.title-ref}) Such points are now included, but masked out by returning a masked array. If the *plotnonfinite* kwarg to [\~.Axes.scatter]{.title-ref} is set, then points with nonfinite values are plotted using the bad color of the [.collections.PathCollection]{.title-ref}\'s colormap (as set by `.colors.Colormap.set_bad`{.interpreted-text role="meth"}). ### Alpha blending in imshow of RBGA input The alpha-channel of RBGA images is now re-sampled independently of RGB channels. While this is a bug fix, it does change the output and may result in some down-stream image comparison tests to fail. ### Autoscaling On log-axes where a single value is plotted at a \"full\" decade (1, 10, 100, etc.), the autoscaling now expands the axis symmetrically around that point, instead of adding a decade only to the right. ### Log-scaled axes When the default [.LogLocator]{.title-ref} would generate no ticks for an axis (e.g., an axis with limits from 0.31 to 0.39) or only a single tick, it now instead falls back on the linear [.AutoLocator]{.title-ref} to pick reasonable tick positions. ### [.Figure.add_subplot]{.title-ref} with no arguments Calling [.Figure.add_subplot()]{.title-ref} with no positional arguments used to do nothing; this now is equivalent to calling `add_subplot(111)` instead. ### [\~.Axes.bxp]{.title-ref} and rcparams [\~.Axes.bxp]{.title-ref} now respects `boxplot.boxprops.linewidth`{.interpreted-text role="rc"} even when *patch_artist* is set. Previously, when the *patch_artist* parameter was set, [\~.Axes.bxp]{.title-ref} would ignore `boxplot.boxprops.linewidth`{.interpreted-text role="rc"}. This was an oversight \-- in particular, [\~.Axes.boxplot]{.title-ref} did not ignore it. ### Major/minor tick collisions Minor ticks that collide with major ticks are now hidden by default. Previously, certain locator classes ([\~.ticker.LogLocator]{.title-ref}, [\~.ticker.AutoMinorLocator]{.title-ref}) contained custom logic to avoid emitting tick locations that collided with major ticks when they were used as minor locators. This logic has now moved to the [\~.axis.Axis]{.title-ref} class, and is used regardless of the locator class. You can control this behavior via the [\~.Axis.remove_overlapping_locs]{.title-ref} attribute on [\~.axis.Axis]{.title-ref}. If you were relying on both the major and minor tick labels to appear on the same tick, you may need to update your code. For example, the following snippet : import numpy as np import matplotlib.dates as mdates import matplotlib.pyplot as plt t = np.arange("2018-11-03", "2018-11-06", dtype="datetime64") x = np.random.rand(len(t)) fig, ax = plt.subplots() ax.plot(t, x) ax.xaxis.set( major_locator=mdates.DayLocator(), major_formatter=mdates.DateFormatter("\n%a"), minor_locator=mdates.HourLocator((0, 6, 12, 18)), minor_formatter=mdates.DateFormatter("%H:%M"), ) # disable removing overlapping locations ax.xaxis.remove_overlapping_locs = False plt.show() labeled days using major ticks, and hours and minutes using minor ticks and added a newline to the major ticks labels to avoid them crashing into the minor tick labels. Setting the [\~.Axis.remove_overlapping_locs]{.title-ref} property (also accessible via [\~.Axis.set_remove_overlapping_locs]{.title-ref} / [\~.Axis.get_remove_overlapping_locs]{.title-ref} and [\~.pyplot.setp]{.title-ref}) disables removing overlapping tick locations. The major tick labels could also be adjusted include hours and minutes, as the minor ticks are gone, so the `major_formatter` would be: mdates.DateFormatter("%H:%M\n%a") ### usetex support Previously, if `text.usetex`{.interpreted-text role="rc"} was True, then constructing a [.TextPath]{.title-ref} on a non-mathtext string with `usetex=False` would rely on the mathtext parser (but not on usetex support!) to parse the string. The mathtext parser is not invoked anymore, which may cause slight changes in glyph positioning. ### get_window_extents [.matplotlib.axes.Axes.get_window_extent]{.title-ref} used to return a bounding box that was slightly larger than the axes, presumably to take into account the ticks that may be on a spine. However, it was not scaling the tick sizes according to the dpi of the canvas, and it did not check if the ticks were visible, or on the spine. Now [.matplotlib.axes.Axes.get_window_extent]{.title-ref} just returns the axes extent with no padding for ticks. This affects [.matplotlib.axes.Axes.get_tightbbox]{.title-ref} in cases where there are outward ticks with no tick labels, and it also removes the (small) pad around axes in that case. [.spines.Spine.get_window_extent]{.title-ref} now takes into account ticks that are on the spine. ### Sankey Previously, [.Sankey.add]{.title-ref} would only accept a single string as the *labels* argument if its length is equal to the number of flows, in which case it would use one character of the string for each flow. The behavior has been changed to match the documented one: when a single string is passed, it is used to label all the flows. ### [\~.font_manager.FontManager]{.title-ref} scores [.font_manager.FontManager.score_weight]{.title-ref} is now more strict with its inputs. Previously, when a weight string was passed to [.font_manager.FontManager.score_weight]{.title-ref}, - if the weight was the string representation of an integer, it would be converted to that integer, - otherwise, if the weight was not a standard weight name, it would be silently replaced by a value of 500 (\"normal\" weight). [.font_manager.FontManager.score_weight]{.title-ref} now raises an exception on such inputs. ### Text alignment Text alignment was previously incorrect, in particular for multiline text objects with large descenders (i.e. subscripts) and rotated text. These have been fixed and made more consistent, but could make old code that has compensated for this no longer have the correct alignment. ### Upper case color strings Support for passing single-letter colors (one of \"rgbcmykw\") as UPPERCASE characters is deprecated; these colors will become case-sensitive (lowercase) after the deprecation period has passed. The goal is to decrease the number of ambiguous cases when using the `data` keyword to plotting methods; e.g. `plot("X", "Y", data={"X": ..., "Y": ...})` will not warn about \"Y\" possibly being a color anymore after the deprecation period has passed. ### Degenerate limits When bounds passed to [\~.axes.Axes.set_xlim]{.title-ref} are degenerate (i.e. the lower and upper value are equal), the method used to \"expand\" the bounds now matches the expansion behavior of autoscaling when the plot contains a single x-value, and should in particular produce nicer limits for non-linear scales. ### [\~.Axes.plot]{.title-ref} format string parsing In certain cases, [\~.Axes.plot]{.title-ref} would previously accept format strings specifying more than one linestyle (e.g. `"---."` which specifies both `"--"` and `"-."`); only use one of them would be used. This now raises a [ValueError]{.title-ref} instead. ### HTMLWriter The HTMLWriter constructor is more strict: it no longer normalizes unknown values of *default_mode* to \'loop\', but errors out instead. ### AFM parsing In accordance with the AFM spec, the AFM parser no longer truncates the `UnderlinePosition` and `UnderlineThickness` fields to integers. The `Notice` field (which can only be publicly accessed by the deprecated `afm.parse_afm` API) is no longer decoded to a [str]{.title-ref}, but instead kept as [bytes]{.title-ref}, to support non-conformant AFM files that use non-ASCII characters in that field. ### [.Artist.set]{.title-ref} keyword normalisation [.Artist.set]{.title-ref} now normalizes keywords before sorting them. Previously it sorted its keyword arguments in reverse alphabetical order (with a special-case to put `color` at the end) before applying them. It now normalizes aliases (and, as above, emits a warning on duplicate properties) before doing the sorting (so `c` goes to the end too). ### [.Axes.tick_params]{.title-ref} argument checking Previously [.Axes.tick_params]{.title-ref} silently did nothing when an invalid *axis* parameter was supplied. This behavior has been changed to raise a [ValueError]{.title-ref} instead. ### [.Axes.hist]{.title-ref} output Input that consists of multiple empty lists will now return a list of histogram values for each one of the lists. For example, an input of `[[],[]]` will return 2 lists of histogram values. Previously, a single list was returned. ### `backend_bases.TimerBase.remove_callback` future signature change Currently, `backend_bases.TimerBase.remove_callback(func, *args, **kwargs)` removes a callback previously added by `backend_bases.Timer.add_callback(func, *args, **kwargs)`, but if `*args, **kwargs` is not passed in (i.e., `TimerBase.remove_callback(func)`), then the first callback with a matching `func` is removed, regardless of whether it was added with or without `*args, **kwargs`. In a future version, [.TimerBase.remove_callback]{.title-ref} will always use the latter behavior (not consider `*args, **kwargs`); to specifically consider them, add the callback as a [functools.partial]{.title-ref} object : cb = timer.add_callback(functools.partial(func, *args, **kwargs)) # ... # later timer.remove_callback(cb) [.TimerBase.add_callback]{.title-ref} was modified to return *func* to simplify the above usage (previously it returned None); this also allows using it as a decorator. The new API is modelled after [atexit.register]{.title-ref} / [atexit.unregister]{.title-ref}. ### [\~.container.StemContainer]{.title-ref} performance increase [\~.container.StemContainer]{.title-ref} objects can now store a [\~.collections.LineCollection]{.title-ref} object instead of a list of [\~.lines.Line2D]{.title-ref} objects for stem lines plotted using [\~.Axes.stem]{.title-ref}. This gives a very large performance boost to displaying and moving [\~.Axes.stem]{.title-ref} plots. This will become the default behaviour in Matplotlib 3.3. To use it now, the *use_line_collection* keyword argument to [\~.Axes.stem]{.title-ref} can be set to [True]{.title-ref} : ax.stem(..., use_line_collection=True) Individual line segments can be extracted from the [\~.collections.LineCollection]{.title-ref} using [\~.collections.LineCollection.get_segments()]{.title-ref}. See the [\~.collections.LineCollection]{.title-ref} documentation for other methods to retrieve the collection properties. ### [\~matplotlib.colorbar.ColorbarBase]{.title-ref} inheritance [matplotlib.colorbar.ColorbarBase]{.title-ref} is no longer a subclass of [.cm.ScalarMappable]{.title-ref}. This inheritance lead to a confusing situation where the [.cm.ScalarMappable]{.title-ref} passed to [matplotlib.colorbar.Colorbar]{.title-ref} ([\~.Figure.colorbar]{.title-ref}) had a `set_norm` method, as did the colorbar. The colorbar is now purely a follower to the [.ScalarMappable]{.title-ref} norm and colormap, and the old inherited methods `matplotlib.colorbar.ColorbarBase.set_norm`, `matplotlib.colorbar.ColorbarBase.set_cmap`, `matplotlib.colorbar.ColorbarBase.set_clim` are deprecated, as are the getter versions of those calls. To set the norm associated with a colorbar do `colorbar.mappable.set_norm()` etc. ### FreeType and libpng search paths The `MPLBASEDIRLIST` environment variables and `basedirlist` entry in `setup.cfg` have no effect anymore. Instead, if building in situations where FreeType or libpng are not in the compiler or linker\'s default path, set the standard environment variables `CFLAGS`/`LDFLAGS` on Linux or OSX, or `CL`/`LINK` on Windows, to indicate the relevant paths. See details in `/install/index`{.interpreted-text role="doc"}. ### Setting artist properties twice or more in the same call Setting the same artist property multiple time via aliases is deprecated. Previously, code such as : plt.plot([0, 1], c="red", color="blue") would emit a warning indicating that `c` and `color` are aliases of one another, and only keep the `color` kwarg. This behavior has been deprecated; in a future version, this will raise a TypeError, similar to Python\'s behavior when a keyword argument is passed twice : plt.plot([0, 1], c="red", c="blue") This warning is raised by [\~.cbook.normalize_kwargs]{.title-ref}. ### Path code types Path code types like `Path.MOVETO` are now `np.uint8` instead of `int` `Path.STOP`, `Path.MOVETO`, `Path.LINETO`, `Path.CURVE3`, `Path.CURVE4` and `Path.CLOSEPOLY` are now of the type `Path.code_type` (`np.uint8` by default) instead of plain `int`. This makes their type match the array value type of the `Path.codes` array. ### LaTeX code in matplotlibrc file Previously, the rc file keys `pgf.preamble` and `text.latex.preamble` were parsed using commas as separators. This would break valid LaTeX code, such as: \usepackage[protrusion=true, expansion=false]{microtype} The parsing has been modified to pass the complete line to the LaTeX system, keeping all commas. Passing a list of strings from within a Python script still works as it used to. Passing a list containing non-strings now fails, instead of coercing the results to strings. ### [.Axes.spy]{.title-ref} The method [.Axes.spy]{.title-ref} now raises a [TypeError]{.title-ref} for the keyword arguments *interpolation* and *linestyle* instead of silently ignoring them. Furthermore, [.Axes.spy]{.title-ref} spy does now allow for an *extent* argument (was silently ignored so far). A bug with `Axes.spy(..., origin='lower')` is fixed. Previously this flipped the data but not the y-axis resulting in a mismatch between axes labels and actual data indices. Now, *origin=\'lower\'* flips both the data and the y-axis labels. ### Boxplot tick methods The *manage_xticks* parameter of [\~.Axes.boxplot]{.title-ref} and [\~.Axes.bxp]{.title-ref} has been renamed (with a deprecation period) to *manage_ticks*, to take into account the fact that it manages either x or y ticks depending on the *vert* parameter. When `manage_ticks=True` (the default), these methods now attempt to take previously drawn boxplots into account when setting the axis limits, ticks, and tick labels. ### MouseEvents MouseEvents now include the event name in their `str()`. Previously they contained the prefix \"MPL MouseEvent\". ### RGBA buffer return type [.FigureCanvasAgg.buffer_rgba]{.title-ref} and [.RendererAgg.buffer_rgba]{.title-ref} now return a memoryview The `buffer_rgba` method now allows direct access to the renderer\'s underlying buffer (as a `(m, n, 4)`-shape memoryview) rather than copying the data to a new bytestring. This is consistent with the behavior on Py2, where a buffer object was returned. ### `matplotlib.font_manager.win32InstalledFonts` return type `matplotlib.font_manager.win32InstalledFonts` returns an empty list instead of None if no fonts are found. ### `Axes.fmt_xdata` and `Axes.fmt_ydata` error handling Previously, if the user provided a `Axes.fmt_xdata` or `Axes.fmt_ydata` function that raised a [TypeError]{.title-ref} (or set them to a non-callable), the exception would be silently ignored and the default formatter be used instead. This is no longer the case; the exception is now propagated out. ### Deprecation of redundant [.Tick]{.title-ref} attributes The `gridOn`, `tick1On`, `tick2On`, `label1On`, and `label2On` [\~.Tick]{.title-ref} attributes have been deprecated. Directly get and set the visibility on the underlying artists, available as the `gridline`, `tick1line`, `tick2line`, `label1`, and `label2` attributes. The `label` attribute, which was an alias for `label1`, has been deprecated. Subclasses that relied on setting the above visibility attributes needs to be updated; see e.g. `examples/api/skewt.py`{.interpreted-text role="file"}. ### Passing a Line2D\'s drawstyle together with the linestyle is deprecated Instead of `plt.plot(..., linestyle="steps--")`, use `plt.plot(..., linestyle="--", drawstyle="steps")`. `ds` is now an alias for `drawstyle`. ## `pgi` support dropped Support for `pgi` in the GTK3 backends has been dropped. `pgi` is an alternative implementation to `PyGObject`. `PyGObject` should be used instead. ## rcParam changes ### Removed The following deprecated rcParams have been removed: - `text.dvipnghack` - `nbagg.transparent` (use `figure.facecolor`{.interpreted-text role="rc"} instead) - `plugins.directory` - `axes.hold` - `backend.qt4` and `backend.qt5` (set the `QT_API`{.interpreted-text role="envvar"} environment variable instead) ### Deprecated The associated validator functions `rcsetup.validate_qt4` and `validate_qt5` are deprecated. The `verbose.fileo` and `verbose.level` rcParams have been deprecated. These have had no effect since the switch from Matplotlib\'s old custom Verbose logging to the stdlib\'s [logging]{.title-ref} module. In addition the `rcsetup.validate_verbose` function is deprecated. The `text.latex.unicode` rcParam now defaults to `True` and is deprecated (i.e., in future versions of Matplotlib, unicode input will always be supported). Moreover, the underlying implementation now uses `\usepackage[utf8]{inputenc}` instead of `\usepackage{ucs}\usepackage[utf8x]{inputenc}`. ## Exception changes - `mpl_toolkits.axes_grid1.axes_size.GetExtentHelper` now raises [ValueError]{.title-ref} for invalid directions instead of [KeyError]{.title-ref}. - Previously, subprocess failures in the animation framework would raise either in a [RuntimeError]{.title-ref} or a [ValueError]{.title-ref} depending on when the error occurred. They now raise a [subprocess.CalledProcessError]{.title-ref} with attributes set as documented by the exception class. - In certain cases, Axes methods (and pyplot functions) used to raise a [RuntimeError]{.title-ref} if they were called with a `data` kwarg and otherwise mismatched arguments. They now raise a [TypeError]{.title-ref} instead. - [.Axes.streamplot]{.title-ref} does not support irregularly gridded `x` and `y` values. So far, it used to silently plot an incorrect result. This has been changed to raise a [ValueError]{.title-ref} instead. - The `streamplot.Grid` class, which is internally used by streamplot code, also throws a [ValueError]{.title-ref} when irregularly gridded values are passed in. ## Removals The following deprecated APIs have been removed: ### Classes and methods - `Verbose` (replaced by python logging library) - `artist.Artist.hitlist` (no replacement) - `artist.Artist.is_figure_set` (use `artist.figure is not None` instead) - `axis.Axis.unit_data` (use `axis.Axis.units` instead) - `backend_bases.FigureCanvasBase.onRemove` (no replacement) `backend_bases.FigureManagerBase.show_popup` (this never did anything) - `backend_wx.SubplotToolWx` (no replacement) - `backend_wx.Toolbar` (use `backend_wx.NavigationToolbar2Wx` instead) - `cbook.align_iterators` (no replacement) - `contour.ContourLabeler.get_real_label_width` (no replacement) - `legend.Legend.draggable` (use [.legend.Legend.set_draggable()]{.title-ref} instead) - `texmanager.TexManager.postscriptd`, `texmanager.TexManager.pscnt`, `texmanager.TexManager.make_ps`, `texmanager.TexManager.get_ps_bbox` (no replacements) ### Arguments - The *fig* kwarg to [.GridSpec.get_subplot_params]{.title-ref} and [.GridSpecFromSubplotSpec.get_subplot_params]{.title-ref} (use the argument *figure* instead) - Passing \'box-forced\' to [.Axes.set_adjustable]{.title-ref} (use \'box\' instead) - Support for the strings \'on\'/\'true\'/\'off\'/\'false\' to mean [True]{.title-ref} / [False]{.title-ref} (directly use [True]{.title-ref} / [False]{.title-ref} instead). The following functions are affected: - [.axes.Axes.grid]{.title-ref} - [.Axes3D.grid]{.title-ref} - [.Axis.set_tick_params]{.title-ref} - [.pyplot.box]{.title-ref} - Using [.pyplot.axes]{.title-ref} with an [.axes.Axes]{.title-ref} type argument (use [.pyplot.sca]{.title-ref} instead) ### Other The following miscellaneous API elements have been removed - svgfont support (in `svg.fonttype`{.interpreted-text role="rc"}) - Logging is now done with the standard python `logging` library. `matplotlib.verbose` and the command line switches `--verbose-LEVEL` have been removed. To control the logging output use: import logging logger = logging.getLogger('matplotlib') logger.setLevel(logging.INFO) # configure log handling: Either include it into your ``logging`` hierarchy, # e.g. by configuring a root logger using ``logging.basicConfig()``, # or add a standalone handler to the matplotlib logger: logger.addHandler(logging.StreamHandler()) - `__version__numpy__` - `collections.CIRCLE_AREA_FACTOR` - `font_manager.USE_FONTCONFIG` - `font_manager.cachedir` ## `matplotlib.mlab`{.interpreted-text role="mod"} removals Lots of code inside the `matplotlib.mlab`{.interpreted-text role="mod"} module which was deprecated in Matplotlib 2.2 has been removed. See below for a list: - `mlab.exp_safe` (use [numpy.exp]{.title-ref} instead) - `mlab.amap` - `mlab.logspace` (use [numpy.logspace]{.title-ref} instead) - `mlab.rms_flat` - `mlab.l1norm` (use `numpy.linalg.norm(a, ord=1)` instead) - `mlab.l2norm` (use `numpy.linalg.norm(a, ord=2)` instead) - `mlab.norm_flat` (use `numpy.linalg.norm(a.flat, ord=2)` instead) - `mlab.frange` (use [numpy.arange]{.title-ref} instead) - `mlab.identity` (use [numpy.identity]{.title-ref} instead) - `mlab.base_repr` - `mlab.binary_repr` - `mlab.ispower2` - `mlab.log2` (use [numpy.log2]{.title-ref} instead) - `mlab.isvector` - `mlab.movavg` - `mlab.safe_isinf` (use [numpy.isinf]{.title-ref} instead) - `mlab.safe_isnan` (use [numpy.isnan]{.title-ref} instead) - `mlab.cohere_pairs` (use [scipy.signal.coherence]{.title-ref} instead) - `mlab.entropy` (use [scipy.stats.entropy]{.title-ref} instead) - `mlab.normpdf` (use `scipy.stats.norm.pdf` instead) - `mlab.find` (use `np.nonzero(np.ravel(condition))` instead) - `mlab.longest_contiguous_ones` - `mlab.longest_ones` - `mlab.PCA` - `mlab.prctile` (use [numpy.percentile]{.title-ref} instead) - `mlab.prctile_rank` - `mlab.center_matrix` - `mlab.rk4` (use [scipy.integrate.ode]{.title-ref} instead) - `mlab.bivariate_normal` - `mlab.get_xyz_where` - `mlab.get_sparse_matrix` - `mlab.dist` (use [numpy.hypot]{.title-ref} instead) - `mlab.dist_point_to_segment` - `mlab.griddata` (use [scipy.interpolate.griddata]{.title-ref}) - `mlab.less_simple_linear_interpolation` (use [numpy.interp]{.title-ref}) - `mlab.slopes` - `mlab.stineman_interp` - `mlab.segments_intersect` - `mlab.fftsurr` - `mlab.offset_line` - `mlab.quad2cubic` - `mlab.vector_lengths` - `mlab.distances_along_curve` - `mlab.path_length` - `mlab.cross_from_above` - `mlab.cross_from_below` - `mlab.contiguous_regions` (use [.cbook.contiguous_regions]{.title-ref} instead) - `mlab.is_closed_polygon` - `mlab.poly_between` - `mlab.poly_below` - `mlab.inside_poly` - `mlab.csv2rec` - `mlab.rec2csv` (use [numpy.recarray.tofile]{.title-ref} instead) - `mlab.rec2text` (use [numpy.recarray.tofile]{.title-ref} instead) - `mlab.rec_summarize` - `mlab.rec_join` - `mlab.recs_join` - `mlab.rec_groupby` - `mlab.rec_keep_fields` - `mlab.rec_drop_fields` - `mlab.rec_append_fields` - `mlab.csvformat_factory` - `mlab.get_formatd` - `mlab.FormatDatetime` (use [datetime.datetime.strftime]{.title-ref} instead) - `mlab.FormatDate` (use [datetime.date.strftime]{.title-ref} instead) - `mlab.FormatMillions`, `mlab.FormatThousands`, `mlab.FormatPercent`, `mlab.FormatBool`, `mlab.FormatInt`, `mlab.FormatFloat`, `mlab.FormatFormatStr`, `mlab.FormatString`, `mlab.FormatObj` - `mlab.donothing_callback` ## [pylab]{.title-ref} removals Lots of code inside the `matplotlib.mlab`{.interpreted-text role="mod"} module which was deprecated in Matplotlib 2.2 has been removed. This means the following functions are no longer available in the [pylab]{.title-ref} module: - `amap` - `base_repr` - `binary_repr` - `bivariate_normal` - `center_matrix` - `csv2rec` (use [numpy.recarray.tofile]{.title-ref} instead) - `dist` (use [numpy.hypot]{.title-ref} instead) - `dist_point_to_segment` - `distances_along_curve` - `entropy` (use [scipy.stats.entropy]{.title-ref} instead) - `exp_safe` (use [numpy.exp]{.title-ref} instead) - `fftsurr` - `find` (use `np.nonzero(np.ravel(condition))` instead) - `frange` (use [numpy.arange]{.title-ref} instead) - `get_sparse_matrix` - `get_xyz_where` - `griddata` (use [scipy.interpolate.griddata]{.title-ref} instead) - `identity` (use [numpy.identity]{.title-ref} instead) - `inside_poly` - `is_closed_polygon` - `ispower2` - `isvector` - `l1norm` (use `numpy.linalg.norm(a, ord=1)` instead) - `l2norm` (use `numpy.linalg.norm(a, ord=2)` instead) - `log2` (use [numpy.log2]{.title-ref} instead) - `longest_contiguous_ones` - `longest_ones` - `movavg` - `norm_flat` (use `numpy.linalg.norm(a.flat, ord=2)` instead) - `normpdf` (use `scipy.stats.norm.pdf` instead) - `path_length` - `poly_below` - `poly_between` - `prctile` (use [numpy.percentile]{.title-ref} instead) - `prctile_rank` - `rec2csv` (use [numpy.recarray.tofile]{.title-ref} instead) - `rec_append_fields` - `rec_drop_fields` - `rec_join` - `rk4` (use [scipy.integrate.ode]{.title-ref} instead) - `rms_flat` - `segments_intersect` - `slopes` - `stineman_interp` - `vector_lengths` ## mplot3d changes ### Voxel shading [.Axes3D.voxels]{.title-ref} now shades the resulting voxels; for more details see What\'s new. The previous behavior can be achieved by passing : ax.voxels(.., shade=False) ### Equal aspect axes disabled Setting the aspect on 3D axes previously returned non-sensical results (e.g. see `1077`{.interpreted-text role="ghissue"}). Calling `ax.set_aspect('equal')` or `ax.set_aspect(num)` on a 3D axes now raises a [NotImplementedError]{.title-ref}. ### [.Poly3DCollection.set_zsort]{.title-ref} [.Poly3DCollection.set_zsort]{.title-ref} no longer silently ignores invalid inputs, or [False]{.title-ref} (which was always broken). Passing [True]{.title-ref} to mean `"average"` is deprecated. ## Testing The `--no-network` flag to `tests.py` has been removed (no test requires internet access anymore). If it is desired to disable internet access both for old and new versions of Matplotlib, use `tests.py -m 'not network'` (which is now a no-op). The image comparison test decorators now skip (rather than xfail) the test for uncomparable formats. The affected decorators are [\~.image_comparison]{.title-ref} and [\~.check_figures_equal]{.title-ref}. The deprecated `ImageComparisonTest` class is likewise changed. ## Dependency changes ### NumPy Matplotlib 3.1 now requires NumPy\>=1.11. ### ghostscript Support for ghostscript 8.60 (released in 2007) has been removed. The oldest supported version of ghostscript is now 9.0 (released in 2010). ## Mathtext changes - In constructs such as `"$1~2$"`, mathtext now interprets the tilde as a space, consistently with TeX (this was previously a parse error). ### Deprecations - The `\stackrel` mathtext command has been deprecated (it behaved differently from LaTeX\'s `\stackrel`. To stack two mathtext expressions, use `\genfrac{left-delim}{right-delim}{fraction-bar-thickness}{}{top}{bottom}`. - The `\mathcircled` mathtext command (which is not a real TeX command) is deprecated. Directly use unicode characters (e.g. `"\N{CIRCLED LATIN CAPITAL LETTER A}"` or `"\u24b6"`) instead. - Support for setting `mathtext.default`{.interpreted-text role="rc"} to circled is deprecated. ## Signature deprecations The following signature related behaviours are deprecated: - The *withdash* keyword argument to [.Axes.text()]{.title-ref}. Consider using [.Axes.annotate()]{.title-ref} instead. - Passing (n, 1)-shaped error arrays to [.Axes.errorbar()]{.title-ref}, which was not documented and did not work for `n = 2`. Pass a 1D array instead. - The *frameon* keyword argument to [\~.Figure.savefig]{.title-ref} and the `savefig.frameon` rcParam. To emulate `frameon = False`, set *facecolor* to fully transparent (`"none"`, or `(0, 0, 0, 0)`). - Passing a non-1D (typically, (n, 1)-shaped) input to [.Axes.pie]{.title-ref}. Pass a 1D array instead. - The [.TextPath]{.title-ref} constructor used to silently drop ignored arguments; this behavior is deprecated. - The *usetex* parameter of [.TextToPath.get_text_path]{.title-ref} is deprecated and folded into the *ismath* parameter, which can now take the values [False]{.title-ref}, [True]{.title-ref}, and `"TeX"`, consistently with other low-level text processing functions. - Passing `'normal'` to [.axes.Axes.axis()]{.title-ref} is deprecated, use `ax.axis('auto')` instead. - Passing the *block* argument of [.pyplot.show]{.title-ref} positionally is deprecated; it should be passed by keyword. - When using the nbagg backend, [.pyplot.show]{.title-ref} used to silently accept and ignore all combinations of positional and keyword arguments. This behavior is deprecated. - The unused *shape* and *imlim* parameters to [.Axes.imshow]{.title-ref} are deprecated. To avoid triggering the deprecation warning, the *filternorm*, *filterrad*, *resample*, and *url* arguments should be passed by keyword. - The *interp_at_native* parameter to [.BboxImage]{.title-ref}, which has had no effect since Matplotlib 2.0, is deprecated. - All arguments to the `matplotlib.cbook.deprecation.deprecated` decorator and `matplotlib.cbook.deprecation.warn_deprecated` function, except the first one (the version where the deprecation occurred), are now keyword-only. The goal is to avoid accidentally setting the \"message\" argument when the \"name\" (or \"alternative\") argument was intended, as this has repeatedly occurred in the past. - The arguments of [matplotlib.testing.compare.calculate_rms]{.title-ref} have been renamed from `expectedImage, actualImage`, to `expected_image, actual_image`. - Passing positional arguments to [.Axis.set_ticklabels]{.title-ref} beyond *ticklabels* itself has no effect, and support for them is deprecated. - Passing `shade=None` to [\~.axes3d.Axes3D.plot_surface]{.title-ref} is deprecated. This was an unintended implementation detail with the same semantics as `shade=False`. Please use the latter code instead. - [matplotlib.ticker.MaxNLocator]{.title-ref} and its *set_params* method will issue a warning on unknown keyword arguments instead of silently ignoring them. Future versions will raise an error. ## Changes in parameter names - The *arg* parameter to [matplotlib.use]{.title-ref} has been renamed to *backend*. This will only affect cases where that parameter has been set as a keyword argument. The common usage pattern as a positional argument `matplotlib.use('Qt5Agg')` is not affected. - The *normed* parameter to [.Axes.hist2d]{.title-ref} has been renamed to *density*. - The *s* parameter to [.Annotation]{.title-ref} (and indirectly [.Axes.annotate]{.title-ref}) has been renamed to *text*. - The *tolerence* parameter to [.bezier.find_bezier_t_intersecting_with_closedpath]{.title-ref}, [.bezier.split_bezier_intersecting_with_closedpath]{.title-ref}, `bezier.find_r_to_boundary_of_closedpath`, [.bezier.split_path_inout]{.title-ref} and [.bezier.check_if_parallel]{.title-ref} has been renamed to *tolerance*. In each case, the old parameter name remains supported (it cannot be used simultaneously with the new name), but support for it will be dropped in Matplotlib 3.3. ## Class/method/attribute deprecations Support for custom backends that do not provide a [.GraphicsContextBase.set_hatch_color]{.title-ref} method is deprecated. We suggest that custom backends let their `GraphicsContext` class inherit from [.GraphicsContextBase]{.title-ref}, to at least provide stubs for all required methods. - `spine.Spine.is_frame_like` This has not been used in the codebase since its addition in 2009. - `axis3d.Axis.get_tick_positions` This has never been used internally, there is no equivalent method exists on the 2D Axis classes, and despite the similar name, it has a completely different behavior from the 2D Axis\' `axis.Axis.get_ticks_position` method. - `.backend_pgf.LatexManagerFactory` - `mpl_toolkits.axisartist.axislines.SimpleChainedObjects` - `mpl_toolkits.Axes.AxisDict` ### Internal Helper Functions - `checkdep_dvipng` - `checkdep_ghostscript` - `checkdep_pdftops` - `checkdep_inkscape` - `ticker.decade_up` - `ticker.decade_down` - `cbook.dedent` - `docstring.Appender` - `docstring.dedent` - `docstring.copy_dedent` Use the standard library\'s docstring manipulation tools instead, such as [inspect.cleandoc]{.title-ref} and [inspect.getdoc]{.title-ref}. - `matplotlib.scale.get_scale_docs()` - `matplotlib.pyplot.get_scale_docs()` These are considered internal and will be removed from the public API in a future version. - `projections.process_projection_requirements` - `backend_ps.PsBackendHelper` - `backend_ps.ps_backend_helper`, - `cbook.iterable` - `cbook.get_label` - `cbook.safezip` Manually check the lengths of the inputs instead, or rely on NumPy to do it. - `cbook.is_hashable` Use `isinstance(..., collections.abc.Hashable)` instead. - The `.backend_bases.RendererBase.strip_math`. Use [.cbook.strip_math]{.title-ref} instead. Multiple internal functions that were exposed as part of the public API of [.mpl_toolkits.mplot3d]{.title-ref} are deprecated, **mpl_toolkits.mplot3d.art3d** - `mpl_toolkits.mplot3d.art3d.norm_angle` - `mpl_toolkits.mplot3d.art3d.norm_text_angle` - `mpl_toolkits.mplot3d.art3d.path_to_3d_segment` - `mpl_toolkits.mplot3d.art3d.paths_to_3d_segments` - `mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes` - `mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes` - `mpl_toolkits.mplot3d.art3d.get_patch_verts` - `mpl_toolkits.mplot3d.art3d.get_colors` - `mpl_toolkits.mplot3d.art3d.zalpha` **mpl_toolkits.mplot3d.proj3d** - `mpl_toolkits.mplot3d.proj3d.line2d` - `mpl_toolkits.mplot3d.proj3d.line2d_dist` - `mpl_toolkits.mplot3d.proj3d.line2d_seg_dist` - `mpl_toolkits.mplot3d.proj3d.mod` - `mpl_toolkits.mplot3d.proj3d.proj_transform_vec` - `mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip` - `mpl_toolkits.mplot3d.proj3d.vec_pad_ones` - `mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points` If your project relies on these functions, consider vendoring them. ### Font Handling - `backend_pdf.RendererPdf.afm_font_cache` - `backend_ps.RendererPS.afmfontd` - `font_manager.OSXInstalledFonts` - `.TextToPath.glyph_to_path` (Instead call `font.get_path()` and manually transform the path.) ### Date related functions - `dates.seconds()` - `dates.minutes()` - `dates.hours()` - `dates.weeks()` - `dates.strpdate2num` - `dates.bytespdate2num` These are brittle in the presence of locale changes. Use standard datetime parsers such as [time.strptime]{.title-ref} or [dateutil.parser.parse]{.title-ref}, and additionally call [matplotlib.dates.date2num]{.title-ref} if you need to convert to Matplotlib\'s internal datetime representation; or use `dates.datestr2num`. ### Axes3D - `.axes3d.Axes3D.w_xaxis` - `.axes3d.Axes3D.w_yaxis` - `.axes3d.Axes3D.w_zaxis` Use `axes3d.Axes3D.xaxis`, `axes3d.Axes3D.yaxis` and `axes3d.Axes3D.zaxis` instead. ### Testing - `matplotlib.testing.decorators.switch_backend` decorator Test functions should use `pytest.mark.backend`, and the mark will be picked up by the `matplotlib.testing.conftest.mpl_test_settings` fixture. ### Quiver - `.color` attribute of [.Quiver]{.title-ref} objects Instead, use (as for any [.Collection]{.title-ref}) the `get_facecolor` method. Note that setting to the `.color` attribute did not update the quiver artist, whereas calling `set_facecolor` does. ### GUI / backend details - `.get_py2exe_datafiles` - `.tk_window_focus` - `.backend_gtk3.FileChooserDialog` - `.backend_gtk3.NavigationToolbar2GTK3.get_filechooser` - `.backend_gtk3.SaveFigureGTK3.get_filechooser` - `.NavigationToolbar2QT.adj_window` attribute. This is unused and always `None`. - `.backend_wx.IDLE_DELAY` global variable This is unused and only relevant to the now removed wx \"idling\" code (note that as it is a module-level global, no deprecation warning is emitted when accessing it). - `mlab.demean` - `backend_gtk3cairo.FigureCanvasGTK3Cairo`, - `backend_wx.debug_on_error`, `backend_wx.fake_stderr`, `backend_wx.raise_msg_to_str`, `backend_wx.MenuButtonWx`, `backend_wx.PrintoutWx`, - `matplotlib.backends.qt_editor.formlayout` module This module is a vendored, modified version of the official [formlayout](https://pypi.org/project/formlayout/) module available on PyPI. Install that module separately if you need it. - `GraphicsContextPS.shouldstroke` ### Transforms / scales - `LogTransformBase` - `Log10Transform` - `Log2Transform`, - `NaturalLogTransformLog` - `InvertedLogTransformBase` - `InvertedLog10Transform` - `InvertedLog2Transform` - `InvertedNaturalLogTransform` These classes defined in `matplotlib.scale`{.interpreted-text role="mod"} are deprecated. As a replacement, use the general [\~.scale.LogTransform]{.title-ref} and [\~.scale.InvertedLogTransform]{.title-ref} classes, whose constructors take a *base* argument. ### Locators / Formatters - `OldScalarFormatter.pprint_val` - `ScalarFormatter.pprint_val` - `LogFormatter.pprint_val` These are helper methods that do not have a consistent signature across formatter classes. ### Path tools - `path.get_paths_extents` Use [\~.path.get_path_collection_extents]{.title-ref} instead. - `.Path.has_nonfinite` attribute Use `not np.isfinite(path.vertices).all()` instead. - `.bezier.find_r_to_boundary_of_closedpath` function is deprecated This has always returned None instead of the requested radius. ### Text - `text.TextWithDash` - `Text.is_math_text` - `TextPath.is_math_text` - `TextPath.text_get_vertices_codes` (As an alternative, construct a new `TextPath` object.) ### Unused attributes - `NavigationToolbar2QT.buttons` - `Line2D.verticalOffset` - `Quiver.keytext` - `Quiver.keyvec` - `SpanSelector.buttonDown` These are unused and never updated. ### Sphinx extensions - `matplotlib.sphinxext.mathmpl.math_directive` - `matplotlib.sphinxext.plot_directive.plot_directive` This is because the `matplotlib.sphinxext.mathmpl` and `matplotlib.sphinxext.plot_directive` interfaces have changed from the (Sphinx-)deprecated function-based interface to a class-based interface; this should not affect end users. - `mpl_toolkits.axisartist.axis_artist.UnimplementedException` ### Environmental Variables - The `MATPLOTLIBDATA` environment variable ### Axis - `Axis.iter_ticks` This only served as a helper to the private `Axis._update_ticks` ## Undeprecations The following API elements have been un-deprecated: - The *obj_type* keyword argument to the `matplotlib.cbook.deprecation.deprecated` decorator. - *xmin*, *xmax* keyword arguments to [.Axes.set_xlim]{.title-ref} and *ymin*, *ymax* keyword arguments to [.Axes.set_ylim]{.title-ref} ## New features ### [.Text]{.title-ref} now has a `c` alias for the `color` property For consistency with [.Line2D]{.title-ref}, the [\~.text.Text]{.title-ref} class has gained the `c` alias for the `color` property. For example, one can now write : ax.text(.5, .5, "foo", c="red") ### `Cn` colors now support `n>=10` It is now possible to go beyond the tenth color in the property cycle using `Cn` syntax, e.g. : plt.plot([1, 2], color="C11") now uses the 12th color in the cycle. Note that previously, a construct such as: plt.plot([1, 2], "C11") would be interpreted as a request to use color `C1` and marker `1` (an \"inverted Y\"). To obtain such a plot, one should now use : plt.plot([1, 2], "1C1") (so that the first \"1\" gets correctly interpreted as a marker specification), or, more explicitly: plt.plot([1, 2], marker="1", color="C1") ### New [.Formatter.format_ticks]{.title-ref} method The [.Formatter]{.title-ref} class gained a new [\~.Formatter.format_ticks]{.title-ref} method, which takes the list of all tick locations as a single argument and returns the list of all formatted values. It is called by the axis tick handling code and, by default, first calls [\~.Formatter.set_locs]{.title-ref} with all locations, then repeatedly calls `Formatter.__call__` for each location. Tick-handling code in the codebase that previously performed this sequence ([\~.Formatter.set_locs]{.title-ref} followed by repeated `Formatter.__call__`) have been updated to use [\~.Formatter.format_ticks]{.title-ref}. [\~.Formatter.format_ticks]{.title-ref} is intended to be overridden by [.Formatter]{.title-ref} subclasses for which the formatting of a tick value depends on other tick values, such as [.ConciseDateFormatter]{.title-ref}. ### Added support for RGB(A) images in pcolorfast pcolorfast now accepts 3D images (RGB or RGBA) arrays if the X and Y specifications allow image or pcolorimage rendering; they remain unsupported by the more general quadmesh rendering ## Invalid inputs Passing invalid locations to [\~.Axes.legend]{.title-ref} and [\~.Axes.table]{.title-ref} used to fallback on a default location. This behavior is deprecated and will throw an exception in a future version. [.offsetbox.AnchoredText]{.title-ref} is unable to handle the *horizontalalignment* or *verticalalignment* kwargs, and used to ignore them with a warning. This behavior is deprecated and will throw an exception in a future version. Passing steps less than 1 or greater than 10 to [\~.ticker.MaxNLocator]{.title-ref} used to result in undefined behavior. It now throws a [ValueError]{.title-ref}. The signature of the (private) `Axis._update_ticks` has been changed to not take the renderer as argument anymore (that argument is unused). --- # API Changes for 3.1.1 ::: {.contents local="" depth="1"} ::: ## Behavior changes ### Locator.nonsingular return order [.Locator.nonsingular]{.title-ref} (introduced in mpl 3.1) now returns a range `v0, v1` with `v0 <= v1`. This behavior is consistent with the implementation of `nonsingular` by the [.LogLocator]{.title-ref} and [.LogitLocator]{.title-ref} subclasses. --- # Behavior Changes ## onselect argument to selector widgets made optional The *onselect* argument to [.EllipseSelector]{.title-ref}, [.LassoSelector]{.title-ref}, [.PolygonSelector]{.title-ref}, and [.RectangleSelector]{.title-ref} is no longer required. ## `NavigationToolbar2.save_figure` now returns filepath of saved figure `NavigationToolbar2.save_figure` function may return the filename of the saved figure. If a backend implements this functionality it should return [None]{.title-ref} in the case where no figure is actually saved (because the user closed the dialog without saving). If the backend does not or can not implement this functionality (currently the Gtk4 backends and webagg backends do not) this method will return `NavigationToolbar2.UNKNOWN_SAVED_STATUS`. ## SVG output: improved reproducibility Some SVG-format plots [produced different output on each render](https://github.com/matplotlib/matplotlib/issues/27831), even with a static `svg.hashsalt` value configured. The problem was a non-deterministic ID-generation scheme for clip paths; the fix introduces a repeatable, monotonically increasing integer ID scheme as a replacement. Provided that plots add clip paths themselves in deterministic order, this enables repeatable (a.k.a. reproducible, deterministic) SVG output. ## ft2font classes are now final The ft2font classes [.ft2font.FT2Font]{.title-ref}, and [.ft2font.FT2Image]{.title-ref} are now final and can no longer be subclassed. ## `InsetIndicator` artist [\~.Axes.indicate_inset]{.title-ref} and [\~.Axes.indicate_inset_zoom]{.title-ref} now return an instance of [\~matplotlib.inset.InsetIndicator]{.title-ref}. Use the [\~matplotlib.inset.InsetIndicator.rectangle]{.title-ref} and [\~matplotlib.inset.InsetIndicator.connectors]{.title-ref} properties of this artist to access the objects that were previously returned directly. ## `imshow` *interpolation_stage* default changed to \'auto\' The *interpolation_stage* parameter of [\~.Axes.imshow]{.title-ref} has a new default value \'auto\'. For images that are up-sampled less than a factor of three or down-sampled, image interpolation will occur in \'rgba\' space. For images that are up-sampled by a factor of 3 or more, then image interpolation occurs in \'data\' space. The previous default was \'data\', so down-sampled images may change subtly with the new default. However, the new default also avoids floating point artifacts at sharp boundaries in a colormap when down-sampling. The previous behavior can achieved by setting the *interpolation_stage* parameter or `image.interpolation_stage`{.interpreted-text role="rc"} to \'data\'. ## imshow default *interpolation* changed to \'auto\' The *interpolation* parameter of [\~.Axes.imshow]{.title-ref} has a new default value \'auto\', changed from \'antialiased\', for consistency with *interpolation_stage* and because the interpolation is only anti-aliasing during down-sampling. Passing \'antialiased\' still works, and behaves exactly the same as \'auto\', but is discouraged. ## dark_background and fivethirtyeight styles no longer set `savefig.facecolor` and `savefig.edgecolor` When using these styles, `savefig.facecolor`{.interpreted-text role="rc"} and `savefig.edgecolor`{.interpreted-text role="rc"} now inherit the global default value of \"auto\", which means that the actual figure colors will be used. Previously, these rcParams were set to the same values as `figure.facecolor`{.interpreted-text role="rc"} and `figure.edgecolor`{.interpreted-text role="rc"}, i.e. a saved figure would always use the theme colors even if the user manually overrode them; this is no longer the case. This change should have no impact for users that do not manually set the figure face and edge colors. ## Add zorder option in QuiverKey `zorder` can be used as a keyword argument to [.QuiverKey]{.title-ref}. Previously, that parameter did not have any effect because the zorder was hard coded. ## Subfigures [.Figure.subfigures]{.title-ref} are now added in row-major order to be consistent with [.Figure.subplots]{.title-ref}. The return value of [\~.Figure.subfigures]{.title-ref} is not changed, but the order of `fig.subfigs` is. ## (Sub)Figure.get_figure \...in future will by default return the direct parent figure, which may be a SubFigure. This will make the default behavior consistent with the [\~matplotlib.artist.Artist.get_figure]{.title-ref} method of other artists. To control the behavior, use the newly introduced *root* parameter. ## `transforms.AffineDeltaTransform` updates correctly on axis limit changes Before this change, transform sub-graphs with `AffineDeltaTransform` did not update correctly. This PR ensures that changes to the child transform are passed through correctly. ## The offset string associated with ConciseDateFormatter will now invert when the axis is inverted Previously, when the axis was inverted, the offset string associated with ConciseDateFormatter would not change, so the offset string indicated the axis was oriented in the wrong direction. Now, when the axis is inverted, the offset string is oriented correctly. ## `suptitle` in compressed layout Compressed layout now automatically positions the [\~.Figure.suptitle]{.title-ref} just above the top row of axes. To keep this title in its previous position, either pass `in_layout=False` or explicitly set `y=0.98` in the [\~.Figure.suptitle]{.title-ref} call. --- # Deprecations ## Positional parameters in plotting functions Many plotting functions will restrict positional arguments to the first few parameters in the future. All further configuration parameters will have to be passed as keyword arguments. This is to enforce better code and and allow for future changes with reduced risk of breaking existing code. ## Changing `Figure.number` Changing `Figure.number` is deprecated. This value is used by [.pyplot]{.title-ref} to identify figures. It must stay in sync with the pyplot internal state and is not intended to be modified by the user. ## `PdfFile.hatchPatterns` \... is deprecated. ## (Sub)Figure.set_figure \...is deprecated and in future will always raise an exception. The parent and root figures of a (Sub)Figure are set at instantiation and cannot be changed. ## `Poly3DCollection.get_vector` \... is deprecated with no replacement. ## Deprecated `register` on `matplotlib.patches._Styles` and subclasses This class method is never used internally. Due to the internal check in the method it only accepts subclasses of a private baseclass embedded in the host class which makes it unlikely that it has been used externally. ## matplotlib.validate_backend \...is deprecated. Please use [matplotlib.rcsetup.validate_backend]{.title-ref} instead. ## matplotlib.sanitize_sequence \...is deprecated. Please use [matplotlib.cbook.sanitize_sequence]{.title-ref} instead. ## ft2font module-level constants replaced by enums The [.ft2font]{.title-ref}-level constants have been converted to [enum]{.title-ref} classes, and all API using them now take/return the new types. The following constants are now part of [.ft2font.Kerning]{.title-ref} (without the `KERNING_` prefix): - `KERNING_DEFAULT` - `KERNING_UNFITTED` - `KERNING_UNSCALED` The following constants are now part of [.ft2font.LoadFlags]{.title-ref} (without the `LOAD_` prefix): - `LOAD_DEFAULT` - `LOAD_NO_SCALE` - `LOAD_NO_HINTING` - `LOAD_RENDER` - `LOAD_NO_BITMAP` - `LOAD_VERTICAL_LAYOUT` - `LOAD_FORCE_AUTOHINT` - `LOAD_CROP_BITMAP` - `LOAD_PEDANTIC` - `LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH` - `LOAD_NO_RECURSE` - `LOAD_IGNORE_TRANSFORM` - `LOAD_MONOCHROME` - `LOAD_LINEAR_DESIGN` - `LOAD_NO_AUTOHINT` - `LOAD_TARGET_NORMAL` - `LOAD_TARGET_LIGHT` - `LOAD_TARGET_MONO` - `LOAD_TARGET_LCD` - `LOAD_TARGET_LCD_V` The following constants are now part of \`.ft2font.FaceFlags\`: - `EXTERNAL_STREAM` - `FAST_GLYPHS` - `FIXED_SIZES` - `FIXED_WIDTH` - `GLYPH_NAMES` - `HORIZONTAL` - `KERNING` - `MULTIPLE_MASTERS` - `SCALABLE` - `SFNT` - `VERTICAL` The following constants are now part of \`.ft2font.StyleFlags\`: - `ITALIC` - `BOLD` ## FontProperties initialization [.FontProperties]{.title-ref} initialization is limited to the two call patterns: - single positional parameter, interpreted as fontconfig pattern - only keyword parameters for setting individual properties All other previously supported call patterns are deprecated. ## `AxLine` `xy1` and `xy2` setters These setters now each take a single argument, `xy1` or `xy2` as a tuple. The old form, where `x` and `y` were passed as separate arguments, is deprecated. ## Calling `pyplot.polar()` with an existing non-polar Axes This currently plots the data into the non-polar Axes, ignoring the \"polar\" intention. This usage scenario is deprecated and will raise an error in the future. ## Passing floating-point values to `RendererAgg.draw_text_image` Any floating-point values passed to the *x* and *y* parameters were truncated to integers silently. This behaviour is now deprecated, and only [int]{.title-ref} values should be used. ## Passing floating-point values to `FT2Image` Any floating-point values passed to the [.FT2Image]{.title-ref} constructor, or the *x0*, *y0*, *x1*, and *y1* parameters of [.FT2Image.draw_rect_filled]{.title-ref} were truncated to integers silently. This behaviour is now deprecated, and only [int]{.title-ref} values should be used. ## `boxplot` and `bxp` *vert* parameter, and `rcParams["boxplot.vertical"]` The parameter *vert: bool* has been deprecated on [\~.Axes.boxplot]{.title-ref} and [\~.Axes.bxp]{.title-ref}. It is replaced by *orientation: {\"vertical\", \"horizontal\"}* for API consistency. `rcParams["boxplot.vertical"]`, which controlled the orientation of `boxplot`, is deprecated without replacement. This deprecation is currently marked as pending and will be fully deprecated in Matplotlib 3.11. ## `violinplot` and `violin` *vert* parameter The parameter *vert: bool* has been deprecated on [\~.Axes.violinplot]{.title-ref} and [\~.Axes.violin]{.title-ref}. It will be replaced by *orientation: {\"vertical\", \"horizontal\"}* for API consistency. This deprecation is currently marked as pending and will be fully deprecated in Matplotlib 3.11. ## `proj3d.proj_transform_clip` \... is deprecated with no replacement. --- # Development changes ## Documentation-specific custom Sphinx roles are now semi-public For third-party packages that derive types from Matplotlib, our use of custom roles may prevent Sphinx from building their docs. These custom Sphinx roles are now public solely for the purposes of use within projects that derive from Matplotlib types. See `matplotlib.sphinxext.roles`{.interpreted-text role="mod"} for details. ## Increase to minimum supported versions of dependencies For Matplotlib 3.10, the `minimum supported versions `{.interpreted-text role="ref"} are being bumped: +------------+-----------------+----------------+ | Dependency | > min in mpl3.9 | min in mpl3.10 | +============+=================+================+ | > Python | > 3.9 | > 3.10 | +------------+-----------------+----------------+ This is consistent with our `min_deps_policy`{.interpreted-text role="ref"} and [SPEC0](https://scientific-python.org/specs/spec-0000/) --- # Removals ## ttconv removed The `matplotlib._ttconv` extension has been removed. Most of its functionaliy was already replaced by other code, and the only thing left was embedding TTF fonts in PostScript in Type 42 format. This is now done in the PS backend using the FontTools library. ## Remove hard reference to `lastevent` in `LocationEvent` This was previously used to detect exiting from axes, however the hard reference would keep closed [.Figure]{.title-ref} objects and their children alive longer than expected. ## `ft2font.FT2Image.draw_rect` and `ft2font.FT2Font.get_xys` \... have been removed as they are unused. ## `Tick.set_label`, `Tick.set_label1` and `Tick.set_label2` \... are removed. Calling these methods from third-party code usually had no effect, as the labels are overwritten at draw time by the tick formatter. ## Functions in `mpl_toolkits.mplot3d.proj3d` The function `transform` is just an alias for `proj_transform`, use the latter instead. The following functions were either unused (so no longer required in Matplotlib) or considered private. - `ortho_transformation` - `persp_transformation` - `proj_points` - `proj_trans_points` - `rot_x` - `rotation_about_vector` - `view_transformation` ## Arguments other than `renderer` to `get_tightbbox` \... are keyword-only arguments. This is for consistency and that different classes have different additional arguments. ## Method parameters renamed to match base classes The only parameter of `transform_affine` and `transform_non_affine` in `Transform` subclasses is renamed to *values*. The *points* parameter of `transforms.IdentityTransform.transform` is renamed to *values*. The *trans* parameter of `table.Cell.set_transform` is renamed to *t* consistently with [.Artist.set_transform]{.title-ref}. The *clippath* parameters of `axis.Axis.set_clip_path` and `axis.Tick.set_clip_path` are renamed to *path* consistently with [.Artist.set_clip_path]{.title-ref}. The *s* parameter of `images.NonUniformImage.set_filternorm` is renamed to *filternorm* consistently with `_ImageBase.set_filternorm`. The *s* parameter of `images.NonUniformImage.set_filterrad` is renamed to *filterrad* consistently with `_ImageBase.set_filterrad`. The only parameter of `Annotation.contains` and `Legend.contains` is renamed to *mouseevent* consistently with [.Artist.contains]{.title-ref}. ## Method parameters renamed The *p* parameter of `BboxBase.padded` is renamed to *w_pad*, consistently with the other parameter, *h_pad* ## *numdecs* parameter and attribute of `LogLocator` \... are removed without replacement, because they had no effect. The `PolyQuadMesh` class requires full 2D arrays of values \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~ Previously, if a masked array was input, the list of polygons within the collection would shrink to the size of valid polygons and users were required to keep track of which polygons were drawn and call `set_array()` with the smaller \"compressed\" array size. Passing the \"compressed\" and flattened array values will no longer work and the full 2D array of values (including the mask) should be passed to [.PolyQuadMesh.set_array]{.title-ref}. `ContourSet.collections` \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~ \... has been removed. [\~.ContourSet]{.title-ref} is now implemented as a single [\~.Collection]{.title-ref} of paths, each path corresponding to a contour level, possibly including multiple unconnected components. ## `ContourSet.antialiased` \... has been removed. Use [\~.Collection.get_antialiased]{.title-ref} or [\~.Collection.set_antialiased]{.title-ref} instead. Note that [\~.Collection.get_antialiased]{.title-ref} returns an array. ## `tcolors` and `tlinewidths` attributes of `ContourSet` \... have been removed. Use [\~.Collection.get_facecolor]{.title-ref}, [\~.Collection.get_edgecolor]{.title-ref} or [\~.Collection.get_linewidths]{.title-ref} instead. ## `calc_label_rot_and_inline` method of `ContourLabeler` \... has been removed without replacement. ## `add_label_clabeltext` method of `ContourLabeler` \... has been removed. Use [\~.ContourLabeler.add_label]{.title-ref} instead. Passing extra positional arguments to `Figure.add_axes` \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~ Positional arguments passed to [.Figure.add_axes]{.title-ref} other than a rect or an existing `Axes` were previously ignored, and is now an error. ## Artists explicitly passed in will no longer be filtered by legend() based on their label Previously, artists explicitly passed to `legend(handles=[...])` are filtered out if their label starts with an underscore. This filter is no longer applied; explicitly filter out such artists (`[art for art in artists if not art.get_label().startswith('_')]`) if necessary. Note that if no handles are specified at all, then the default still filters out labels starting with an underscore. ## The parameter of `Annotation.contains` and `Legend.contains` is renamed to *mouseevent* \... consistently with [.Artist.contains]{.title-ref}. ## Support for passing the \"frac\" key in `annotate(..., arrowprops={"frac": ...})` \... has been removed. This key has had no effect since Matplotlib 1.5. ## Passing non-int or sequence of non-int to `Table.auto_set_column_width` Column numbers are ints, and formerly passing any other type was effectively ignored. This has now become an error. ## Widgets The *visible* attribute getter of `*Selector` widgets has been removed; use `get_visible` instead. ## Auto-closing of figures when switching backend Allowable backend switches (i.e. those that do not swap a GUI event loop with another one) will not close existing figures. If necessary, call `plt.close("all")` before switching. ## `FigureCanvasBase.switch_backends` \... has been removed with no replacement. ## Accessing `event.guiEvent` after event handlers return \... is no longer supported, and `event.guiEvent` will be set to None once the event handlers return. For some GUI toolkits, it is unsafe to use the event, though you may separately stash the object at your own risk. ## `PdfPages(keep_empty=True)` A zero-page PDF is not valid, thus passing `keep_empty=True` to [.backend_pdf.PdfPages]{.title-ref} and [.backend_pgf.PdfPages]{.title-ref}, and the `keep_empty` attribute of these classes, is no longer allowed, and empty PDF files will not be created. Furthermore, [.backend_pdf.PdfPages]{.title-ref} no longer immediately creates the target file upon instantiation, but only when the first figure is saved. To fully control file creation, directly pass an opened file object as argument (`with open(path, "wb") as file, PdfPages(file) as pdf: ...`). ## `backend_ps.psDefs` The `psDefs` module-level variable in `backend_ps` has been removed with no replacement. ## Automatic papersize selection in PostScript Setting `ps.papersize`{.interpreted-text role="rc"} to `'auto'` or passing `papersize='auto'` to [.Figure.savefig]{.title-ref} is no longer supported. Either pass an explicit paper type name, or omit this parameter to use the default from the rcParam. ## `RendererAgg.tostring_rgb` and `FigureCanvasAgg.tostring_rgb` \... have been remove with no direct replacement. Consider using `buffer_rgba` instead, which should cover most use cases. ## `NavigationToolbar2QT.message` has been removed \... with no replacement. ## `TexManager.texcache` \... is considered private and has been removed. The location of the cache directory is clarified in the doc-string. ## `cbook` API changes `cbook.Stack` has been removed with no replacement. `Grouper.clean()` has been removed with no replacement. The Grouper class now cleans itself up automatically. The *np_load* parameter of `cbook.get_sample_data` has been removed; [.get_sample_data]{.title-ref} now auto-loads numpy arrays. Use `get_sample_data(..., asfileobj=False)` instead to get the filename of the data file, which can then be passed to [open]{.title-ref}, if desired. ## Calling `paths.get_path_collection_extents` with empty *offsets* Calling [\~.get_path_collection_extents]{.title-ref} with an empty *offsets* parameter has an ambiguous interpretation and is no longer allowed. ## `bbox.anchored()` with no explicit container Not passing a *container* argument to [.BboxBase.anchored]{.title-ref} is no longer supported. ## `INVALID_NON_AFFINE`, `INVALID_AFFINE`, `INVALID` attributes of `TransformNode` These attributes have been removed. ## `axes_grid1` API changes `anchored_artists.AnchoredEllipse` has been removed. Instead, directly construct an [.AnchoredOffsetbox]{.title-ref}, an [.AuxTransformBox]{.title-ref}, and an [\~.patches.Ellipse]{.title-ref}, as demonstrated in `/gallery/misc/anchored_artists`{.interpreted-text role="doc"}. The `axes_divider.AxesLocator` class has been removed. The `new_locator` method of divider instances now instead returns an opaque callable (which can still be passed to `ax.set_axes_locator`). `axes_divider.Divider.locate` has been removed; use `Divider.new_locator(...)(ax, renderer)` instead. `axes_grid.CbarAxesBase.toggle_label` has been removed. Instead, use standard methods for manipulating colorbar labels ([.Colorbar.set_label]{.title-ref}) and tick labels ([.Axes.tick_params]{.title-ref}). `inset_location.InsetPosition` has been removed; use [\~.Axes.inset_axes]{.title-ref} instead. ## `axisartist` API changes The `axisartist.axes_grid` and `axisartist.axes_rgb` modules, which provide wrappers combining the functionality of [.axes_grid1]{.title-ref} and [.axisartist]{.title-ref}, have been removed; directly use e.g. `AxesGrid(..., axes_class=axislines.Axes)` instead. Calling an axisartist Axes to mean [\~matplotlib.pyplot.axis]{.title-ref} has been removed; explicitly call the method instead. `floating_axes.GridHelperCurveLinear.get_data_boundary` has been removed. Use `grid_finder.extreme_finder(*[None] * 5)` to get the extremes of the grid. --- # API Changes for 3.10.0 ::: {.contents local="" depth="1"} ::: --- # API Changes for 3.10.1 ## Behaviour ### *alpha* parameter handling on images When passing and array to `imshow(..., alpha=...)`, the parameter was silently ignored if the image data was a RGB or RBGA image or if `interpolation_state`{.interpreted-text role="rc"} resolved to \"rbga\". This is now fixed, and the alpha array overwrites any previous transparency information. --- # API Changes for 3.10.7 ## Development ### New minimum version of pyparsing The minimum required version of `pyparsing` has been updated from 2.3.1 to 3.0.0. --- # Behavior changes ## Reduced default value of `axes.formatter.limits`{.interpreted-text role="rc"} Changed the default value of `axes.formatter.limits`{.interpreted-text role="rc"} from -7, 7 to -5, 6 for better readability. ::: plot import matplotlib.pyplot as plt import numpy as np fig, (ax_old, ax_new) = plt.subplots(1, 2, constrained_layout=True) ax_new.set_title(\'new values (-5, 6)\') ax_old.set_title(\'old values (-7, 7)\') x = np.logspace(-8, 8, 1024) y = 1e-5 \* np.exp(-x / 1e5) + 1e-6 ax_old.xaxis.get_major_formatter().set_powerlimits((-7, 7)) ax_old.yaxis.get_major_formatter().set_powerlimits((-7, 7)) for ax in \[ax_new, ax_old\]: : ax.plot(x, y) ax.set_xlim(0, 1e6) ax.set_ylim(1e-6, 1e-5) ::: ## [matplotlib.colorbar.Colorbar]{.title-ref} uses un-normalized axes for all mappables Before 3.0, [matplotlib.colorbar.Colorbar]{.title-ref} ([\~.Figure.colorbar]{.title-ref}) normalized all axes limits between 0 and 1 and had custom tickers to handle the labelling of the colorbar ticks. After 3.0, colorbars constructed from mappables that were *not* contours were constructed with axes that had limits between `vmin` and `vmax` of the mappable\'s norm, and the tickers were made children of the normal axes tickers. This version of Matplotlib extends that to mappables made by contours, and allows the axes to run between the lowest boundary in the contour and the highest. Code that worked around the normalization between 0 and 1 will need to be modified. ## `MovieWriterRegistry` [.MovieWriterRegistry]{.title-ref} now always checks the availability of the writer classes before returning them. If one wishes, for example, to get the first available writer, without performing the availability check on subsequent writers, it is now possible to iterate over the registry, which will yield the names of the available classes. ## Autoscaling {#api-changes-3-2-0-autoscaling} Matplotlib used to recompute autoscaled limits after every plotting (`plot()`, `bar()`, etc.) call. It now only does so when actually rendering the canvas, or when the user queries the Axes limits. This is a major performance improvement for plots with a large number of artists. In particular, this means that artists added manually with [.Axes.add_line]{.title-ref}, [.Axes.add_patch]{.title-ref}, etc. will be taken into account by the autoscale, even without an explicit call to [.Axes.autoscale_view]{.title-ref}. In some cases, this can result in different limits being reported. If this is an issue, consider triggering a draw with `fig.canvas.draw()`. Autoscaling has also changed for artists that are based on the [.Collection]{.title-ref} class. Previously, the method that calculates the automatic limits [.Collection.get_datalim]{.title-ref} tried to take into account the size of objects in the collection and make the limits large enough to not clip any of the object, i.e., for [.Axes.scatter]{.title-ref} it would make the limits large enough to not clip any markers in the scatter. This is problematic when the object size is specified in physical space, or figure-relative space, because the transform from physical units to data limits requires knowing the data limits, and becomes invalid when the new limits are applied. This is an inverse problem that is theoretically solvable (if the object is physically smaller than the axes), but the extra complexity was not deemed worth it, particularly as the most common use case is for markers in scatter that are usually small enough to be accommodated by the default data limit margins. While the new behavior is algorithmically simpler, it is conditional on properties of the [.Collection]{.title-ref} object: 1. `offsets = None`, `transform` is a child of `Axes.transData`: use the paths for the automatic limits (i.e. for [.LineCollection]{.title-ref} in [.Axes.streamplot]{.title-ref}). 2. `offsets != None`, and `offset_transform` is child of `Axes.transData`: a) `transform` is child of `Axes.transData`: use the `path + offset` for limits (i.e., for [.Axes.bar]{.title-ref}). b) `transform` is not a child of `Axes.transData`: just use the offsets for the limits (i.e. for scatter) 3. otherwise return a null [.Bbox]{.title-ref}. While this seems complicated, the logic is simply to use the information from the object that are in data space for the limits, but not information that is in physical units. ## log-scale bar() / hist() autolimits The autolimits computation in [\~.Axes.bar]{.title-ref} and [\~.Axes.hist]{.title-ref} when the axes already uses log-scale has changed to match the computation when the axes is switched to log-scale after the call to [\~.Axes.bar]{.title-ref} and [\~.Axes.hist]{.title-ref}, and when calling `bar(..., log=True)` / `hist(..., log=True)`: if there are at least two different bar heights, add the normal axes margins to them (in log-scale); if there is only a single bar height, expand the axes limits by one order of magnitude around it and then apply axes margins. ## Axes labels spanning multiple rows/columns `Axes.label_outer` now correctly keep the x labels and tick labels visible for Axes spanning multiple rows, as long as they cover the last row of the Axes grid. (This is consistent with keeping the y labels and tick labels visible for Axes spanning multiple columns as long as they cover the first column of the Axes grid.) The `Axes.is_last_row` and `Axes.is_last_col` methods now correctly return True for Axes spanning multiple rows, as long as they cover the last row or column respectively. Again this is consistent with the behavior for axes covering the first row or column. The `Axes.rowNum` and `Axes.colNum` attributes are deprecated, as they only refer to the first grid cell covered by the Axes. Instead, use the new `ax.get_subplotspec().rowspan` and `ax.get_subplotspec().colspan` properties, which are [range]{.title-ref} objects indicating the whole span of rows and columns covered by the subplot. (Note that all methods and attributes mentioned here actually only exist on the `Subplot` subclass of [\~.axes.Axes]{.title-ref}, which is used for grid-positioned Axes but not for Axes positioned directly in absolute coordinates.) The [.GridSpec]{.title-ref} class gained the `nrows` and `ncols` properties as more explicit synonyms for the parameters returned by `GridSpec.get_geometry`. ## Locators When more than [.Locator.MAXTICKS]{.title-ref} ticks are generated, the behavior of [.Locator.raise_if_exceeds]{.title-ref} changed from raising a RuntimeError to emitting a log at WARNING level. ## nonsingular Locators `Locator.nonsingular` (introduced in mpl 3.1), `DateLocator.nonsingular`, and `AutoDateLocator.nonsingular` now returns a range `v0, v1` with `v0 <= v1`. This behavior is consistent with the implementation of `nonsingular` by the `LogLocator` and `LogitLocator` subclasses. ## `get_data_ratio` `Axes.get_data_ratio` now takes the axes scale into account (linear, log, logit, etc.) before computing the y-to-x ratio. This change allows fixed aspects to be applied to any combination of x and y scales. ## Artist sticky edges Previously, the `sticky_edges` attribute of artists was a list of values such that if an axis limit coincides with a sticky edge, it would not be expanded by the axes margins (this is the mechanism that e.g. prevents margins from being added around images). `sticky_edges` now have an additional effect on margins application: even if an axis limit did not coincide with a sticky edge, it cannot *cross* a sticky edge through margin application \-- instead, the margins will only expand the axis limit until it bumps against the sticky edge. This change improves the margins of axes displaying a \`\~.Axes.streamplot\`: - if the streamplot goes all the way to the edges of the vector field, then the axis limits are set to match exactly the vector field limits (whereas they would sometimes be off by a small floating point error previously). - if the streamplot does not reach the edges of the vector field (e.g., due to the use of `start_points` and `maxlength`), then margins expansion will not cross the vector field limits anymore. This change is also used internally to ensure that polar plots don\'t display negative *r* values unless the user really passes in a negative value. ## `gid` in svg output Previously, if a figure, axis, legend or some other artists had a custom `gid` set (e.g. via `.set_gid()`), this would not be reflected in the svg output. Instead a default gid, like `figure_1` would be shown. This is now fixed, such that e.g. `fig.set_gid("myfigure")` correctly shows up as `` in the svg file. If you relied on the gid having the default format, you now need to make sure not to set the `gid` parameter of the artists. ## Fonts Font weight guessing now first checks for the presence of the FT_STYLE_BOLD_FLAG before trying to match substrings in the font name. In particular, this means that Times New Roman Bold is now correctly detected as bold, not normal weight. ## Color-like checking [matplotlib.colors.is_color_like]{.title-ref} used to return True for all string representations of floats. However, only those with values in 0-1 are valid colors (representing grayscale values). [.is_color_like]{.title-ref} now returns False for string representations of floats outside 0-1. ## Default image interpolation Images displayed in Matplotlib previously used nearest-neighbor interpolation, leading to aliasing effects for downscaling and non-integer upscaling. New default for `image.interpolation`{.interpreted-text role="rc"} is the new option \"antialiased\". `imshow(A, interpolation='antialiased')` will apply a Hanning filter when resampling the data in A for display (or saving to file) *if* the upsample rate is less than a factor of three, and not an integer; downsampled data is always smoothed at resampling. To get the old behavior, set `image.interpolation`{.interpreted-text role="rc"} to the old default \"nearest\" (or specify the `interpolation` kwarg of [.Axes.imshow]{.title-ref}) To always get the anti-aliasing behavior, no matter what the up/down sample rate, set `image.interpolation`{.interpreted-text role="rc"} to \"hanning\" (or one of the other filters available). Note that the \"hanning\" filter was chosen because it has only a modest performance penalty. Anti-aliasing can be improved with other filters. ## rcParams When using [.RendererSVG]{.title-ref} with `rcParams["svg.image_inline"] == True`, externally written images now use a single counter even if the `renderer.basename` attribute is overwritten, rather than a counter per basename. This change will only affect you if you used `rcParams["svg.image_inline"] = True` (the default is False) *and* manually modified `renderer.basename`. Changed the default value of `axes.formatter.limits`{.interpreted-text role="rc"} from -7, 7 to -5, 6 for better readability. ## `add_subplot()` [.Figure.add_subplot()]{.title-ref} and [.pyplot.subplot()]{.title-ref} do not accept a *figure* keyword argument anymore. It only used to work anyway if the passed figure was `self` or the current figure, respectively. ## `indicate_inset()` In \<= 3.1.0, [\~matplotlib.axes.Axes.indicate_inset]{.title-ref} and [\~matplotlib.axes.Axes.indicate_inset_zoom]{.title-ref} were documented as returning a 4-tuple of [\~matplotlib.patches.ConnectionPatch]{.title-ref}, where in fact they returned a 4-length list. They now correctly return a 4-tuple. [\~matplotlib.axes.Axes.indicate_inset]{.title-ref} would previously raise an error if the optional *inset_ax* was not supplied; it now completes successfully, and returns *None* instead of the tuple of `ConnectionPatch`. ## PGF backend The pgf backend\'s get_canvas_width_height now returns the canvas size in display units rather than in inches, which it previously did. The new behavior is the correct one given the uses of `get_canvas_width_height` in the rest of the codebase. The pgf backend now includes images using `\includegraphics` instead of `\pgfimage` if the version of `graphicx` is recent enough to support the `interpolate` option (this is detected automatically). ## [\~matplotlib.cbook]{.title-ref} The default value of the \"obj_type\" parameter to `cbook.warn_deprecated` has been changed from \"attribute\" (a default that was never used internally) to the empty string. ## Testing The test suite no longer turns on the Python fault handler by default. Set the standard `PYTHONFAULTHANDLER` environment variable to do so. ## Backend `supports_blit` Backends do not need to explicitly define the flag `supports_blit` anymore. This is only relevant for backend developers. Backends had to define the flag `supports_blit`. This is not needed anymore because the blitting capability is now automatically detected. ## Exception changes Various APIs that raised a [ValueError]{.title-ref} for incorrectly typed inputs now raise [TypeError]{.title-ref} instead: [.backend_bases.GraphicsContextBase.set_clip_path]{.title-ref}, `blocking_input.BlockingInput.__call__`, `matplotlib.cm.register_cmap`, [.dviread.DviFont]{.title-ref}, [.rcsetup.validate_hatch]{.title-ref}, `.rcsetup.validate_animation_writer_path`, [.spines.Spine]{.title-ref}, many classes in the `matplotlib.transforms`{.interpreted-text role="mod"} module and `matplotlib.tri`{.interpreted-text role="mod"} package, and Axes methods that take a `norm` parameter. If extra kwargs are passed to [.LogScale]{.title-ref}, [TypeError]{.title-ref} will now be raised instead of [ValueError]{.title-ref}. ## mplot3d auto-registration [mpl_toolkits.mplot3d]{.title-ref} is always registered by default now. It is no longer necessary to import mplot3d to create 3d axes with : ax = fig.add_subplot(111, projection="3d") ## [.SymLogNorm]{.title-ref} now has a *base* parameter Previously, [.SymLogNorm]{.title-ref} had no *base* keyword argument and the base was hard-coded to `base=np.e`. This was inconsistent with the default behavior of [.SymmetricalLogScale]{.title-ref} (which defaults to `base=10`) and the use of the word \"decade\" in the documentation. In preparation for changing the default base to 10, calling [.SymLogNorm]{.title-ref} without the new *base* keyword argument emits a deprecation warning. --- # Deprecations ## [matplotlib.use]{.title-ref} The `warn` parameter to [matplotlib.use()]{.title-ref} is deprecated (catch the [ImportError]{.title-ref} emitted on backend switch failure and reemit a warning yourself if so desired). ## plotfile `.pyplot.plotfile` is deprecated in favor of separately loading and plotting the data. Use pandas or NumPy to load data, and pandas or matplotlib to plot the resulting data. ## axes and axis Setting `Axis.major.locator`, `Axis.minor.locator`, `Axis.major.formatter` or `Axis.minor.formatter` to an object that is not a subclass of [.Locator]{.title-ref} or [.Formatter]{.title-ref} (respectively) is deprecated. Note that these attributes should usually be set using [.Axis.set_major_locator]{.title-ref}, [.Axis.set_minor_locator]{.title-ref}, etc. which already raise an exception when an object of the wrong class is passed. Passing more than one positional argument or unsupported keyword arguments to [\~matplotlib.axes.Axes.axis()]{.title-ref} is deprecated (such arguments used to be silently ignored). ## `minor` argument will become keyword-only Using the parameter `minor` to `get_*ticks()` / `set_*ticks()` as a positional parameter is deprecated. It will become keyword-only in future versions. ## `axes_grid1` The `mpl_toolkits.axes_grid1.colorbar` module and its colorbar implementation are deprecated in favor of `matplotlib.colorbar`{.interpreted-text role="mod"}, as the former is essentially abandoned and the latter is a more featureful replacement with a nearly compatible API (for example, the following additional keywords are supported: `panchor`, `extendfrac`, `extendrect`). The main differences are: - Setting the ticks on the colorbar is done by calling `colorbar.set_ticks` rather than `colorbar.cbar_axis.set_xticks` or `colorbar.cbar_axis.set_yticks`; the `locator` parameter to `colorbar()` is deprecated in favor of its synonym `ticks` (which already existed previously, and is consistent with `matplotlib.colorbar`{.interpreted-text role="mod"}). - The colorbar\'s long axis is accessed with `colorbar.xaxis` or `colorbar.yaxis` depending on the orientation, rather than `colorbar.cbar_axis`. - The default ticker is no longer `MaxNLocator(5)`, but a `_ColorbarAutoLocator`. - Overdrawing multiple colorbars on top of one another in a single Axes (e.g. when using the `cax` attribute of [\~.axes_grid1.axes_grid.ImageGrid]{.title-ref} elements) is not supported; if you previously relied on the second colorbar being drawn over the first, you can call `cax.cla()` to clear the axes before drawing the second colorbar. During the deprecation period, the `mpl_toolkits.legacy_colorbar` rcParam can be set to True to use `mpl_toolkits.axes_grid1.colorbar` in `mpl_toolkits.axes_grid1`{.interpreted-text role="mod"} code with a deprecation warning (the default), or to False to use `matplotlib.colorbar`. Passing a `pad` size of `None` (the default) as a synonym for zero to the `append_axes`, `new_horizontal` and `new_vertical` methods of [.axes_grid1.axes_divider.AxesDivider]{.title-ref} is deprecated. In a future release, the default value of `None` will mean \"use `figure.subplot.wspace`{.interpreted-text role="rc"} or `figure.subplot.hspace`{.interpreted-text role="rc"}\" (depending on the orientation). Explicitly pass `pad=0` to keep the old behavior. ## Axes3D `mplot3d.axis3d.get_flip_min_max` is deprecated. `axes3d.unit_bbox` is deprecated (use `Bbox.unit` instead). `axes3d.Axes3D.w_xaxis`, `.w_yaxis`, and `.w_zaxis` are deprecated (use `.xaxis`, `.yaxis`, and `.zaxis` instead). ## [matplotlib.cm]{.title-ref} `cm.revcmap` is deprecated. Use [.Colormap.reversed]{.title-ref} to reverse a colormap. `cm.datad` no longer contains entries for reversed colormaps in their \"unconverted\" form. ## axisartist `mpl_toolkits.axisartist.grid_finder.GridFinderBase` is deprecated (its only use is to be inherited by the [.GridFinder]{.title-ref} class which just provides more defaults in the constructor and directly sets the transforms, so `GridFinderBase`\'s methods were just moved to [.GridFinder]{.title-ref}). `axisartist.axis_artist.BezierPath` is deprecated (use [.patches.PathPatch]{.title-ref} to draw arbitrary Paths). `AxisArtist.line` is now a [.patches.PathPatch]{.title-ref} instance instead of a `BezierPath` instance. Returning a factor equal to None from axisartist Locators (which are **not** the same as \"standard\" tick Locators), or passing a factor equal to None to axisartist Formatters (which are **not** the same as \"standard\" tick Formatters) is deprecated. Pass a factor equal to 1 instead. For the [mpl_toolkits.axisartist.axis_artist.AttributeCopier]{.title-ref} class, the constructor and the `set_ref_artist` method, and the *default_value* parameter of `get_attribute_from_ref_artist`, are deprecated. Deprecation of the constructor means that classes inheriting from [.AttributeCopier]{.title-ref} should no longer call its constructor. ## Locators The unused `Locator.autoscale` method is deprecated (pass the axis limits to [.Locator.view_limits]{.title-ref} instead). ## Animation The following methods and attributes of the [.MovieWriterRegistry]{.title-ref} class are deprecated: `set_dirty`, `ensure_not_dirty`, `reset_available_writers`, `avail`. ## `smart_bounds()` The \"smart_bounds\" functionality is deprecated. This includes `Axis.set_smart_bounds()`, `Axis.get_smart_bounds()`, `Spine.set_smart_bounds()`, and `Spine.get_smart_bounds()`. ## `boxplot()` Setting the `whis` parameter of [.Axes.boxplot]{.title-ref} and [.cbook.boxplot_stats]{.title-ref} to \"range\" to mean \"the whole data range\" is deprecated; set it to (0, 100) (which gets interpreted as percentiles) to achieve the same effect. ## `fill_between()` Passing scalars to parameter *where* in `fill_between()` and `fill_betweenx()` is deprecated. While the documentation already states that *where* must be of the same size as *x* (or *y*), scalars were accepted and broadcasted to the size of *x*. Non-matching sizes will raise a `ValueError` in the future. ## `scatter()` Passing the *verts* parameter to [.axes.Axes.scatter]{.title-ref} is deprecated; use the *marker* parameter instead. ## `tight_layout()` The `renderer` parameter to [.Figure.tight_layout]{.title-ref} is deprecated; this method now always uses the renderer instance cached on the [.Figure]{.title-ref}. ## rcParams The `rcsetup.validate_animation_writer_path` function is deprecated. Setting `savefig.format`{.interpreted-text role="rc"} to \"auto\" is deprecated; use its synonym \"png\" instead. Setting `text.hinting`{.interpreted-text role="rc"} to True or False is deprecated; use their synonyms \"auto\" or \"none\" instead. `rcsetup.update_savefig_format` is deprecated. `rcsetup.validate_path_exists` is deprecated (use `os.path.exists` to check whether a path exists). `rcsetup.ValidateInterval` is deprecated. ## Dates `dates.mx2num` is deprecated. ## TK `NavigationToolbar2Tk.set_active` is deprecated, as it has no (observable) effect. ## WX `FigureFrameWx.statusbar` and `NavigationToolbar2Wx.statbar` are deprecated. The status bar can be retrieved by calling standard wx methods (`frame.GetStatusBar()` and `toolbar.GetTopLevelParent().GetStatusBar()`). `backend_wx.ConfigureSubplotsWx.configure_subplots` and `backend_wx.ConfigureSubplotsWx.get_canvas` are deprecated. ## PGF `backend_pgf.repl_escapetext` and `backend_pgf.repl_mathdefault` are deprecated. `RendererPgf.latexManager` is deprecated. ## FigureCanvas `FigureCanvasBase.draw_cursor` (which has never done anything and has never been overridden in any backend) is deprecated. `FigureCanvasMac.invalidate` is deprecated in favor of its synonym, `FigureCanvasMac.draw_idle`. The `dryrun` parameter to the various `FigureCanvasFoo.print_foo` methods is deprecated. ## QuiverKey doc `quiver.QuiverKey.quiverkey_doc` is deprecated; use `quiver.QuiverKey.__init__.__doc__` instead. ## [matplotlib.mlab]{.title-ref} `mlab.apply_window` and `mlab.stride_repeat` are deprecated. ## Fonts `font_manager.JSONEncoder` is deprecated. Use [.font_manager.json_dump]{.title-ref} to dump a [.FontManager]{.title-ref} instance. `font_manager.createFontList` is deprecated. [.font_manager.FontManager.addfont]{.title-ref} is now available to register a font at a given path. The `as_str`, `as_rgba_str`, `as_array`, `get_width` and `get_height` methods of `matplotlib.ft2font.FT2Image` are deprecated. Convert the `FT2Image` to a NumPy array with `np.asarray` before processing it. ## Colors The function `matplotlib.colors.makeMappingArray` is not considered part of the public API any longer. Thus, it\'s deprecated. Using a string of single-character colors as a color sequence (e.g. \"rgb\") is deprecated. Use an explicit list instead. ## Scales Passing unsupported keyword arguments to [.ScaleBase]{.title-ref}, and its subclasses [.LinearScale]{.title-ref} and [.SymmetricalLogScale]{.title-ref}, is deprecated and will raise a [TypeError]{.title-ref} in 3.3. If extra keyword arguments are passed to [.LogScale]{.title-ref}, [TypeError]{.title-ref} will now be raised instead of [ValueError]{.title-ref}. ## Testing The `matplotlib.testing.disable_internet` module is deprecated. Use (for example) [pytest-remotedata](https://pypi.org/project/pytest-remotedata/) instead. Support in [matplotlib.testing]{.title-ref} for nose-based tests is deprecated (a deprecation is emitted if using e.g. the decorators from that module while both 1) matplotlib\'s conftests have not been called and 2) nose is in `sys.modules`). `testing.is_called_from_pytest` is deprecated. During the deprecation period, to force the generation of nose base tests, import nose first. The *switch_backend_warn* parameter to `matplotlib.test` has no effect and is deprecated. `testing.jpl_units.UnitDbl.UnitDbl.checkUnits` is deprecated. ## `DivergingNorm` renamed to `TwoSlopeNorm` `DivergingNorm` was a misleading name; although the norm was developed with the idea that it would likely be used with diverging colormaps, the word \'diverging\' does not describe or evoke the norm\'s mapping function. Since that function is monotonic, continuous, and piece-wise linear with two segments, the norm has been renamed to [.TwoSlopeNorm]{.title-ref} ## Misc `matplotlib.get_home` is deprecated (use e.g. `os.path.expanduser("~")`) instead. `matplotlib.compare_versions` is deprecated (use comparison of `distutils.version.LooseVersion`s instead). `matplotlib.checkdep_ps_distiller` is deprecated. `matplotlib.figure.AxesStack` is considered private API and will be removed from the public API in future versions. `BboxBase.is_unit` is deprecated (check the Bbox extents if needed). `Affine2DBase.matrix_from_values(...)` is deprecated. Use (for example) `Affine2D.from_values(...).get_matrix()` instead. `style.core.is_style_file` and `style.core.iter_style_files` are deprecated. ## The `datapath` rcParam Use [.get_data_path]{.title-ref} instead. (The rcParam is deprecated because it cannot be meaningfully set by an end user.) The rcParam had no effect from 3.2.0, but was deprecated only in 3.2.1. In 3.2.1+ if `'datapath'` is set in a `matplotlibrc` file it will be respected, but this behavior will be removed in 3.3. --- # Development changes ## Windows build Previously, when building the `matplotlib._png` extension, the build script would add \"png\" and \"z\" to the extensions `.libraries` attribute (if pkg-config information is not available, which is in particular the case on Windows). In particular, this implies that the Windows build would look up files named `png.lib` and `z.lib`; but neither libpng upstream nor zlib upstream provides these files by default. (On Linux, this would look up `libpng.so` and `libz.so`, which are indeed standard names.) Instead, on Windows, we now look up `libpng16.lib` and `zlib.lib`, which *are* the upstream names for the shared libraries (as of libpng 1.6.x). For a statically-linked build, the upstream names are `libpng16_static.lib` and `zlibstatic.lib`; one still needs to manually rename them if such a build is desired. ## Packaging DLLs Previously, it was possible to package Windows DLLs into the Matplotlib wheel (or sdist) by copying them into the source tree and setting the `package_data.dlls` entry in `setup.cfg`. DLLs copied in the source tree are now always packaged; the `package_data.dlls` entry has no effect anymore. If you do not want to include the DLLs, don\'t copy them into the source tree. --- # Removals The `matplotlib.testing.determinism` module, which exposes no public API, has been deleted. The following API elements have been removed: - `backend_gtk3.PIXELS_PER_INCH` - `backend_pgf.re_escapetext`, `backend_pgf.re_mathdefault`. - the `matplotlib.backends.tkagg`, `matplotlib.backends.windowing`, `matplotlib.backends.wx_compat`, and `matplotlib.compat.subprocess` modules - `RcParams.msg_depr`, `RcParams.msg_depr_ignore`, `RcParams.msg_depr_set`, `RcParams.msg_obsolete`, `RcParams.msg_backend_obsolete` - `afm.parse_afm` (use `afm.AFM instead`) - `axes.Axes.mouseover_set` - `backend_cairo.ArrayWrapper`, `backend_cairo.RendererCairo.convert_path` - `backend_gtk3.FileChooserDialog.sorted_filetypes` (use `sorted(self.filetypes.items())` instead) - `backend_pgf.get_texcommand` - `backend_pdf.PdfFile.texFontMap` - `backend_ps.get_bbox` - `backend_qt.FigureCanvasQt.keyAutoRepeat` (use `event.guiEvent.isAutoRepeat` instead), `backend_qt.error_msg_qt`, `backend_qt.exception_handler` - `backend_wx.FigureCanvasWx.macros` - `backends.pylab_setup` - `cbook.Bunch` (use `types.SimpleNamespace` instead), `cbook.Locked`, `cbook.unicode_safe`, `cbook.is_numlike` (use `isinstance(..., numbers.Number)` instead), `cbook.mkdirs` (use `os.makedirs(..., exist_ok=True)` instead), `cbook.GetRealpathAndStat` (use `cbook.get_realpath_and_stat` instead), `cbook.listFiles` - `container.Container.set_remove_method` - `contour.ContourLabeler.cl`, `contour.ContourLabeler.cl_xy`, `contour.ContourLabeler.cl_cvalues` (use `labelTexts`, `labelXYs`, `labelCValues` instead) - `dates.DateFormatter.strftime`, `dates.DateFormatter.strftime_pre_1900` - `font_manager.TempCache`, `font_manager.FontManager.ttffiles`, `font_manager.FontManager.afmfiles` - `mathtext.unichr_safe` (use `chr` instead) - `patches.YAArrow` (use `patches.FancyArrowPatch` instead) - `sphinxext.plot_directive.remove_coding` - `table.Table.get_child_artists` - `testing.compare.compare_float`, `testing.decorators.CleanupTest`, `testing.decorators.ImageComparisonTest`, `testing.decorators.skip_if_command_unavailable`, support for nose-based tests - `text.Annotation.arrow` (use `text.Annotation.arrow_patch` instead) - `textpath.TextToPath.tex_font_map` - `ticker.Base`, `ticker.closeto`, `ticker.nearest_long` - `axes_grid1.axes_divider.LocatableAxesBase`, `axes_grid1.axes_divider.locatable_axes_factory`, `axes_grid1.axes_divider.Axes` (use `axes_grid1.mpl_axes.Axes` instead), `axes_grid1.axes_divider.LocatableAxes` (use `axes_grid1.mpl_axes.Axes` instead) - `axisartist.axes_divider.Axes`, `axisartist.axes_divider.LocatableAxes` (use `axisartist.axislines.Axes` instead) - the *normed* keyword argument to `hist` (use *density* instead) - passing `(verts, 0)` or `(..., 3)` when specifying a marker to specify a path or a circle, respectively (instead, use `verts` or `"o"`, respectively) - the `examples.directory` rcParam The following members of `matplotlib.backends.backend_pdf.PdfFile` were removed: - `nextObject` - `nextFont` - `nextAlphaState` - `nextHatch` - `nextImage` - `alphaStateObject` The `required_interactive_framework` attribute of backend modules introduced in Matplotlib 3.0 has been moved to the `FigureCanvas` class, in order to let it be inherited by third-party canvas subclasses and to make it easier to know what interactive framework is required by a canvas class. `backend_qt4.FigureCanvasQT5`, which is an alias for `backend_qt5.FigureCanvasQT` (but only exists under that name in `backend_qt4`), has been removed. --- # API Changes for 3.2.0 ::: {.contents local="" depth="1"} ::: --- # Behaviour changes ## `Formatter.fix_minus` [.Formatter.fix_minus]{.title-ref} now performs hyphen-to-unicode-minus replacement whenever `axes.unicode_minus`{.interpreted-text role="rc"} is True; i.e. its behavior matches the one of `ScalarFormatter.fix_minus` ([.ScalarFormatter]{.title-ref} now just inherits that implementation). This replacement is now used by the `format_data_short` method of the various builtin formatter classes, which affects the cursor value in the GUI toolbars. ## `FigureCanvasBase` now always has a `manager` attribute, which may be None Previously, it did not necessarily have such an attribute. A check for `hasattr(figure.canvas, "manager")` should now be replaced by `figure.canvas.manager is not None` (or `getattr(figure.canvas, "manager", None) is not None` for back-compatibility). ## [.cbook.CallbackRegistry]{.title-ref} now propagates exceptions when no GUI event loop is running [.cbook.CallbackRegistry]{.title-ref} now defaults to propagating exceptions thrown by callbacks when no interactive GUI event loop is running. If a GUI event loop *is* running, [.cbook.CallbackRegistry]{.title-ref} still defaults to just printing a traceback, as unhandled exceptions can make the program completely `abort()` in that case. ## `Axes.locator_params()` validates `axis` parameter [.axes.Axes.locator_params]{.title-ref} used to accept any value for `axis` and silently did nothing, when passed an unsupported value. It now raises a `ValueError`. ## `Axis.set_tick_params()` validates `which` parameter [.Axis.set_tick_params]{.title-ref} (and the higher level [.axes.Axes.tick_params]{.title-ref} and [.pyplot.tick_params]{.title-ref}) used to accept any value for `which` and silently did nothing, when passed an unsupported value. It now raises a `ValueError`. ## `Axis.set_ticklabels()` must match `FixedLocator.locs` If an axis is using a [.ticker.FixedLocator]{.title-ref}, typically set by a call to [.Axis.set_ticks]{.title-ref}, then the number of ticklabels supplied must match the number of locations available (`FixedFormattor.locs`). If not, a `ValueError` is raised. ## `backend_pgf.LatexManager.latex` `backend_pgf.LatexManager.latex` is now created with `encoding="utf-8"`, so its `stdin`, `stdout`, and `stderr` attributes are utf8-encoded. ## `pyplot.xticks()` and `pyplot.yticks()` Previously, passing labels without passing the ticks to either [.pyplot.xticks]{.title-ref} and [.pyplot.yticks]{.title-ref} would result in: TypeError: object of type 'NoneType' has no len() It now raises a `TypeError` with a proper description of the error. ## Setting the same property under multiple aliases now raises a TypeError Previously, calling e.g. `plot(..., color=somecolor, c=othercolor)` would emit a warning because `color` and `c` actually map to the same Artist property. This now raises a TypeError. ## [.FileMovieWriter]{.title-ref} temporary frames directory [.FileMovieWriter]{.title-ref} now defaults to writing temporary frames in a temporary directory, which is always cleared at exit. In order to keep the individual frames saved on the filesystem, pass an explicit *frame_prefix*. ## [.Axes.plot]{.title-ref} no longer accepts *x* and *y* being both 2D and with different numbers of columns Previously, calling [.Axes.plot]{.title-ref} e.g. with *x* of shape `(n, 3)` and *y* of shape `(n, 2)` would plot the first column of *x* against the first column of *y*, the second column of *x* against the second column of *y*, **and** the first column of *x* against the third column of *y*. This now raises an error instead. ## [.Text.update_from]{.title-ref} now copies usetex state from the source Text ## [\~.Axes.stem]{.title-ref} now defaults to `use_line_collection=True` This creates the stem plot as a [.LineCollection]{.title-ref} rather than individual [.Line2D]{.title-ref} objects, greatly improving performance. ## rcParams color validator is now stricter Previously, rcParams entries whose values were color-like accepted \"spurious\" extra letters or characters in the \"middle\" of the string, e.g. `"(0, 1a, '0.5')"` would be interpreted as `(0, 1, 0.5)`. These extra characters (including the internal quotes) now cause a ValueError to be raised. ## [.SymLogNorm]{.title-ref} now has a *base* parameter Previously, [.SymLogNorm]{.title-ref} had no *base* keyword argument, and defaulted to `base=np.e` whereas the documentation said it was `base=10`. In preparation to make the default 10, calling [.SymLogNorm]{.title-ref} without the new *base* keyword argument emits a deprecation warning. ## [\~.Axes.errorbar]{.title-ref} now color cycles when only errorbar color is set Previously setting the *ecolor* would turn off automatic color cycling for the plot, leading to the the lines and markers defaulting to whatever the first color in the color cycle was in the case of multiple plot calls. ## [.rcsetup.validate_color_for_prop_cycle]{.title-ref} now always raises TypeError for bytes input It previously raised [TypeError]{.title-ref}, **except** when the input was of the form `b"C[number]"` in which case it raised a ValueError. ## [.FigureCanvasPS.print_ps]{.title-ref} and [.FigureCanvasPS.print_eps]{.title-ref} no longer apply edgecolor and facecolor These methods now assume that the figure edge and facecolor have been correctly applied by [.FigureCanvasBase.print_figure]{.title-ref}, as they are normally called through it. This behavior is consistent with other figure saving methods ([.FigureCanvasAgg.print_png]{.title-ref}, [.FigureCanvasPdf.print_pdf]{.title-ref}, [.FigureCanvasSVG.print_svg]{.title-ref}). ## [.pyplot.subplot()]{.title-ref} now raises TypeError when given an incorrect number of arguments This is consistent with other signature mismatch errors. Previously a ValueError was raised. ## Shortcut for closing all figures Shortcuts for closing all figures now also work for the classic toolbar. There is no default shortcut any more because unintentionally closing all figures by a key press might happen too easily. You can configure the shortcut yourself using `keymap.quit_all`{.interpreted-text role="rc"}. ## Autoscale for arrow Calling ax.arrow() will now autoscale the axes. ## `set_tick_params(label1On=False)` now also makes the offset text (if any) invisible \... because the offset text can rarely be interpreted without tick labels anyways. ## [.Axes.annotate]{.title-ref} and [.pyplot.annotate]{.title-ref} parameter name changed The parameter `s` to [.Axes.annotate]{.title-ref} and [.pyplot.annotate]{.title-ref} is renamed to `text`, matching [.Annotation]{.title-ref}. The old parameter name remains supported, but support for it will be dropped in a future Matplotlib release. ## [.font_manager.json_dump]{.title-ref} now locks the font manager dump file \... to prevent multiple processes from writing to it at the same time. ## [.pyplot.rgrids]{.title-ref} and [.pyplot.thetagrids]{.title-ref} now act as setters also when called with only kwargs Previously, keyword arguments were silently ignored when no positional arguments were given. ## [.Axis.get_minorticklabels]{.title-ref} and [.Axis.get_majorticklabels]{.title-ref} now returns plain list Previously, [.Axis.get_minorticklabels]{.title-ref} and [.Axis.get_majorticklabels]{.title-ref} returns silent_list. Their return type is now changed to normal list. [.get_xminorticklabels]{.title-ref}, [.get_yminorticklabels]{.title-ref}, [.get_zminorticklabels]{.title-ref}, [.Axis.get_ticklabels]{.title-ref}, [.get_xmajorticklabels]{.title-ref}, [.get_ymajorticklabels]{.title-ref} and [.get_zmajorticklabels]{.title-ref} methods will be affected by this change. ## Default slider formatter The default method used to format [.Slider]{.title-ref} values has been changed to use a [.ScalarFormatter]{.title-ref} adapted the slider values limits. This should ensure that values are displayed with an appropriate number of significant digits even if they are much smaller or much bigger than 1. To restore the old behavior, explicitly pass a \"%1.2f\" as the *valfmt* parameter to [.Slider]{.title-ref}. ## Add *normalize* keyword argument to `Axes.pie` `pie()` used to draw a partial pie if the sum of the values was \< 1. This behavior is deprecated and will change to always normalizing the values to a full pie by default. If you want to draw a partial pie, please pass `normalize=False` explicitly. ## `table.CustomCell` is now an alias for [.table.Cell]{.title-ref} All the functionality of `CustomCell` has been moved to its base class [\~.table.Cell]{.title-ref}. ## wx Timer interval Setting the timer interval on a not-yet-started `TimerWx` won\'t start it anymore. ## \"step\"-type histograms default to the zorder of [.Line2D]{.title-ref} This ensures that they go above gridlines by default. The old `zorder` can be kept by passing it as a keyword argument to [.Axes.hist]{.title-ref}. ## [.Legend]{.title-ref} and [.OffsetBox]{.title-ref} visibility [.Legend]{.title-ref} and [.OffsetBox]{.title-ref} subclasses ([.PaddedBox]{.title-ref}, [.AnchoredOffsetbox]{.title-ref}, and [.AnnotationBbox]{.title-ref}) no longer directly keep track of the visibility of their underlying [.Patch]{.title-ref} artist, but instead pass that flag down to the [.Patch]{.title-ref}. ## [.Legend]{.title-ref} and [.Table]{.title-ref} no longer allow invalid locations This affects legends produced on an Axes ([.Axes.legend]{.title-ref} and [.pyplot.legend]{.title-ref}) and on a Figure ([.Figure.legend]{.title-ref} and [.pyplot.figlegend]{.title-ref}). Figure legends also no longer accept the unsupported `'best'` location. Previously, invalid Axes locations would use `'best'` and invalid Figure locations would used `'upper right'`. ## Passing Line2D\'s *drawstyle* together with *linestyle* is removed Instead of `plt.plot(..., linestyle="steps--")`, use `plt.plot(..., linestyle="--", drawstyle="steps")`. `ds` is also an alias for `drawstyle`. ## Upper case color strings Support for passing single-letter colors (one of \"rgbcmykw\") as UPPERCASE characters is removed; these colors are now case-sensitive (lowercase). ## tight/constrained_layout no longer worry about titles that are too wide *tight_layout* and *constrained_layout* shrink axes to accommodate \"decorations\" on the axes. However, if an xlabel or title is too long in the x direction, making the axes smaller in the x-direction doesn\'t help. The behavior of both has been changed to ignore the width of the title and xlabel and the height of the ylabel in the layout logic. This also means there is a new keyword argument for [.axes.Axes.get_tightbbox]{.title-ref} and \`.axis.Axis.get_tightbbox\`: `for_layout_only`, which defaults to *False*, but if *True* returns a bounding box using the rules above. ## `savefig.facecolor`{.interpreted-text role="rc"} and `savefig.edgecolor`{.interpreted-text role="rc"} now default to \"auto\" This newly allowed value for `savefig.facecolor`{.interpreted-text role="rc"} and `savefig.edgecolor`{.interpreted-text role="rc"}, as well as the *facecolor* and *edgecolor* parameters to [.Figure.savefig]{.title-ref}, means \"use whatever facecolor and edgecolor the figure current has\". ## When using a single dataset, [.Axes.hist]{.title-ref} no longer wraps the added artist in a [.silent_list]{.title-ref} When [.Axes.hist]{.title-ref} is called with a single dataset, it adds to the axes either a [.BarContainer]{.title-ref} object (when `histtype="bar"` or `"barstacked"`), or a [.Polygon]{.title-ref} object (when `histype="step"` or `"stepfilled"`) \-- the latter being wrapped in a list-of-one-element. Previously, either artist would be wrapped in a [.silent_list]{.title-ref}. This is no longer the case: the [.BarContainer]{.title-ref} is now returned as is (this is an API breaking change if you were directly relying on the concrete [list]{.title-ref} API; however, [.BarContainer]{.title-ref} inherits from [tuple]{.title-ref} so most common operations remain available), and the list-of-one [.Polygon]{.title-ref} is returned as is. This makes the [repr]{.title-ref} of the returned artist more accurate: it is now : # "bar", "barstacked" [] # "step", "stepfilled" instead of : # "bar", "barstacked" # "step", "stepfilled" When [.Axes.hist]{.title-ref} is called with multiple artists, it still wraps its return value in a [.silent_list]{.title-ref}, but uses more accurate type information : # "bar", "barstacked" # "step", "stepfilled" instead of : # "bar", "barstacked" # "step", "stepfilled" ## Qt and wx backends no longer create a status bar by default The coordinates information is now displayed in the toolbar, consistently with the other backends. This is intended to simplify embedding of Matplotlib in larger GUIs, where Matplotlib may control the toolbar but not the status bar. ## `text.hinting`{.interpreted-text role="rc"} now supports names mapping to FreeType flags `text.hinting`{.interpreted-text role="rc"} now supports the values \"default\", \"no_autohint\", \"force_autohint\", and \"no_hinting\", which directly map to the FreeType flags FT_LOAD_DEFAULT, etc. The old synonyms (respectively \"either\", \"native\", \"auto\", and \"none\") are still supported, but their use is discouraged. To get normalized values, use [.backend_agg.get_hinting_flag]{.title-ref}, which returns integer flag values. ## [.cbook.get_sample_data]{.title-ref} auto-loads numpy arrays When [.cbook.get_sample_data]{.title-ref} is used to load a npy or npz file and the keyword-only parameter `np_load` is True, the file is automatically loaded using [numpy.load]{.title-ref}. `np_load` defaults to False for backwards compatibility, but will become True in a later release. ## `get_text_width_height_descent` now checks `ismath` rather than `text.usetex`{.interpreted-text role="rc"} \... to determine whether a string should be passed to the usetex machinery or not. This allows single strings to be marked as not-usetex even when the rcParam is True. ## [.Axes.vlines]{.title-ref}, [.Axes.hlines]{.title-ref}, [.pyplot.vlines]{.title-ref} and [.pyplot.hlines]{.title-ref} *colors* parameter default change The *colors* parameter will now default to `lines.color`{.interpreted-text role="rc"}, while previously it defaulted to \'k\'. ## Aggressively autoscale clim in `ScalerMappable` classes Previously some plotting methods would defer autoscaling until the first draw if only one of the *vmin* or *vmax* keyword arguments were passed ([.Axes.scatter]{.title-ref}, [.Axes.hexbin]{.title-ref}, [.Axes.imshow]{.title-ref}, [.Axes.pcolorfast]{.title-ref}) but would scale based on the passed data if neither was passed (independent of the *norm* keyword arguments). Other methods ([.Axes.pcolor]{.title-ref}, [.Axes.pcolormesh]{.title-ref}) always autoscaled base on the initial data. All of the plotting methods now resolve the unset *vmin* or *vmax* at the initial call time using the data passed in. If you were relying on exactly one of the *vmin* or *vmax* remaining unset between the time when the method is called and the first time the figure is rendered you get back the old behavior by manually setting the relevant limit back to [None]{.title-ref} : cm_obj.norm.vmin = None # or cm_obj.norm.vmax = None which will be resolved during the draw process. --- # Deprecations ## `figure.add_axes()` without arguments Calling `fig.add_axes()` with no arguments currently does nothing. This call will raise an error in the future. Adding a free-floating axes needs a position rectangle. If you want a figure-filling single axes, use `add_subplot()` instead. ## `backend_wx.DEBUG_MSG` `backend_wx.DEBUG_MSG` is deprecated. The wx backends now use regular logging. ## `Colorbar.config_axis()` `Colorbar.config_axis()` is considered internal. Its use is deprecated. ## `NonUniformImage.is_grayscale` and `PcolorImage.is_grayscale` These attributes are deprecated, for consistency with `AxesImage.is_grayscale`, which was removed back in Matplotlib 2.0.0. (Note that previously, these attributes were only available *after rendering the image*). ## `den` parameter and attribute to `mpl_toolkits.axisartist.angle_helper`{.interpreted-text role="mod"} For all locator classes defined in `mpl_toolkits.axisartist.angle_helper`{.interpreted-text role="mod"}, the `den` parameter has been renamed to `nbins`, and the `den` attribute deprecated in favor of its (preexisting) synonym `nbins`, for consistency with locator classes defined in `matplotlib.ticker`{.interpreted-text role="mod"}. ## `backend_pgf.LatexManager.latex_stdin_utf8` `backend_pgf.LatexManager.latex` is now created with `encoding="utf-8"`, so its `stdin` attribute is already utf8-encoded; the `latex_stdin_utf8` attribute is thus deprecated. ## Flags containing \"U\" passed to [.cbook.to_filehandle]{.title-ref} and [.cbook.open_file_cm]{.title-ref} Please remove \"U\" from flags passed to [.cbook.to_filehandle]{.title-ref} and [.cbook.open_file_cm]{.title-ref}. This is consistent with their removal from [open]{.title-ref} in Python 3.9. ## PDF and PS character tracking internals The `used_characters` attribute and `track_characters` and `merge_used_characters` methods of [.RendererPdf]{.title-ref}, [.PdfFile]{.title-ref}, and [.RendererPS]{.title-ref} are deprecated. ## Case-insensitive capstyles and joinstyles Please pass capstyles (\"miter\", \"round\", \"bevel\") and joinstyles (\"butt\", \"round\", \"projecting\") as lowercase. ## Passing raw data to `register_cmap()` Passing raw data via parameters *data* and *lut* to `matplotlib.cm.register_cmap()` is deprecated. Instead, explicitly create a [.LinearSegmentedColormap]{.title-ref} and pass it via the *cmap* parameter: `register_cmap(cmap=LinearSegmentedColormap(name, data, lut))`. ## `DateFormatter.illegal_s` This attribute is unused and deprecated. ## `widgets.TextBox.params_to_disable` This attribute is deprecated. ## Revert deprecation \*min, \*max keyword arguments to `set_x/y/zlim_3d()` These keyword arguments were deprecated in 3.0, alongside with the respective parameters in `set_xlim()` / `set_ylim()`. The deprecations of the 2D versions were already reverted in 3.1. ## `cbook.local_over_kwdict` This function is deprecated. Use [.cbook.normalize_kwargs]{.title-ref} instead. ## Passing both singular and plural *colors*, *linewidths*, *linestyles* to [.Axes.eventplot]{.title-ref} Passing e.g. both *linewidth* and *linewidths* will raise a TypeError in the future. ## Setting `text.latex.preamble` or `pdf.preamble` rcParams to non-strings These rcParams should be set to string values. Support for None (meaning the empty string) and lists of strings (implicitly joined with newlines) is deprecated. ## Parameters *norm* and *vmin*/*vmax* should not be used simultaneously Passing parameters *norm* and *vmin*/*vmax* simultaneously to functions using colormapping such as `scatter()` and `imshow()` is deprecated. Instead of `norm=LogNorm(), vmin=min_val, vmax=max_val` pass `norm=LogNorm(min_val, max_val)`. *vmin* and *vmax* should only be used without setting *norm*. ## Effectless parameters of [.Figure.colorbar]{.title-ref} and [matplotlib.colorbar.Colorbar]{.title-ref} The *cmap* and *norm* parameters of [.Figure.colorbar]{.title-ref} and [matplotlib.colorbar.Colorbar]{.title-ref} have no effect because they are always overridden by the mappable\'s colormap and norm; they are thus deprecated. Likewise, passing the *alpha*, *boundaries*, *values*, *extend*, or *filled* parameters with a [.ContourSet]{.title-ref} mappable, or the *alpha* parameter with an [.Artist]{.title-ref} mappable, is deprecated, as the mappable would likewise override them. ## `args_key` and `exec_key` attributes of builtin [.MovieWriter]{.title-ref}s These attributes are deprecated. ## Unused parameters The following parameters do not have any effect and are deprecated: - arbitrary keyword arguments to `StreamplotSet` - parameter *quantize* of [.Path.cleaned()]{.title-ref} - parameter *s* of [.AnnotationBbox.get_fontsize()]{.title-ref} - parameter *label* of [.Tick]{.title-ref} ## Passing *props* to [.Shadow]{.title-ref} The parameter *props* of [.Shadow]{.title-ref} is deprecated. Use keyword arguments instead. ## `Axes.update_datalim_bounds` This method is deprecated. Use `ax.dataLim.set(Bbox.union([ax.dataLim, bounds]))` instead. ## `{,Symmetrical}LogScale.{,Inverted}LogTransform` `LogScale.LogTransform`, `LogScale.InvertedLogTransform`, `SymmetricalScale.SymmetricalTransform` and `SymmetricalScale.InvertedSymmetricalTransform` are deprecated. Directly access the transform classes from the `.scale`{.interpreted-text role="mod"} module. ## `TexManager.cachedir`, `TexManager.rgba_arrayd` Use [matplotlib.get_cachedir()]{.title-ref} instead for the former; there is no replacement for the latter. ## Setting [.Line2D]{.title-ref}\'s pickradius via [.Line2D.set_picker]{.title-ref} Setting a [.Line2D]{.title-ref}\'s pickradius (i.e. the tolerance for pick events and containment checks) via [.Line2D.set_picker]{.title-ref} is deprecated. Use [.Line2D.set_pickradius]{.title-ref} instead. [.Line2D.set_picker]{.title-ref} no longer sets the artist\'s custom-contain() check. ## `Artist.set_contains`, `Artist.get_contains` Setting a custom method overriding [.Artist.contains]{.title-ref} is deprecated. There is no replacement, but you may still customize pick events using [.Artist.set_picker]{.title-ref}. ## [\~matplotlib.colorbar.Colorbar]{.title-ref} methods The `on_mappable_changed` and `update_bruteforce` methods of [\~matplotlib.colorbar.Colorbar]{.title-ref} are deprecated; both can be replaced by calls to [\~matplotlib.colorbar.Colorbar.update_normal]{.title-ref}. ## `OldScalarFormatter`, `IndexFormatter` and `IndexDateFormatter` These formatters are deprecated. Their functionality can be implemented using e.g. [.FuncFormatter]{.title-ref}. ## `OldAutoLocator` This ticker is deprecated. ## *required*, *forbidden* and *allowed* parameters of [.cbook.normalize_kwargs]{.title-ref} These parameters are deprecated. ## The `TTFPATH` and `AFMPATH` environment variables Support for the (undocumented) `TTFPATH` and `AFMPATH` environment variables is deprecated. Additional fonts may be registered using `matplotlib.font_manager.fontManager.addfont()`. ## `matplotlib.compat` This module is deprecated. ## `matplotlib.backends.qt_editor.formsubplottool` This module is deprecated. Use `matplotlib.backends.backend_qt5.SubplotToolQt` instead. ## AVConv animation writer deprecated The `AVConvBase`, `AVConvWriter` and `AVConvFileWriter` classes, and the associated `animation.avconv_path` and `animation.avconv_args` rcParams are deprecated. Debian 8 (2015, EOL 06/2020) and Ubuntu 14.04 (EOL 04/2019) were the last versions of Debian and Ubuntu to ship avconv. It remains possible to force the use of avconv by using the ffmpeg-based writers with `animation.ffmpeg_path`{.interpreted-text role="rc"} set to \"avconv\". ## log/symlog scale base, ticks, and nonpos specification [\~.Axes.semilogx]{.title-ref}, [\~.Axes.semilogy]{.title-ref}, [\~.Axes.loglog]{.title-ref}, [.LogScale]{.title-ref}, and [.SymmetricalLogScale]{.title-ref} used to take keyword arguments that depends on the axis orientation (\"basex\" vs \"basey\", \"subsx\" vs \"subsy\", \"nonposx\" vs \"nonposy\"); these parameter names are now deprecated in favor of \"base\", \"subs\", \"nonpositive\". This deprecation also affects e.g. `ax.set_yscale("log", basey=...)` which must now be spelled `ax.set_yscale("log", base=...)`. The change from \"nonpos\" to \"nonpositive\" also affects [\~.scale.LogTransform]{.title-ref}, [\~.scale.InvertedLogTransform]{.title-ref}, [\~.scale.SymmetricalLogTransform]{.title-ref}, etc. To use *different* bases for the x-axis and y-axis of a [\~.Axes.loglog]{.title-ref} plot, use e.g. `ax.set_xscale("log", base=10); ax.set_yscale("log", base=2)`. ## `DraggableBase.artist_picker` This method is deprecated. If you previously reimplemented it in a subclass, set the artist\'s picker instead with [.Artist.set_picker]{.title-ref}. ## *clear_temp* parameter and attribute of [.FileMovieWriter]{.title-ref} The *clear_temp* parameter and attribute of [.FileMovieWriter]{.title-ref} is deprecated. In the future, files placed in a temporary directory (using `frame_prefix=None`, the default) will be cleared; files placed elsewhere will not. ## Deprecated rcParams validators The following validators, defined in [.rcsetup]{.title-ref}, are deprecated: `validate_fontset`, `validate_mathtext_default`, `validate_alignment`, `validate_svg_fonttype`, `validate_pgf_texsystem`, `validate_movie_frame_fmt`, `validate_axis_locator`, `validate_movie_html_fmt`, `validate_grid_axis`, `validate_axes_titlelocation`, `validate_toolbar`, `validate_ps_papersize`, `validate_legend_loc`, `validate_bool_maybe_none`, `validate_hinting`, `validate_movie_writer`, `validate_webagg_address`, `validate_nseq_float`, `validate_nseq_int`. To test whether an rcParam value would be acceptable, one can test e.g. `rc = RcParams(); rc[k] = v` raises an exception. ## Stricter rcParam validation `axes.axisbelow`{.interpreted-text role="rc"} currently normalizes all strings starting with \"line\" (case-insensitive) to the option \"line\". This is deprecated; in a future version only the exact string \"line\" (case-sensitive) will be supported. ## `add_subplot()` validates its inputs In particular, for `add_subplot(rows, cols, index)`, all parameters must be integral. Previously strings and floats were accepted and converted to int. This will now emit a deprecation warning. ## Toggling axes navigation from the keyboard using \"a\" and digit keys Axes navigation can still be toggled programmatically using [.Axes.set_navigate]{.title-ref}. The following related APIs are also deprecated: `backend_tools.ToolEnableAllNavigation`, `backend_tools.ToolEnableNavigation`, and `rcParams["keymap.all_axes"]`. ## `matplotlib.test(recursionlimit=...)` The *recursionlimit* parameter of `matplotlib.test` is deprecated. ## mathtext glues The *copy* parameter of `mathtext.Glue` is deprecated (the underlying glue spec is now immutable). `mathtext.GlueSpec` is deprecated. ## Signatures of [.Artist.draw]{.title-ref} and [matplotlib.axes.Axes.draw]{.title-ref} The *inframe* parameter to [matplotlib.axes.Axes.draw]{.title-ref} is deprecated. Use [.Axes.redraw_in_frame]{.title-ref} instead. Not passing the *renderer* parameter to [matplotlib.axes.Axes.draw]{.title-ref} is deprecated. Use `axes.draw_artist(axes)` instead. These changes make the signature of the `draw` (`artist.draw(renderer)`) method consistent across all artists; thus, additional parameters to [.Artist.draw]{.title-ref} are deprecated. ## `DraggableBase.on_motion_blit` This method is deprecated. [.DraggableBase.on_motion]{.title-ref} now handles both the blitting and the non-blitting cases. ## Passing the dash offset as None Fine control of dash patterns can be achieved by passing an `(offset, (on-length, off-length, on-length, off-length, ...))` pair as the linestyle property of [.Line2D]{.title-ref} and [.LineCollection]{.title-ref}. Previously, certain APIs would accept `offset = None` as a synonym for `offset = 0`, but this was never universally implemented, e.g. for vector output. Support for `offset = None` is deprecated, set the offset to 0 instead. ## `RendererCairo.fontweights`, `RendererCairo.fontangles` \... are deprecated. ## `autofmt_xdate(which=None)` This is deprecated, use its more explicit synonym, `which="major"`, instead. ## JPEG options The *quality*, *optimize*, and *progressive* keyword arguments to [\~.Figure.savefig]{.title-ref}, which were only used when saving to JPEG, are deprecated. The `savefig.jpeg_quality` rcParam is likewise deprecated. Such options should now be directly passed to Pillow using `savefig(..., pil_kwargs={"quality": ..., "optimize": ..., "progressive": ...})`. ## `dviread.Encoding` This class was (mostly) broken and is deprecated. ## Axis and Locator `pan` and `zoom` The unused `pan` and `zoom` methods of [\~.axis.Axis]{.title-ref} and [\~.ticker.Locator]{.title-ref} are deprecated. Panning and zooming are now implemented using the `start_pan`, `drag_pan`, and `end_pan` methods of [\~.axes.Axes]{.title-ref}. ## Passing None to various Axes subclass factories Support for passing `None` as base class to `axes.subplot_class_factory`, `axes_grid1.parasite_axes.host_axes_class_factory`, `axes_grid1.parasite_axes.host_subplot_class_factory`, `axes_grid1.parasite_axes.parasite_axes_class_factory`, and `axes_grid1.parasite_axes.parasite_axes_auxtrans_class_factory` is deprecated. Explicitly pass the correct base `Axes` class instead. ## `axes_rgb` In `mpl_toolkits.axes_grid1.axes_rgb`{.interpreted-text role="mod"}, `imshow_rgb` is deprecated (use `ax.imshow(np.dstack([r, g, b]))` instead); `RGBAxesBase` is deprecated (use `RGBAxes` instead); `RGBAxes.add_RGB_to_figure` is deprecated (it was an internal helper). ## `Substitution.from_params` This method is deprecated. If needed, directly assign to the `params` attribute of the Substitution object. ## PGF backend cleanups The *dummy* parameter of [.RendererPgf]{.title-ref} is deprecated. `GraphicsContextPgf` is deprecated (use [.GraphicsContextBase]{.title-ref} instead). ## `set_factor` method of `mpl_toolkits.axisartist`{.interpreted-text role="mod"} locators The `set_factor` method of `mpl_toolkits.axisartist`{.interpreted-text role="mod"} locators (which are different from \"standard\" Matplotlib tick locators) is deprecated. ## [.widgets.SubplotTool]{.title-ref} callbacks and axes The `funcleft`, `funcright`, `funcbottom`, `functop`, `funcwspace`, and `funchspace` methods of [.widgets.SubplotTool]{.title-ref} are deprecated. The `axleft`, `axright`, `axbottom`, `axtop`, `axwspace`, and `axhspace` attributes of [.widgets.SubplotTool]{.title-ref} are deprecated. Access the `ax` attribute of the corresponding slider, if needed. ## mathtext `Glue` helper classes The `Fil`, `Fill`, `Filll`, `NegFil`, `NegFill`, `NegFilll`, and `SsGlue` classes in the `matplotlib.mathtext`{.interpreted-text role="mod"} module are deprecated. As an alternative, directly construct glue instances with `Glue("fil")`, etc. ## NavigationToolbar2.\_init_toolbar Overriding this method to initialize third-party toolbars is deprecated. Instead, the toolbar should be initialized in the `__init__` method of the subclass (which should call the base-class\' `__init__` as appropriate). To keep back-compatibility with earlier versions of Matplotlib (which *required* `_init_toolbar` to be overridden), a fully empty implementation (`def _init_toolbar(self): pass`) may be kept and will not trigger the deprecation warning. ## NavigationToolbar2QT.parent and .basedir These attributes are deprecated. In order to access the parent window, use `toolbar.canvas.parent()`. Once the deprecation period is elapsed, it will also be accessible as `toolbar.parent()`. The base directory to the icons is `os.path.join(mpl.get_data_path(), "images")`. ## NavigationToolbar2QT.ctx This attribute is deprecated. ## NavigationToolbar2Wx attributes The `prevZoomRect`, `retinaFix`, `savedRetinaImage`, `wxoverlay`, `zoomAxes`, `zoomStartX`, and `zoomStartY` attributes are deprecated. ## NavigationToolbar2.press and .release These methods were called when pressing or releasing a mouse button, but *only* when an interactive pan or zoom was occurring (contrary to what the docs stated). They are deprecated; if you write a backend which needs to customize such events, please directly override `press_pan`/`press_zoom`/`release_pan`/`release_zoom` instead. ## FigureCanvasGTK3.\_renderer_init Overriding this method to initialize renderers for GTK3 canvases is deprecated. Instead, the renderer should be initialized in the `__init__` method of the subclass (which should call the base-class\' `__init__` as appropriate). To keep back-compatibility with earlier versions of Matplotlib (which *required* `_renderer_init` to be overridden), a fully empty implementation (`def _renderer_init(self): pass`) may be kept and will not trigger the deprecation warning. ## Path helpers in `.bezier`{.interpreted-text role="mod"} `bezier.make_path_regular` is deprecated. Use `Path.cleaned()` (or `Path.cleaned(curves=True)`, etc.) instead (but note that these methods add a `STOP` code at the end of the path). `bezier.concatenate_paths` is deprecated. Use `Path.make_compound_path()` instead. ## `animation.html_args` rcParam The unused `animation.html_args` rcParam and `animation.HTMLWriter.args_key` attribute are deprecated. ## `text.latex.preview` rcParam This rcParam, which controlled the use of the preview.sty LaTeX package to align TeX string baselines, is deprecated, as Matplotlib\'s own dvi parser now computes baselines just as well as preview.sty. ## `SubplotSpec.get_rows_columns` This method is deprecated. Use the `GridSpec.nrows`, `GridSpec.ncols`, `SubplotSpec.rowspan`, and `SubplotSpec.colspan` properties instead. ## Qt4-based backends The qt4agg and qt4cairo backends are deprecated. Qt4 has reached its end-of-life in 2015 and there are no releases for recent versions of Python. Please consider switching to Qt5. ## *fontdict* and *minor* parameters of [.Axes.set_xticklabels]{.title-ref} and [.Axes.set_yticklabels]{.title-ref} will become keyword-only ## All parameters of [.Figure.subplots]{.title-ref} except *nrows* and *ncols* will become keyword-only This avoids typing e.g. `subplots(1, 1, 1)` when meaning `subplot(1, 1, 1)`, but actually getting `subplots(1, 1, sharex=1)`. ## `RendererWx.get_gc` This method is deprecated. Access the `gc` attribute directly instead. ## *add_all* parameter in `axes_grid` The *add_all* parameter of [.axes_grid1.axes_grid.Grid]{.title-ref}, [.axes_grid1.axes_grid.ImageGrid]{.title-ref}, [.axes_grid1.axes_rgb.make_rgb_axes]{.title-ref} and [.axes_grid1.axes_rgb.RGBAxes]{.title-ref} is deprecated. Axes are now always added to the parent figure, though they can be later removed with `ax.remove()`. ## `BboxBase.inverse_transformed` `.BboxBase.inverse_transformed` is deprecated (call [.BboxBase.transformed]{.title-ref} on the [\~.Transform.inverted()]{.title-ref} transform instead). ## *orientation* of `eventplot()` and [.EventCollection]{.title-ref} Setting the *orientation* of an `eventplot()` or [.EventCollection]{.title-ref} to \"none\" or None is deprecated; set it to \"horizontal\" instead. Moreover, the two orientations (\"horizontal\" and \"vertical\") will become case-sensitive in the future. ## *minor* kwarg to [.Axis.get_ticklocs]{.title-ref} will become keyword-only Passing this argument positionally is deprecated. ## Case-insensitive properties Normalization of upper or mixed-case property names to lowercase in [.Artist.set]{.title-ref} and [.Artist.update]{.title-ref} is deprecated. In the future, property names will be passed as is, allowing one to pass names such as *patchA* or *UVC*. ## `ContourSet.ax`, `Quiver.ax` These attributes are deprecated in favor of `ContourSet.axes` and `Quiver.axes`, for consistency with other artists. ## `Locator.refresh()` and associated methods `Locator.refresh()` is deprecated. This method was called at certain places to let locators update their internal state, typically based on the axis limits. Locators should now always consult the axis limits when called, if needed. The associated helper methods `NavigationToolbar2.draw()` and `ToolViewsPositions.refresh_locators()` are deprecated, and should be replaced by calls to `draw_idle()` on the corresponding canvas. ## [.ScalarMappable]{.title-ref} checkers The `add_checker` and `check_update` methods and `update_dict` attribute of [.ScalarMappable]{.title-ref} are deprecated. ## [.pyplot.tight_layout]{.title-ref} and `ColorbarBase` parameters will become keyword-only All parameters of [.pyplot.tight_layout]{.title-ref} and all parameters of `ColorbarBase` except for the first (*ax*) will become keyword-only, consistently with [.Figure.tight_layout]{.title-ref} and `Colorbar`, respectively. ## [.Axes.pie]{.title-ref} radius and startangle Passing `None` as either the `radius` or `startangle` of an [.Axes.pie]{.title-ref} is deprecated; use the explicit defaults of 1 and 0, respectively, instead. ## `AxisArtist.dpi_transform` \... is deprecated. Scale `Figure.dpi_scale_trans` by 1/72 to achieve the same effect. ## `offset_position` property of [.Collection]{.title-ref} The `offset_position` property of [.Collection]{.title-ref} is deprecated. In the future, [.Collection]{.title-ref}s will always behave as if `offset_position` is set to \"screen\" (the default). Support for passing `offset_position="data"` to the `draw_path_collection` of all renderer classes is deprecated. [.transforms.AffineDeltaTransform]{.title-ref} can be used as a replacement. This API is experimental and may change in the future. ## `testing.compare.make_external_conversion_command` \... is deprecated. ## `epoch2num` and `num2epoch` are deprecated These are unused and can be easily reproduced by other date tools. [.get_epoch]{.title-ref} will return Matplotlib\'s epoch. ## `axes_grid1.CbarAxes` attributes The `cbid` and `locator` attribute are deprecated. Use `mappable.colorbar_cid` and `colorbar.locator`, as for standard colorbars. ## `qt_compat.is_pyqt5` This function is deprecated in prevision of the future release of PyQt6. The Qt version can be checked using `QtCore.qVersion()`. ## Reordering of parameters by [.Artist.set]{.title-ref} In a future version, `Artist.set` will apply artist properties in the order in which they are given. This only affects the interaction between the *color*, *edgecolor*, *facecolor*, and, for [.Collection]{.title-ref}s, *alpha* properties: the *color* property now needs to be passed first in order not to override the other properties. This is consistent with e.g. [.Artist.update]{.title-ref}, which did not reorder the properties passed to it. ## Passing multiple keys as a single comma-separated string or multiple arguments to [.ToolManager.update_keymap]{.title-ref} This is deprecated; pass keys as a list of strings instead. ## Statusbar classes and attributes The `statusbar` attribute of [.FigureManagerBase]{.title-ref}, `StatusbarBase` and all its subclasses, and `StatusBarWx`, are deprecated, as messages are now displayed in the toolbar instead. ## `ismath` parameter of `draw_tex` The `ismath` parameter of the `draw_tex` method of all renderer classes is deprecated (as a call to `draw_tex` \-- not to be confused with `draw_text`! \-- means that the entire string should be passed to the `usetex` machinery anyways). Likewise, the text machinery will no longer pass the `ismath` parameter when calling `draw_tex` (this should only matter for backend implementers). Passing `ismath="TeX!"` to [.RendererAgg.get_text_width_height_descent]{.title-ref} is deprecated. Pass `ismath="TeX"` instead, consistently with other low-level APIs which support the values True, False, and \"TeX\" for `ismath`. ## `matplotlib.ttconv` This module is deprecated. ## Stricter PDF metadata keys in PGF Saving metadata in PDF with the PGF backend currently normalizes all keys to lowercase, unlike the PDF backend, which only accepts the canonical case. This is deprecated; in a future version, only the canonically cased keys listed in the PDF specification (and the [\~.backend_pgf.PdfPages]{.title-ref} documentation) will be accepted. ## Qt modifier keys The `MODIFIER_KEYS`, `SUPER`, `ALT`, `CTRL`, and `SHIFT` global variables of the `matplotlib.backends.backend_qt4agg`, `matplotlib.backends.backend_qt4cairo`, `matplotlib.backends.backend_qt5agg`{.interpreted-text role="mod"} and `matplotlib.backends.backend_qt5cairo`{.interpreted-text role="mod"} modules are deprecated. ## `TexManager` The `TexManager.serif`, `TexManager.sans_serif`, `TexManager.cursive` and `TexManager.monospace` attributes are deprecated. --- # Development changes ## Matplotlib now requires numpy\>=1.15 ## Matplotlib now uses Pillow to save and read pngs The builtin png encoder and decoder has been removed, and Pillow is now a dependency. Note that when reading 16-bit RGB(A) images, Pillow truncates them to 8-bit precision, whereas the old builtin decoder kept the full precision. The deprecated wx backend (not wxagg!) now always uses wx\'s builtin jpeg and tiff support rather than relying on Pillow for writing these formats; this behavior is consistent with wx\'s png output. --- # Removals The following deprecated APIs have been removed: ## Modules - `backends.qt_editor.formlayout` (use the formlayout module available on PyPI instead). ## Classes, methods and attributes - `artist.Artist.aname` property (no replacement) - `axis.Axis.iter_ticks` (no replacement) - Support for custom backends that do not provide a `backend_bases.GraphicsContextBase.set_hatch_color` method - `backend_bases.RendererBase.strip_math()` (use `cbook.strip_math()` instead) - `backend_wx.debug_on_error()` (no replacement) - `backend_wx.raise_msg_to_str()` (no replacement) - `backend_wx.fake_stderr` (no replacement) - `backend_wx.MenuButtonWx` (no replacement) - `backend_wx.PrintoutWx` (no replacement) - `_backend_tk.NavigationToolbar2Tk.set_active()` (no replacement) - `backend_ps.PsBackendHelper.gs_exe` property (no replacement) - `backend_ps.PsBackendHelper.gs_version` property (no replacement) - `backend_ps.PsBackendHelper.supports_ps2write` property (no replacement) - `backend_ps.RendererPS.afmfontd` property (no replacement) - `backend_ps.GraphicsContextPS.shouldstroke` property (no replacement) - `backend_gtk3.FileChooserDialog` (no replacement) - `backend_gtk3.SaveFigureGTK3.get_filechooser()` (no replacement) - `backend_gtk3.NavigationToolbar2GTK3.get_filechooser()` (no replacement) - `backend_gtk3cairo.FigureManagerGTK3Cairo` (use `backend_gtk3.FigureManagerGTK3` instead) - `backend_pdf.RendererPdf.afm_font_cache` property (no replacement) - `backend_pgf.LatexManagerFactory` (no replacement) - `backend_qt5.NavigationToolbar2QT.buttons` property (no replacement) - `backend_qt5.NavigationToolbar2QT.adj_window` property (no replacement) - `bezier.find_r_to_boundary_of_closedpath()` (no replacement) - `cbook.dedent()` (use [inspect.cleandoc]{.title-ref} instead) - `cbook.get_label()` (no replacement) - `cbook.is_hashable()` (use `isinstance(..., collections.abc.Hashable)` instead) - `cbook.iterable()` (use `numpy.iterable()` instead) - `cbook.safezip()` (no replacement) - `colorbar.ColorbarBase.get_cmap` (use `ScalarMappable.get_cmap` instead) - `colorbar.ColorbarBase.set_cmap` (use `ScalarMappable.set_cmap` instead) - `colorbar.ColorbarBase.get_clim` (use `ScalarMappable.get_clim` instead) - `colorbar.ColorbarBase.set_clim` (use `ScalarMappable.set_clim` instead) - `colorbar.ColorbarBase.set_norm` (use `ScalarMappable.set_norm` instead) - `dates.seconds()` (no replacement) - `dates.minutes()` (no replacement) - `dates.hours()` (no replacement) - `dates.weeks()` (no replacement) - `dates.strpdate2num` and `dates.bytespdate2num` (use [time.strptime]{.title-ref} or [dateutil.parser.parse]{.title-ref} or [.dates.datestr2num]{.title-ref} instead) - `docstring.Appender` (no replacement) - `docstring.dedent()` (use [inspect.getdoc]{.title-ref} instead) - `docstring.copy_dedent()` (use `docstring.copy()` and [inspect.getdoc]{.title-ref} instead) - `font_manager.OSXInstalledFonts()` (no replacement) - `image.BboxImage.interp_at_native` property (no replacement) - `lines.Line2D.verticalOffset` property (no replacement) - `matplotlib.checkdep_dvipng` (no replacement) - `matplotlib.checkdep_ghostscript` (no replacement) - `matplotlib.checkdep_pdftops` (no replacement) - `matplotlib.checkdep_inkscape` (no replacement) - `matplotlib.get_py2exe_datafiles` (no replacement) - `matplotlib.tk_window_focus` (use `rcParams['tk.window_focus']` instead) - `mlab.demean()` (use `mlab.detrend_mean()` instead) - `path.get_paths_extents()` (use `path.get_path_collection_extents()` instead) - `path.Path.has_nonfinite()` (use `not np.isfinite(self.vertices).all()` instead) - `projections.process_projection_requirements()` (no replacement) - `pyplot.plotfile()` (Instead, load the data using [pandas.read_csv]{.title-ref} or [numpy.loadtxt]{.title-ref} or similar and use regular pyplot functions to plot the loaded data.) - `quiver.Quiver.color()` (use `Quiver.get_facecolor()` instead) - `quiver.Quiver.keyvec` property (no replacement) - `quiver.Quiver.keytext` property (no replacement) - `rcsetup.validate_qt4()` (no replacement) - `rcsetup.validate_qt5()` (no replacement) - `rcsetup.validate_verbose()` (no replacement) - `rcsetup.ValidateInterval` (no replacement) - `scale.LogTransformBase` (use `scale.LogTransform` instead) - `scale.InvertedLogTransformBase` (use `scale.InvertedLogTransform` instead) - `scale.Log10Transform` (use `scale.LogTransform` instead) - `scale.InvertedLog10Transform` (use `scale.InvertedLogTransform` instead) - `scale.Log2Transform` (use `scale.LogTransform` instead) - `scale.InvertedLog2Transform` (use `scale.InvertedLogTransform` instead) - `scale.NaturalLogTransform` (use `scale.LogTransform` instead) - `scale.InvertedNaturalLogTransform` (use `scale.InvertedLogTransform` instead) - `scale.get_scale_docs()` (no replacement) - `sphinxext.plot_directive.plot_directive()` (use the class `PlotDirective` instead) - `sphinxext.mathmpl.math_directive()` (use the class `MathDirective` instead) - `spines.Spine.is_frame_like()` (no replacement) - `testing.decorators.switch_backend()` (use `@pytest.mark.backend` decorator instead) - `text.Text.is_math_text()` (use `cbook.is_math_text()` instead) - `text.TextWithDash()` (use `text.Annotation` instead) - `textpath.TextPath.is_math_text()` (use `cbook.is_math_text()` instead) - `textpath.TextPath.text_get_vertices_codes()` (use `textpath.text_to_path.get_text_path()` instead) - `textpath.TextToPath.glyph_to_path()` (use `font.get_path()` and manual translation of the vertices instead) - `ticker.OldScalarFormatter.pprint_val()` (no replacement) - `ticker.ScalarFormatter.pprint_val()` (no replacement) - `ticker.LogFormatter.pprint_val()` (no replacement) - `ticker.decade_down()` (no replacement) - `ticker.decade_up()` (no replacement) - `Tick` properties `gridOn`, `tick1On`, `tick2On`, `label1On`, `label2On` (use `set_visible()` / `get_visible()` on `Tick.gridline`, `Tick.tick1line`, `Tick.tick2line`, `Tick.label1`, `Tick.label2` instead) - `widgets.SpanSelector.buttonDown` property (no replacement) - `mplot3d.proj3d.line2d()` (no replacement) - `mplot3d.proj3d.line2d_dist()` (no replacement) - `mplot3d.proj3d.line2d_seg_dist()` (no replacement) - `mplot3d.proj3d.mod()` (use [numpy.linalg.norm]{.title-ref} instead) - `mplot3d.proj3d.proj_transform_vec()` (no replacement) - `mplot3d.proj3d.proj_transform_vec_clip()` (no replacement) - `mplot3d.proj3d.vec_pad_ones()` (no replacement) - `mplot3d.proj3d.proj_trans_clip_points()` (no replacement) - `mplot3d.art3d.norm_angle()` (no replacement) - `mplot3d.art3d.norm_text_angle()` (no replacement) - `mplot3d.art3d.path_to_3d_segment()` (no replacement) - `mplot3d.art3d.paths_to_3d_segments()` (no replacement) - `mplot3d.art3d.path_to_3d_segment_with_codes()` (no replacement) - `mplot3d.art3d.paths_to_3d_segments_with_codes()` (no replacement) - `mplot3d.art3d.get_patch_verts()` (no replacement) - `mplot3d.art3d.get_colors()` (no replacement) - `mplot3d.art3d.zalpha()` (no replacement) - `mplot3d.axis3d.get_flip_min_max()` (no replacement) - `mplot3d.axis3d.Axis.get_tick_positions()` (no replacement) - `axisartist.axis_artist.UnimplementedException` (no replacement) - `axisartist.axislines.SimpleChainedObjects` (use `axis_grid1.mpl_axes.SimpleChainedObjects` instead) - `axisartist.axislines.Axes.AxisDict` (use `axis_grid1.mpl_axes.Axes.AxisDict` instead) ## Arguments - `Axes.text()` / `pyplot.text()` do not support the parameter `withdash` anymore. Use `Axes.annotate()` and `pyplot.annotate()` instead. - The first parameter of [matplotlib.use]{.title-ref} has been renamed from `arg` to `backend` (only relevant if you pass by keyword). - The parameter `warn` of [matplotlib.use]{.title-ref} has been removed. A failure to switch the backend will now always raise an `ImportError` if `force` is set; catch that error if necessary. - All parameters of [matplotlib.use]{.title-ref} except the first one are now keyword-only. - The unused parameters `shape` and `imlim` of [\~.axes.Axes.imshow()]{.title-ref} are now removed. All parameters beyond `extent` are now keyword-only. - The unused parameter `interp_at_native` of [.BboxImage]{.title-ref} has been removed. - The parameter `usetex` of [.TextToPath.get_text_path]{.title-ref} has been removed. Use `ismath='TeX'` instead. - The parameter `block` of `show()` is now keyword-only, and arbitrary arguments or keyword arguments are no longer accepted. - The parameter `frameon` of [.Figure.savefig]{.title-ref} has been removed. Use `facecolor="none"` to get a transparent background. - Passing a `wx.EvtHandler` as the first argument to `backend_wx.TimerWx` is not supported anymore; the signature of `TimerWx` is now consistent with [.TimerBase]{.title-ref}. - The `manage_xticks` parameter of [\~.Axes.boxplot]{.title-ref} and [\~.Axes.bxp]{.title-ref} has been renamed to `manage_ticks`. - The `normed` parameter of [\~.Axes.hist2d]{.title-ref} has been renamed to `density`. - The `s` parameter of [.Annotation]{.title-ref} has been renamed to `text`. - For all functions in [.bezier]{.title-ref} that supported a `tolerance` parameter, this parameter has been renamed to `tolerance`. - `axis("normal")` is not supported anymore. Use the equivalent `axis("auto")` instead. - `axis()` does not accept arbitrary keyword arguments anymore. - `Axis.set_ticklabels()` does not accept arbitrary positional arguments other than `ticklabels`. - `mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_zsort` does not accept the value `True` anymore. Pass the equivalent value \'average\' instead. - [.AnchoredText]{.title-ref} no longer accepts `horizontalalignment` or `verticalalignment` keyword arguments. - [.ConnectionPatch]{.title-ref} no longer accepts the `arrow_transmuter` and `connector` keyword arguments, which did nothing since 3.0. - [.FancyArrowPatch]{.title-ref} no longer accepts the `arrow_transmuter` and `connector` keyword arguments, which did nothing since 3.0. - [.TextPath]{.title-ref} no longer accepts arbitrary positional or keyword arguments. - [.MaxNLocator.set_params()]{.title-ref} no longer accepts arbitrary keyword arguments. - [\~.Axes.pie]{.title-ref} no longer accepts and squeezes non-1D inputs; pass 1D input to the `x` argument. - Passing (n, 1)-shaped error arrays to [.Axes.errorbar()]{.title-ref} is no longer supported; pass a 1D array instead. ## rcParams - The `text.latex.unicode` rcParam has been removed, with no replacement. Matplotlib now always supports unicode in usetex. - The `savefig.frameon` rcParam has been removed. Set `savefig.facecolor`{.interpreted-text role="rc"} to \"none\" to get a transparent background. - The `pgf.debug`, `verbose.fileo` and `verbose.verbose.level` rcParams, which had no effect, have been removed. - Support for setting `mathtext.default`{.interpreted-text role="rc"} to \"circled\" has been removed. ## Environment variables - `MATPLOTLIBDATA` (no replacement). ## mathtext - The `\stackrel` command (which behaved differently from its LaTeX version) has been removed. Use `\genfrac` instead. - The `\mathcircled` command has been removed. Directly use Unicode characters, such as `'\N{CIRCLED LATIN CAPITAL LETTER A}'`, instead. --- # API Changes for 3.3.0 ::: {.contents local="" depth="1"} ::: --- # API Changes for 3.3.1 ## Deprecations ### Reverted deprecation of `num2epoch` and `epoch2num` These two functions were deprecated in 3.3.0, and did not return an accurate Matplotlib datenum relative to the new Matplotlib epoch handling ([\~.dates.get_epoch]{.title-ref} and `date.epoch`{.interpreted-text role="rc"}). This version reverts the deprecation. ### Functions `epoch2num` and `dates.julian2num` use `date.epoch` rcParam Now `epoch2num` and (undocumented) `julian2num` return floating point days since [\~.dates.get_epoch]{.title-ref} as set by `date.epoch`{.interpreted-text role="rc"}, instead of floating point days since the old epoch of \"0000-12-31T00:00:00\". If needed, you can translate from the new to old values as `old = new + mdates.date2num(np.datetime64('0000-12-31'))` --- # Behaviour changes ## Constrained layout rewrite The layout manager `constrained_layout` was re-written with different outer constraints that should be more robust to complicated subplot layouts. User-facing changes are: - some poorly constrained layouts will have different width/height plots than before. - colorbars now respect the `anchor` keyword argument of [matplotlib.colorbar.make_axes]{.title-ref} - colorbars are wider. - colorbars in different rows or columns line up more robustly. - *hspace* and *wspace* options to [.Figure.set_constrained_layout_pads]{.title-ref} were twice as wide as the docs said they should be. So these now follow the docs. This feature will remain \"experimental\" until the new changes have been used enough by users, so we anticipate version 3.5 or 3.6. On the other hand, `constrained_layout` is extensively tested and used in examples in the library, so using it should be safe, but layouts may not be exactly the same as more development takes place. Details of using `constrained_layout`, and its algorithm are available at `constrainedlayout_guide`{.interpreted-text role="ref"} ## `plt.subplot` re-selection without keyword arguments The purpose of [.pyplot.subplot]{.title-ref} is to facilitate creating and re-selecting Axes in a Figure when working strictly in the implicit pyplot API. When creating new Axes it is possible to select the projection (e.g. polar, 3D, or various cartographic projections) as well as to pass additional keyword arguments through to the Axes-subclass that is created. The first time [.pyplot.subplot]{.title-ref} is called for a given position in the Axes grid it always creates and returns a new Axes with the passed arguments and projection (defaulting to rectilinear). On subsequent calls to [.pyplot.subplot]{.title-ref} we have to determine if an existing Axes has a) equivalent parameters, in which case it should be selected as the current Axes and returned, or b) different parameters, in which case a new Axes is created and the existing Axes is removed. This leaves the question of what is \"equivalent parameters\". Previously it was the case that an existing Axes subclass, except for Axes3D, would be considered equivalent to a 2D rectilinear Axes, despite having different projections, if the keyword arguments (other than *projection*) matched. Thus: ax1 = plt.subplot(1, 1, 1, projection='polar') ax2 = plt.subplots(1, 1, 1) ax1 is ax2 We are embracing this long standing behavior to ensure that in the case when no keyword arguments (of any sort) are passed to [.pyplot.subplot]{.title-ref} any existing Axes is returned, without consideration for keywords or projection used to initially create it. This will cause a change in behavior when additional keywords were passed to the original Axes: ax1 = plt.subplot(111, projection='polar', theta_offset=.75) ax2 = plt.subplots(1, 1, 1) ax1 is ax2 # new behavior # ax1 is not ax2 # old behavior, made a new axes ax1 = plt.subplot(111, label='test') ax2 = plt.subplots(1, 1, 1) ax1 is ax2 # new behavior # ax1 is not ax2 # old behavior, made a new axes For the same reason, if there was an existing Axes that was not rectilinear, passing `projection='rectilinear'` would reuse the existing Axes : ax1 = plt.subplot(projection='polar') ax2 = plt.subplot(projection='rectilinear') ax1 is not ax2 # new behavior, makes new Axes # ax1 is ax2 # old behavior contrary to the user\'s request. Previously Axes3D could not be re-selected with [.pyplot.subplot]{.title-ref} due to an unrelated bug (also fixed in Matplotlib 3.4). While Axes3D are now consistent with all other projections there is a change in behavior for : plt.subplot(projection='3d') # create a 3D Axes plt.subplot() # now returns existing 3D Axes, but # previously created new 2D Axes plt.subplot(projection='rectilinear') # to get a new 2D Axes ## `ioff` and `ion` can be used as context managers [.pyplot.ion]{.title-ref} and [.pyplot.ioff]{.title-ref} may now be used as context managers to create a context with interactive mode on or off, respectively. The old behavior of calling these functions is maintained. To use the new functionality call as: with plt.ioff(): # non-interactive code ## Locators and formatters must be in the class hierarchy Axis locators and formatters must now be subclasses of [\~matplotlib.ticker.Locator]{.title-ref} and [\~matplotlib.ticker.Formatter]{.title-ref} respectively. ## Date locator for DAILY interval now returns middle of month The [matplotlib.dates.AutoDateLocator]{.title-ref} has a default of `interval_multiples=True` that attempts to align ticks with the start of meaningful intervals like the start of the month, or start of the day, etc. That lead to approximately 140-day intervals being mapped to the first and 22nd of the month. This has now been changed so that it chooses the first and 15th of the month, which is probably what most people want. ## `ScalarFormatter` *useLocale* option obeys grouping When the [\~.ScalarFormatter]{.title-ref} option *useLocale* is enabled (or `axes.formatter.use_locale`{.interpreted-text role="rc"} is *True*) and the configured locale uses grouping, a separator will be added as described in [locale.format_string]{.title-ref}. ## `Axes.errorbar` cycles non-color properties correctly Formerly, [.Axes.errorbar]{.title-ref} incorrectly skipped the Axes property cycle if a color was explicitly specified, even if the property cycler was for other properties (such as line style). Now, [.Axes.errorbar]{.title-ref} will advance the Axes property cycle as done for [.Axes.plot]{.title-ref}, i.e., as long as all properties in the cycler are not explicitly passed. ## pyplot.specgram always uses origin=\'upper\' Previously if `image.origin`{.interpreted-text role="rc"} was set to something other than `'upper'` or if the *origin* keyword argument was passed with a value other than `'upper'`, the spectrogram itself would flip, but the Axes would remain oriented for an origin value of `'upper'`, so that the resulting plot was incorrectly labelled. Now, the *origin* keyword argument is not supported and the `image.origin` rcParam is ignored. The function [matplotlib.pyplot.specgram]{.title-ref} is forced to use `origin='upper'`, so that the Axes are correct for the plotted spectrogram. ## xunits=None and yunits=None passed as keyword arguments are treated as \"no action\" Many (but not all) of the methods on [\~.axes.Axes]{.title-ref} take the (undocumented) keyword arguments *xunits* and *yunits* that will update the units on the given Axis by calling [.Axis.set_units]{.title-ref} and [.Axis.update_units]{.title-ref}. Previously if *None* was passed it would clear the value stored in `.Axis.units` which will in turn break converters which rely on the value in `.Axis.units` to work properly (notably [.StrCategoryConverter]{.title-ref}). This changes the semantics of `ax.meth(..., xunits=None, yunits=None)` from \"please clear the units\" to \"do the default thing as if they had not been passed\" which is consistent with the standard behavior of Matplotlib keyword arguments. If you were relying on passing `xunits=None` to plotting methods to clear the `.Axes.units` attribute, directly call [.Axis.set_units]{.title-ref} (and [.Axis.update_units]{.title-ref} if you also require the converter to be updated). ## Annotations with `annotation_clip` no longer affect `tight_layout` Previously, [.text.Annotation.get_tightbbox]{.title-ref} always returned the full [.text.Annotation.get_window_extent]{.title-ref} of the object, independent of the value of `annotation_clip`. [.text.Annotation.get_tightbbox]{.title-ref} now correctly takes this extra clipping box into account, meaning that [\~.text.Annotation]{.title-ref}s that are not drawn because of `annotation_clip` will not count towards the Axes bounding box calculations, such as those done by [\~.pyplot.tight_layout]{.title-ref}. This is now consistent with the API described in [\~.artist.Artist]{.title-ref}, which specifies that `get_window_extent` should return the full extents and `get_tightbbox` should \"account for any clipping\". ## Parasite Axes pcolor and pcolormesh now defaults to placing grid edges at integers, not half-integers This is consistent with [\~.Axes.pcolor]{.title-ref} and [\~.Axes.pcolormesh]{.title-ref}. ## `Colorbar` outline is now a `Spine` The outline of [\~matplotlib.colorbar.Colorbar]{.title-ref} is now a [.Spine]{.title-ref} and drawn as one, instead of a [.Polygon]{.title-ref} drawn as an artist. This ensures it will always be drawn after (i.e., on top of) all artists, consistent with Spines on normal Axes. ## `Colorbar.dividers` changes This attribute is now always a [.LineCollection]{.title-ref} \-- an empty one if `drawedges` is *False*. Its default colors and linewidth (`axes.edgecolor`{.interpreted-text role="rc"}, `axes.linewidth`{.interpreted-text role="rc"}) are now resolved at instantiation time, not at draw time. ## Raise or warn on registering a colormap twice When using `matplotlib.cm.register_cmap` to register a user provided or third-party colormap it will now raise a [ValueError]{.title-ref} if trying to over-write one of the built in colormaps and warn if trying to over write a user registered colormap. This may raise for user-registered colormaps in the future. ## Consecutive rasterized draws now merged Tracking of depth of raster draws has moved from [.backend_mixed.MixedModeRenderer.start_rasterizing]{.title-ref} and [.backend_mixed.MixedModeRenderer.stop_rasterizing]{.title-ref} into [.artist.allow_rasterization]{.title-ref}. This means the start and stop functions are only called when the rasterization actually needs to be started and stopped. The output of vector backends will change in the case that rasterized elements are merged. This should not change the appearance of outputs. The renders in 3rd party backends are now expected to have `self._raster_depth` and `self._rasterizing` initialized to `0` and *False* respectively. ## Consistent behavior of `draw_if_interactive()` across backends [.pyplot.draw_if_interactive]{.title-ref} no longer shows the window (if it was previously unshown) on the Tk and nbAgg backends, consistently with all other backends. ## The Artist property *rasterized* cannot be *None* anymore It is now a boolean only. Before the default was *None* and [.Artist.set_rasterized]{.title-ref} was documented to accept *None*. However, *None* did not have a special meaning and was treated as *False*. ## Canvas\'s callback registry now stored on Figure The canonical location of the [\~.cbook.CallbackRegistry]{.title-ref} used to handle Figure/Canvas events has been moved from the Canvas to the Figure. This change should be transparent to almost all users, however if you are swapping switching the Figure out from on top of a Canvas or visa versa you may see a change in behavior. ## Harmonized key event data across backends The different backends with key translation support, now handle \"Shift\" as a sometimes modifier, where the `'shift+'` prefix won\'t be added if a key translation was made. In the Qt5 backend, the `matplotlib.backends.backend_qt5.SPECIAL_KEYS` dictionary contains keys that do *not* return their unicode name instead they have manually specified names. The name for `QtCore.Qt.Key_Meta` has changed to `'meta'` to be consistent with the other GUI backends. The WebAgg backend now handles key translations correctly on non-US keyboard layouts. In the GTK and Tk backends, the handling of non-ASCII keypresses (as reported in the KeyEvent passed to `key_press_event`-handlers) now correctly reports Unicode characters (e.g., €), and better respects NumLock on the numpad. In the GTK and Tk backends, the following key names have changed; the new names are consistent with those reported by the Qt backends: - The \"Break/Pause\" key (keysym 0xff13) is now reported as `"pause"` instead of `"break"` (this is also consistent with the X key name). - The numpad \"delete\" key is now reported as `"delete"` instead of `"dec"`. ## WebAgg backend no longer reports a middle click as a right click Previously when using the WebAgg backend the event passed to a callback by `fig.canvas.mpl_connect('mouse_button_event', callback)` on a middle click would report [.MouseButton.RIGHT]{.title-ref} instead of [.MouseButton.MIDDLE]{.title-ref}. ## ID attribute of XML tags in SVG files now based on SHA256 rather than MD5 Matplotlib generates unique ID attributes for various tags in SVG files. Matplotlib previously generated these unique IDs using the first 10 characters of an MD5 hash. The MD5 hashing algorithm is not available in Python on systems with Federal Information Processing Standards (FIPS) enabled. Matplotlib now uses the first 10 characters of an SHA256 hash instead. SVG files that would otherwise match those saved with earlier versions of matplotlib, will have different ID attributes. ## `RendererPS.set_font` is no longer a no-op in AFM mode [.RendererPS.set_font]{.title-ref} now sets the current PostScript font in all cases. ## Autoscaling in Axes3D In Matplotlib 3.2.0, autoscaling was made lazier for 2D Axes, i.e., limits would only be recomputed when actually rendering the canvas, or when the user queries the Axes limits. This performance improvement is now extended to [.Axes3D]{.title-ref}. This also fixes some issues with autoscaling being triggered unexpectedly in Axes3D. Please see `the API change for 2D Axes `{.interpreted-text role="ref"} for further details. ## Axes3D automatically adding itself to Figure is deprecated New [.Axes3D]{.title-ref} objects previously added themselves to figures when they were created, unlike all other Axes classes, which lead to them being added twice if `fig.add_subplot(111, projection='3d')` was called. This behavior is now deprecated and will warn. The new keyword argument *auto_add_to_figure* controls the behavior and can be used to suppress the warning. The default value will change to *False* in Matplotlib 3.5, and any non-*False* value will be an error in Matplotlib 3.6. In the future, [.Axes3D]{.title-ref} will need to be explicitly added to the figure : fig = Figure() # create Axes3D ax = Axes3d(fig) # add to Figure fig.add_axes(ax) as needs to be done for other [.axes.Axes]{.title-ref} sub-classes. Or, a 3D projection can be made via: fig.add_subplot(projection='3d') ## `mplot3d.art3d.get_dir_vector` always returns NumPy arrays For consistency, [\~.mplot3d.art3d.get_dir_vector]{.title-ref} now always returns NumPy arrays, even if the input is a 3-element iterable. ## Changed cursive and fantasy font definitions The Comic Sans and Comic Neue fonts were moved from the default `font.fantasy`{.interpreted-text role="rc"} list to the default `font.cursive`{.interpreted-text role="rc"} setting, in accordance with the CSS font families [example](https://www.w3.org/Style/Examples/007/fonts.en.html) and in order to provide a cursive font present in Microsoft\'s Core Fonts set. ## docstring.Substitution now always dedents docstrings before string interpolation --- # Deprecations ## Extra parameters to Axes constructor Parameters of the Axes constructor other than *fig* and *rect* will become keyword-only in a future version. ## `pyplot.gca` and `Figure.gca` keyword arguments Passing keyword arguments to [.pyplot.gca]{.title-ref} or [.figure.Figure.gca]{.title-ref} will not be supported in a future release. ## `Axis.cla`, `RadialAxis.cla`, `ThetaAxis.cla` and `Spine.cla` These methods are deprecated in favor of the respective `clear()` methods. ## Invalid hatch pattern characters are no longer ignored When specifying hatching patterns, characters that are not recognized will raise a deprecation warning. In the future, this will become a hard error. ## `imread` reading from URLs Passing a URL to [\~.pyplot.imread()]{.title-ref} is deprecated. Please open the URL for reading and directly use the Pillow API (`PIL.Image.open(urllib.request.urlopen(url))`, or `PIL.Image.open(io.BytesIO(requests.get(url).content))`) instead. ## Subplot-related attributes and methods Some `SubplotBase` methods and attributes have been deprecated and/or moved to \`.SubplotSpec\`: - `get_geometry` (use `SubplotBase.get_subplotspec` instead), - `change_geometry` (use `SubplotBase.set_subplotspec` instead), - `is_first_row`, `is_last_row`, `is_first_col`, `is_last_col` (use the corresponding methods on the [.SubplotSpec]{.title-ref} instance instead), - `update_params` (now a no-op), - `figbox` (use `ax.get_subplotspec().get_geometry(ax.figure)` instead to recompute the geometry, or `ax.get_position()` to read its current value), - `numRows`, `numCols` (use the `nrows` and `ncols` attribute on the [.GridSpec]{.title-ref} instead). Likewise, the `get_geometry`, `change_geometry`, `update_params`, and `figbox` methods/attributes of [.SubplotDivider]{.title-ref} have been deprecated, with similar replacements. ## `is_url` and `URL_REGEX` \... are deprecated. (They were previously defined in the toplevel `matplotlib`{.interpreted-text role="mod"} module.) ## `matplotlib.style.core` deprecations `STYLE_FILE_PATTERN`, `load_base_library`, and `iter_user_libraries` are deprecated. ## `dpi_cor` property of [.FancyArrowPatch]{.title-ref} This parameter is considered internal and deprecated. ## Passing `boxstyle="custom", bbox_transmuter=...` to `FancyBboxPatch` In order to use a custom boxstyle, directly pass it as the *boxstyle* argument to [.FancyBboxPatch]{.title-ref}. This was previously already possible, and is consistent with custom arrow styles and connection styles. ## BoxStyles are now called without passing the *mutation_aspect* parameter Mutation aspect is now handled by the artist itself. Hence the *mutation_aspect* parameter of `BoxStyle._Base.__call__` is deprecated, and custom boxstyles should be implemented to not require this parameter (it can be left as a parameter defaulting to 1 for back-compatibility). ## `ContourLabeler.get_label_coords` is deprecated It is considered an internal helper. ## Line2D and Patch no longer duplicate `validJoin` and `validCap` Validation of joinstyle and capstyles is now centralized in `rcsetup`. ## Setting a Line2D\'s pickradius via `set_picker` is undeprecated This cancels the deprecation introduced in Matplotlib 3.3.0. ## `MarkerStyle` is considered immutable `MarkerStyle.set_fillstyle()` and `MarkerStyle.set_marker()` are deprecated. Create a new `MarkerStyle` with the respective parameters instead. ## `MovieWriter.cleanup` is deprecated Cleanup logic is now fully implemented in [.MovieWriter.finish]{.title-ref}. Third-party movie writers should likewise move the relevant cleanup logic there, as overridden `cleanup`s will no longer be called in the future. ## *minimumdescent* parameter/property of `TextArea` [.offsetbox.TextArea]{.title-ref} has behaved as if *minimumdescent* was always True (regardless of the value to which it was set) since Matplotlib 1.3, so the parameter/property is deprecated. ## `colorbar` now warns when the mappable\'s Axes is different from the current Axes Currently, [.Figure.colorbar]{.title-ref} and [.pyplot.colorbar]{.title-ref} steal space by default from the current Axes to place the colorbar. In a future version, they will steal space from the mappable\'s Axes instead. In preparation for this change, [.Figure.colorbar]{.title-ref} and [.pyplot.colorbar]{.title-ref} now emits a warning when the current Axes is not the same as the mappable\'s Axes. ## Colorbar docstrings The following globals in `matplotlib.colorbar`{.interpreted-text role="mod"} are deprecated: `colorbar_doc`, `colormap_kw_doc`, `make_axes_kw_doc`. ## `ColorbarPatch` and `colorbar_factory` are deprecated All the relevant functionality has been moved to the [\~matplotlib.colorbar.Colorbar]{.title-ref} class. ## Backend deprecations - `FigureCanvasBase.get_window_title` and `FigureCanvasBase.set_window_title` are deprecated. Use the corresponding methods on the FigureManager if using pyplot, or GUI-specific methods if embedding. - The *resize_callback* parameter to `FigureCanvasTk` was never used internally and is deprecated. Tk-level custom event handlers for resize events can be added to a `FigureCanvasTk` using e.g. `get_tk_widget().bind('', ..., True)`. - The `key_press` and `button_press` methods of [.FigureManagerBase]{.title-ref}, which incorrectly did nothing when using `toolmanager`, are deprecated in favor of directly passing the event to the [.CallbackRegistry]{.title-ref} via `self.canvas.callbacks.process(event.name, event)`. - `RendererAgg.get_content_extents` and `RendererAgg.tostring_rgba_minimized` are deprecated. - `backend_pgf.TmpDirCleaner` is deprecated, with no replacement. - `GraphicsContextPS` is deprecated. The PostScript backend now uses [.GraphicsContextBase]{.title-ref}. ## wx backend cleanups The *origin* parameter to `_FigureCanvasWxBase.gui_repaint` is deprecated with no replacement; `gui_repaint` now automatically detects the case where it is used with the wx renderer. The `NavigationToolbar2Wx.get_canvas` method is deprecated; directly instantiate a canvas (`FigureCanvasWxAgg(frame, -1, figure)`) if needed. ## Unused positional parameters to `print_` methods are deprecated None of the `print_` methods implemented by canvas subclasses used positional arguments other that the first (the output filename or file-like), so these extra parameters are deprecated. ## The *dpi* parameter of `FigureCanvas.print_foo` printers is deprecated The [\~.Figure.savefig]{.title-ref} machinery already took care of setting the figure DPI to the desired value, so `print_foo` can directly read it from there. Not passing *dpi* to `print_foo` allows clearer detection of unused parameters passed to [\~.Figure.savefig]{.title-ref}. ## Passing [bytes]{.title-ref} to `FT2Font.set_text` \... is deprecated, pass [str]{.title-ref} instead. ## `ps.useafm` deprecated for mathtext Outputting mathtext using only standard PostScript fonts has likely been broken for a while (issue [#18722](https://github.com/matplotlib/matplotlib/issues/18722)). In Matplotlib 3.5, the setting `ps.useafm`{.interpreted-text role="rc"} will have no effect on mathtext. ## `MathTextParser("bitmap")` is deprecated The associated APIs `MathtextBackendBitmap`, `MathTextParser.to_mask`, `MathTextParser.to_rgba`, `MathTextParser.to_png`, and `MathTextParser.get_depth` are likewise deprecated. To convert a text string to an image, either directly draw the text to an empty [.Figure]{.title-ref} and save the figure using a tight bbox, as demonstrated in `/gallery/text_labels_and_annotations/mathtext_asarray`{.interpreted-text role="doc"}, or use [.mathtext.math_to_image]{.title-ref}. When using [.math_to_image]{.title-ref}, text color can be set with e.g.: with plt.rc_context({"text.color": "tab:blue"}): mathtext.math_to_image(text, filename) and an RGBA array can be obtained with e.g.: from io import BytesIO buf = BytesIO() mathtext.math_to_image(text, buf, format="png") buf.seek(0) rgba = plt.imread(buf) ## Deprecation of mathtext internals The following API elements previously exposed by the `.mathtext`{.interpreted-text role="mod"} module are considered to be implementation details and public access to them is deprecated: - `Fonts` and all its subclasses, - `FontConstantsBase` and all its subclasses, - `Node` and all its subclasses, - `Ship`, `ship`, - `Error`, - `Parser`, - `SHRINK_FACTOR`, `GROW_FACTOR`, - `NUM_SIZE_LEVELS`, - `latex_to_bakoma`, `latex_to_cmex`, `latex_to_standard`, - `stix_virtual_fonts`, - `tex2uni`. ## Deprecation of various mathtext helpers The `MathtextBackendPdf`, `MathtextBackendPs`, `MathtextBackendSvg`, and `MathtextBackendCairo` classes from the `.mathtext`{.interpreted-text role="mod"} module, as well as the corresponding `.mathtext_parser` attributes on `RendererPdf`, `RendererPS`, `RendererSVG`, and `RendererCairo`, are deprecated. The `MathtextBackendPath` class can be used to obtain a list of glyphs and rectangles in a mathtext expression, and renderer-specific logic should be directly implemented in the renderer. `StandardPsFonts.pswriter` is unused and deprecated. ## Widget class internals Several [.widgets.Widget]{.title-ref} class internals have been privatized and deprecated: - `AxesWidget.cids` - `Button.cnt` and `Button.observers` - `CheckButtons.cnt` and `CheckButtons.observers` - `RadioButtons.cnt` and `RadioButtons.observers` - `Slider.cnt` and `Slider.observers` - `TextBox.cnt`, `TextBox.change_observers` and `TextBox.submit_observers` ## 3D properties on renderers The properties of the 3D Axes that were placed on the Renderer during draw are now deprecated: - `renderer.M` - `renderer.eye` - `renderer.vvec` - `renderer.get_axis_position` These attributes are all available via [.Axes3D]{.title-ref}, which can be accessed via `self.axes` on all [.Artist]{.title-ref}s. ## *renderer* argument of `do_3d_projection` method for `Collection3D`/`Patch3D` The *renderer* argument for the `do_3d_projection` method on `Collection3D` and `Patch3D` is no longer necessary, and passing it during draw is deprecated. ## *project* argument of `draw` method for `Line3DCollection` The *project* argument for the `draw` method on `Line3DCollection` is deprecated. Call [.Line3DCollection.do_3d_projection]{.title-ref} explicitly instead. ## Extra positional parameters to `plot_surface` and `plot_wireframe` Positional parameters to [\~.axes3d.Axes3D.plot_surface]{.title-ref} and [\~.axes3d.Axes3D.plot_wireframe]{.title-ref} other than `X`, `Y`, and `Z` are deprecated. Pass additional artist properties as keyword arguments instead. ## `ParasiteAxesAuxTransBase` class The functionality of that mixin class has been moved to the base `ParasiteAxesBase` class. Thus, `ParasiteAxesAuxTransBase`, `ParasiteAxesAuxTrans`, and `parasite_axes_auxtrans_class_factory` are deprecated. In general, it is suggested to use `HostAxes.get_aux_axes` to create parasite Axes, as this saves the need of manually appending the parasite to `host.parasites` and makes sure that their `remove()` method works properly. ## `AxisArtist.ZORDER` attribute Use `AxisArtist.zorder` instead. ## `GridHelperBase` invalidation The `GridHelperBase.invalidate`, `GridHelperBase.valid`, and `axislines.Axes.invalidate_grid_helper` methods are considered internal and deprecated. ## `sphinext.plot_directive.align` \... is deprecated. Use `docutils.parsers.rst.directives.images.Image.align` instead. ## Deprecation-related functionality is considered internal The module `matplotlib.cbook.deprecation` is considered internal and will be removed from the public API. This also holds for deprecation-related re-imports in `matplotlib.cbook`, i.e. `matplotlib.cbook.deprecated()`, `matplotlib.cbook.warn_deprecated()`, `matplotlib.cbook.MatplotlibDeprecationWarning` and `matplotlib.cbook.mplDeprecation`. If needed, external users may import `MatplotlibDeprecationWarning` directly from the `matplotlib` namespace. `mplDeprecation` is only an alias of `MatplotlibDeprecationWarning` and should not be used anymore. --- # Development changes ## Increase to minimum supported versions of Python and dependencies For Matplotlib 3.4, the `minimum supported versions `{.interpreted-text role="ref"} are being bumped: +------------+-----------------+---------------+ | Dependency | > min in mpl3.3 | min in mpl3.4 | +============+=================+===============+ | > Python | > 3.6 | > 3.7 | +------------+-----------------+---------------+ | > dateutil | > 2.1 | > 2.7 | +------------+-----------------+---------------+ | > numpy | > 1.15 | > 1.16 | +------------+-----------------+---------------+ | pyparsing | > 2.0.3 | > 2.2.1 | +------------+-----------------+---------------+ This is consistent with our `min_deps_policy`{.interpreted-text role="ref"} and [NEP29](https://numpy.org/neps/nep-0029-deprecation_policy.html) ## Qhull downloaded at build-or-sdist time Much like FreeType, Qhull is now downloaded at build time, or upon creation of the sdist. To link against system Qhull, set the `system_qhull` option to [True]{.title-ref} in the `setup.cfg`{.interpreted-text role="file"} file. Note that Matplotlib now requires the re-entrant version of Qhull (`qhull_r`). ## `FigureBase` class added, and `Figure` class made a child The new subfigure feature motivated some re-organization of the [.figure.Figure]{.title-ref} class, so that the new [.figure.SubFigure]{.title-ref} class could have all the capabilities of a figure. The [.figure.Figure]{.title-ref} class is now a subclass of [.figure.FigureBase]{.title-ref}, where [.figure.FigureBase]{.title-ref} contains figure-level artist addition routines, and the [.figure.Figure]{.title-ref} subclass just contains features that are unique to the outer figure. Note that there is a new *transSubfigure* transform associated with the subfigure. This transform also exists for a [.Figure]{.title-ref} instance, and is equal to *transFigure* in that case, so code that uses the transform stack that wants to place objects on either the parent figure or one of the subfigures should use *transSubfigure*. --- # Removals The following deprecated APIs have been removed: ## Removed behaviour - The \"smart bounds\" functionality on [\~.axis.Axis]{.title-ref} and [.Spine]{.title-ref} has been deleted, and the related methods have been removed. - Converting a string with single color characters (e.g. `'cymk'`) in [\~.colors.to_rgba_array]{.title-ref} is no longer supported. Instead, the colors can be passed individually in a list (e.g. `['c', 'y', 'm', 'k']`). - Returning a factor equal to `None` from `mpl_toolkits.axisartist` Locators (which are **not** the same as \"standard\" tick Locators), or passing a factor equal to `None` to axisartist Formatters (which are **not** the same as \"standard\" tick Formatters) is no longer supported. Pass a factor equal to 1 instead. ## Modules - The entire `matplotlib.testing.disable_internet` module has been removed. The [pytest-remotedata package](https://github.com/astropy/pytest-remotedata) can be used instead. - The `mpl_toolkits.axes_grid1.colorbar` module and its colorbar implementation have been removed in favor of [matplotlib.colorbar]{.title-ref}. ## Classes, methods and attributes - The [.animation.MovieWriterRegistry]{.title-ref} methods `.set_dirty()`, `.ensure_not_dirty()`, and `.reset_available_writers()` do nothing and have been removed. The `.avail()` method has been removed; use `.list()` instead to get a list of available writers. - The `matplotlib.artist.Artist.eventson` and `matplotlib.container.Container.eventson` attributes have no effect and have been removed. - `matplotlib.axes.Axes.get_data_ratio_log` has been removed. - `matplotlib.axes.SubplotBase.rowNum`; use `ax.get_subplotspec().rowspan.start` instead. - `matplotlib.axes.SubplotBase.colNum`; use `ax.get_subplotspec().colspan.start` instead. - `matplotlib.axis.Axis.set_smart_bounds` and `matplotlib.axis.Axis.get_smart_bounds` have been removed. - `matplotlib.colors.DivergingNorm` has been renamed to [\~matplotlib.colors.TwoSlopeNorm]{.title-ref}. - `matplotlib.figure.AxesStack` has been removed. - `matplotlib.font_manager.JSONEncoder` has been removed; use [.font_manager.json_dump]{.title-ref} to dump a [.FontManager]{.title-ref} instance. - The `matplotlib.ft2font.FT2Image` methods `.as_array()`, `.as_rgba_str()`, `.as_str()`, `.get_height()` and `.get_width()` have been removed. Convert the `FT2Image` to a NumPy array with `np.asarray` before processing it. - `matplotlib.quiver.QuiverKey.quiverkey_doc` has been removed; use `matplotlib.quiver.QuiverKey.__init__.__doc__` instead. - `matplotlib.spines.Spine.set_smart_bounds` and `matplotlib.spines.Spine.get_smart_bounds` have been removed. - `matplotlib.testing.jpl_units.UnitDbl.checkUnits` has been removed; use `units not in self.allowed` instead. - The unused `matplotlib.ticker.Locator.autoscale` method has been removed (pass the axis limits to [.Locator.view_limits]{.title-ref} instead). The derived methods `Locator.autoscale`, `AutoDateLocator.autoscale`, `RRuleLocator.autoscale`, `RadialLocator.autoscale`, `ThetaLocator.autoscale`, and `YearLocator.autoscale` have also been removed. - `matplotlib.transforms.BboxBase.is_unit` has been removed; check the [.Bbox]{.title-ref} extents if needed. - `matplotlib.transforms.Affine2DBase.matrix_from_values(...)` has been removed; use (for example) `Affine2D.from_values(...).get_matrix()` instead. - `matplotlib.backend_bases.FigureCanvasBase.draw_cursor` has been removed. - `matplotlib.backends.backend_gtk.ConfigureSubplotsGTK3.destroy` and `matplotlib.backends.backend_gtk.ConfigureSubplotsGTK3.init_window` methods have been removed. - `matplotlib.backends.backend_gtk.ConfigureSubplotsGTK3.window` property has been removed. - `matplotlib.backends.backend_macosx.FigureCanvasMac.invalidate` has been removed. - `matplotlib.backends.backend_pgf.RendererPgf.latexManager` has been removed. - `matplotlib.backends.backend_wx.FigureFrameWx.statusbar`, `matplotlib.backends.backend_wx.NavigationToolbar2Wx.set_status_bar`, and `matplotlib.backends.backend_wx.NavigationToolbar2Wx.statbar` have been removed. The status bar can be retrieved by calling standard wx methods (`frame.GetStatusBar()` and `toolbar.GetTopLevelParent().GetStatusBar()`). - `matplotlib.backends.backend_wx.ConfigureSubplotsWx.configure_subplots` and `matplotlib.backends.backend_wx.ConfigureSubplotsWx.get_canvas` have been removed. - `mpl_toolkits.axisartist.grid_finder.GridFinderBase` has been removed; use [.GridFinder]{.title-ref} instead. - `mpl_toolkits.axisartist.axis_artist.BezierPath` has been removed; use [.patches.PathPatch]{.title-ref} instead. ## Functions - `matplotlib.backends.backend_pgf.repl_escapetext` and `matplotlib.backends.backend_pgf.repl_mathdefault` have been removed. - `matplotlib.checkdep_ps_distiller` has been removed. - `matplotlib.cm.revcmap` has been removed; use [.Colormap.reversed]{.title-ref} instead. - `matplotlib.colors.makeMappingArray` has been removed. - `matplotlib.compare_versions` has been removed; use comparison of `distutils.version.LooseVersion`s instead. - `matplotlib.dates.mx2num` has been removed. - `matplotlib.font_manager.createFontList` has been removed; [.font_manager.FontManager.addfont]{.title-ref} is now available to register a font at a given path. - `matplotlib.get_home` has been removed; use standard library instead. - `matplotlib.mlab.apply_window` and `matplotlib.mlab.stride_repeat` have been removed. - `matplotlib.rcsetup.update_savefig_format` has been removed; this just replaced `'auto'` with `'png'`, so do the same. - `matplotlib.rcsetup.validate_animation_writer_path` has been removed. - `matplotlib.rcsetup.validate_path_exists` has been removed; use [os.path.exists]{.title-ref} or [pathlib.Path.exists]{.title-ref} instead. - `matplotlib.style.core.is_style_file` and `matplotlib.style.core.iter_style_files` have been removed. - `matplotlib.testing.is_called_from_pytest` has been removed. - `mpl_toolkits.mplot3d.axes3d.unit_bbox` has been removed; use [.Bbox.unit]{.title-ref} instead. ## Arguments - Passing more than one positional argument to [.axes.Axes.axis]{.title-ref} will now raise an error. - Passing `"range"` to the *whis* parameter of [.Axes.boxplot]{.title-ref} and [.cbook.boxplot_stats]{.title-ref} to mean \"the whole data range\" is no longer supported. - Passing scalars to the *where* parameter in [.axes.Axes.fill_between]{.title-ref} and [.axes.Axes.fill_betweenx]{.title-ref} is no longer accepted and non-matching sizes now raise a [ValueError]{.title-ref}. - The *verts* parameter to [.Axes.scatter]{.title-ref} has been removed; use *marker* instead. - The *minor* parameter in [.Axis.set_ticks]{.title-ref} and `SecondaryAxis.set_ticks` is now keyword-only. - [.scale.ScaleBase]{.title-ref}, [.scale.LinearScale]{.title-ref} and [.scale.SymmetricalLogScale]{.title-ref} now error if any unexpected keyword arguments are passed to their constructors. - The *renderer* parameter to [.Figure.tight_layout]{.title-ref} has been removed; this method now always uses the renderer instance cached on the [.Figure]{.title-ref}. - The *locator* parameter to [mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase.colorbar]{.title-ref} has been removed in favor of its synonym *ticks* (which already existed previously, and is consistent with `matplotlib.colorbar`{.interpreted-text role="mod"}). - The *switch_backend_warn* parameter to `matplotlib.test` has no effect and has been removed. - The *dryrun* parameter to the various `FigureCanvas*.print_*` methods has been removed. ## rcParams - The `datapath` rcParam has been removed. Use [matplotlib.get_data_path]{.title-ref} instead. - The `mpl_toolkits.legacy_colorbar` rcParam has no effect and has been removed. - Setting `boxplot.whiskers`{.interpreted-text role="rc"} to `"range"` is no longer valid; set it to `0, 100` instead. - Setting `savefig.format`{.interpreted-text role="rc"} to `"auto"` is no longer valid; use `"png"` instead. - Setting `text.hinting`{.interpreted-text role="rc"} to [False]{.title-ref} or [True]{.title-ref} is no longer valid; set it to `"auto"` or `"none"` respectively. ## sample_data removals The sample datasets listed below have been removed. Suggested replacements for demonstration purposes are listed in parentheses. - `None_vs_nearest-pdf.png`, - `aapl.npz` (use `goog.npz`), - `ada.png`, `grace_hopper.png` (use `grace_hopper.jpg`), - `ct.raw.gz` (use `s1045.ima.gz`), - `damodata.csv` (use `msft.csv`). --- # API Changes for 3.4.0 ::: {.contents local="" depth="1"} ::: --- # API Changes for 3.4.2 ## Behaviour changes ### Rename first argument to `subplot_mosaic` Both [.Figure.subplot_mosaic]{.title-ref}, and [.pyplot.subplot_mosaic]{.title-ref} have had the first position argument renamed from *layout* to *mosaic*. This is because we are considering to consolidate *constrained_layout* and *tight_layout* keyword arguments in the Figure creation functions of [.pyplot]{.title-ref} into a single *layout* keyword argument which would collide. As this API is provisional, we are changing this with no deprecation period. --- # Behaviour changes ## First argument to `subplot_mosaic` renamed Both [.Figure.subplot_mosaic]{.title-ref}, and [.pyplot.subplot_mosaic]{.title-ref} have had the first positional argument renamed from *layout* to *mosaic*. As we have consolidated the *constrained_layout* and *tight_layout* keyword arguments in the Figure creation functions of [.pyplot]{.title-ref} into a single *layout* keyword argument, the original `subplot_mosaic` argument name would collide. As this API is provisional, we are changing this argument name with no deprecation period. ## `Axes` children are no longer separated by type {#Behavioural API Changes 3.5 - Axes children combined} Formerly, [.axes.Axes]{.title-ref} children were separated by [.Artist]{.title-ref} type, into sublists such as `Axes.lines`. For methods that produced multiple elements (such as [.Axes.errorbar]{.title-ref}), though individual parts would have similar *zorder*, this separation might cause them to be drawn at different times, causing inconsistent results when overlapping other Artists. Now, the children are no longer separated by type, and the sublist properties are generated dynamically when accessed. Consequently, Artists will now always appear in the correct sublist; e.g., if [.axes.Axes.add_line]{.title-ref} is called on a [.Patch]{.title-ref}, it will appear in the `Axes.patches` sublist, *not* `Axes.lines`. The `Axes.add_*` methods will now warn if passed an unexpected type. Modification of the following sublists is still accepted, but deprecated: - `Axes.artists` - `Axes.collections` - `Axes.images` - `Axes.lines` - `Axes.patches` - `Axes.tables` - `Axes.texts` To remove an Artist, use its [.Artist.remove]{.title-ref} method. To add an Artist, use the corresponding `Axes.add_*` method. ## `MatplotlibDeprecationWarning` now subclasses `DeprecationWarning` Historically, it has not been possible to filter [\~matplotlib.MatplotlibDeprecationWarning]{.title-ref}s by checking for [DeprecationWarning]{.title-ref}, since we subclass [UserWarning]{.title-ref} directly. The decision to not subclass [DeprecationWarning]{.title-ref} has to do with a decision from core Python in the 2.x days to not show [DeprecationWarning]{.title-ref}s to users. However, there is now a more sophisticated filter in place (see ). Users will now see [\~matplotlib.MatplotlibDeprecationWarning]{.title-ref} only during interactive sessions, and these can be silenced by the standard mechanism: ``` python warnings.filterwarnings("ignore", category=DeprecationWarning) ``` Library authors must now enable [DeprecationWarning]{.title-ref}s explicitly in order for (non-interactive) CI/CD pipelines to report back these warnings, as is standard for the rest of the Python ecosystem: ``` python warnings.filterwarnings("always", DeprecationWarning) ``` ## `Artist.set` applies artist properties in the order in which they are given The change only affects the interaction between the *color*, *edgecolor*, *facecolor*, and (for [.Collection]{.title-ref}s) *alpha* properties: the *color* property now needs to be passed first in order not to override the other properties. This is consistent with e.g. [.Artist.update]{.title-ref}, which did not reorder the properties passed to it. ## `pcolor(mesh)` shading defaults to auto The *shading* keyword argument for [.Axes.pcolormesh]{.title-ref} and [.Axes.pcolor]{.title-ref} default has been changed to \'auto\'. Passing `Z(M, N)`, `x(N)`, `y(M)` to `pcolormesh` with `shading='flat'` will now raise a [TypeError]{.title-ref}. Use `shading='auto'` or `shading='nearest'` for `x` and `y` to be treated as cell centers, or drop the last column and row of `Z` to get the old behaviour with `shading='flat'`. ## Colorbars now have pan and zoom functionality Interactive plots with colorbars can now be zoomed and panned on the colorbar axis. This adjusts the *vmin* and *vmax* of the [.ScalarMappable]{.title-ref} associated with the colorbar. This is currently only enabled for continuous norms. Norms used with `contourf` and categoricals, such as [.BoundaryNorm]{.title-ref} and [.NoNorm]{.title-ref}, have the interactive capability disabled by default. [cb.ax.set_navigate() \<.Axes.set_navigate\>]{.title-ref} can be used to set whether a colorbar axes is interactive or not. ## Colorbar lines no longer clipped If a colorbar has lines added to it (e.g. for contour lines), these will no longer be clipped. This is an improvement for lines on the edge of the colorbar, but could lead to lines off the colorbar if the limits of the colorbar are changed. ## `Figure.suppressComposite` now also controls compositing of Axes images ## The output of `NonUniformImage` and `PcolorImage` has changed Pixel-level differences may be observed in images generated using [.NonUniformImage]{.title-ref} or [.PcolorImage]{.title-ref}, typically for pixels exactly at the boundary between two data cells (no user-facing axes method currently generates [.NonUniformImage]{.title-ref}s, and only [.pcolorfast]{.title-ref} can generate [.PcolorImage]{.title-ref}s). These artists are also now slower, normally by \~1.5x but sometimes more (in particular for `NonUniformImage(interpolation="bilinear")`. This slowdown arises from fixing occasional floating point inaccuracies. ## Change of the (default) legend handler for `Line2D` instances The default legend handler for Line2D instances ([.HandlerLine2D]{.title-ref}) now consistently exposes all the attributes and methods related to the line marker (`11358`{.interpreted-text role="ghissue"}). This makes it easy to change the marker features after instantiating a legend. ``` python import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([1, 3, 2], marker="s", label="Line", color="pink", mec="red", ms=8) leg = ax.legend() leg.legendHandles[0].set_color("lightgray") leg.legendHandles[0].set_mec("black") # marker edge color ``` The former legend handler for Line2D objects has been renamed [.HandlerLine2DCompound]{.title-ref}. To revert to the previous behaviour, one can use ``` python import matplotlib.legend as mlegend from matplotlib.legend_handler import HandlerLine2DCompound from matplotlib.lines import Line2D mlegend.Legend.update_default_handler_map({Line2D: HandlerLine2DCompound()}) ``` ## Setting `Line2D` marker edge/face color to *None* use rcParams `Line2D.set_markeredgecolor(None)` and `Line2D.set_markerfacecolor(None)` now set the line property using the corresponding rcParam (`lines.markeredgecolor`{.interpreted-text role="rc"} and `lines.markerfacecolor`{.interpreted-text role="rc"}). This is consistent with other [.Line2D]{.title-ref} property setters. ## Default theta tick locations for wedge polar plots have changed For polar plots that don\'t cover a full circle, the default theta tick locations are now at multiples of 10°, 15°, 30°, 45°, 90°, rather than using values that mostly make sense for linear plots (20°, 25°, etc.). ## `axvspan` now plots full wedges in polar plots \... rather than triangles. ## Convenience converter from `Scale` to `Normalize` now public Downstream libraries can take advantage of [.colors.make_norm_from_scale]{.title-ref} to create a [\~.colors.Normalize]{.title-ref} subclass directly from an existing scale. Usually norms have a scale, and the advantage of having a [\~.scale.ScaleBase]{.title-ref} attached to a norm is to provide a scale, and associated tick locators and formatters, for the colorbar. ## `ContourSet` always use `PathCollection` In order to correct rendering issues with closed loops, the [.ContourSet]{.title-ref} now creates a [.PathCollection]{.title-ref} instead of a [.LineCollection]{.title-ref} for line contours. This type matches the artist used for filled contours. This affects [.ContourSet]{.title-ref} itself and its subclasses, [.QuadContourSet]{.title-ref} (returned by [.Axes.contour]{.title-ref}), and [.TriContourSet]{.title-ref} (returned by [.Axes.tricontour]{.title-ref}). ## `hatch.SmallFilledCircles` inherits from `hatch.Circles` The [.hatch.SmallFilledCircles]{.title-ref} class now inherits from [.hatch.Circles]{.title-ref} rather than from [.hatch.SmallCircles]{.title-ref}. ## hexbin with a log norm [\~.axes.Axes.hexbin]{.title-ref} no longer (incorrectly) adds 1 to every bin value if a log norm is being used. ## Setting invalid `rcParams["date.converter"]` now raises ValueError Previously, invalid values passed to `date.converter`{.interpreted-text role="rc"} would be ignored with a [UserWarning]{.title-ref}, but now raise [ValueError]{.title-ref}. ## `Text` and `TextBox` added *parse_math* option [.Text]{.title-ref} and [.TextBox]{.title-ref} objects now allow a *parse_math* keyword-only argument which controls whether math should be parsed from the displayed string. If *True*, the string will be parsed as a math text object. If *False*, the string will be considered a literal and no parsing will occur. For [.Text]{.title-ref}, this argument defaults to *True*. For [.TextBox]{.title-ref} this argument defaults to *False*. ## `Type1Font` objects now decrypt the encrypted part Type 1 fonts have a large part of their code encrypted as an obsolete copy-protection measure. This part is now available decrypted as the `decrypted` attribute of `matplotlib.type1font.Type1Font`. This decrypted data is not yet parsed, but this is a prerequisite for implementing subsetting. ## 3D contourf polygons placed between levels The polygons used in a 3D [\~.Axes3D.contourf]{.title-ref} plot are now placed halfway between the contour levels, as each polygon represents the location of values that lie between two levels. ## `AxesDivider` now defaults to rcParams-specified pads [.AxesDivider.append_axes]{.title-ref}, `AxesDivider.new_horizontal`, and `AxesDivider.new_vertical` now default to paddings specified by `figure.subplot.wspace`{.interpreted-text role="rc"} and `figure.subplot.hspace`{.interpreted-text role="rc"} rather than zero. --- # Deprecations ## Discouraged: `Figure` parameters *tight_layout* and *constrained_layout* The `Figure` parameters *tight_layout* and *constrained_layout* are triggering competing layout mechanisms and thus should not be used together. To make the API clearer, we\'ve merged them under the new parameter *layout* with values \'constrained\' (equal to `constrained_layout=True`), \'tight\' (equal to `tight_layout=True`). If given, *layout* takes precedence. The use of *tight_layout* and *constrained_layout* is discouraged in favor of *layout*. However, these parameters will stay available for backward compatibility. ## Modification of `Axes` children sublists See `Behavioural API Changes 3.5 - Axes children combined`{.interpreted-text role="ref"} for more information; modification of the following sublists is deprecated: - `Axes.artists` - `Axes.collections` - `Axes.images` - `Axes.lines` - `Axes.patches` - `Axes.tables` - `Axes.texts` To remove an Artist, use its [.Artist.remove]{.title-ref} method. To add an Artist, use the corresponding `Axes.add_*` method. ## Passing incorrect types to `Axes.add_*` methods The following `Axes.add_*` methods will now warn if passed an unexpected type. See their documentation for the types they expect. - [.Axes.add_collection]{.title-ref} - [.Axes.add_image]{.title-ref} - [.Axes.add_line]{.title-ref} - [.Axes.add_patch]{.title-ref} - [.Axes.add_table]{.title-ref} ## Discouraged: `plot_date` The use of `plot_date` is discouraged. This method exists for historic reasons and may be deprecated in the future. - `datetime`-like data should directly be plotted using [\~.Axes.plot]{.title-ref}. - If you need to plot plain numeric data as `date-format`{.interpreted-text role="ref"} or need to set a timezone, call `ax.xaxis.axis_date` / `ax.yaxis.axis_date` before [\~.Axes.plot]{.title-ref}. See [.Axis.axis_date]{.title-ref}. ## `epoch2num` and `num2epoch` are deprecated These methods convert from unix timestamps to matplotlib floats, but are not used internally to matplotlib, and should not be needed by end users. To convert a unix timestamp to datetime, simply use [datetime.datetime.utcfromtimestamp]{.title-ref}, or to use NumPy [\~numpy.datetime64]{.title-ref} `dt = np.datetime64(e*1e6, 'us')`. ## Auto-removal of grids by [\~.Axes.pcolor]{.title-ref} and [\~.Axes.pcolormesh]{.title-ref} [\~.Axes.pcolor]{.title-ref} and [\~.Axes.pcolormesh]{.title-ref} currently remove any visible axes major grid. This behavior is deprecated; please explicitly call `ax.grid(False)` to remove the grid. ## The first parameter of `Axes.grid` and `Axis.grid` has been renamed to *visible* The parameter was previously named *b*. This deprecation only matters if that parameter was passed using a keyword argument, e.g. `grid(b=False)`. ## Unification and cleanup of Selector widget API The API for Selector widgets has been unified to use: - *props* for the properties of the Artist representing the selection. - *handle_props* for the Artists representing handles for modifying the selection. - *grab_range* for the maximal tolerance to grab a handle with the mouse. Additionally, several internal parameters and attribute have been deprecated with the intention of keeping them private. ### RectangleSelector and EllipseSelector The *drawtype* keyword argument to [\~matplotlib.widgets.RectangleSelector]{.title-ref} is deprecated. In the future the only behaviour will be the default behaviour of `drawtype='box'`. Support for `drawtype=line` will be removed altogether as it is not clear which points are within and outside a selector that is just a line. As a result, the *lineprops* keyword argument to [\~matplotlib.widgets.RectangleSelector]{.title-ref} is also deprecated. To retain the behaviour of `drawtype='none'`, use `rectprops={'visible': False}` to make the drawn [\~matplotlib.patches.Rectangle]{.title-ref} invisible. Cleaned up attributes and arguments are: - The `active_handle` attribute has been privatized and deprecated. - The `drawtype` attribute has been privatized and deprecated. - The `eventpress` attribute has been privatized and deprecated. - The `eventrelease` attribute has been privatized and deprecated. - The `interactive` attribute has been privatized and deprecated. - The *marker_props* argument is deprecated, use *handle_props* instead. - The *maxdist* argument is deprecated, use *grab_range* instead. - The *rectprops* argument is deprecated, use *props* instead. - The `rectprops` attribute has been privatized and deprecated. - The `state` attribute has been privatized and deprecated. - The `to_draw` attribute has been privatized and deprecated. ### PolygonSelector - The *line* attribute is deprecated. If you want to change the selector artist properties, use the `set_props` or `set_handle_props` methods. - The *lineprops* argument is deprecated, use *props* instead. - The *markerprops* argument is deprecated, use *handle_props* instead. - The *maxdist* argument and attribute is deprecated, use *grab_range* instead. - The *vertex_select_radius* argument and attribute is deprecated, use *grab_range* instead. ### SpanSelector - The `active_handle` attribute has been privatized and deprecated. - The `eventpress` attribute has been privatized and deprecated. - The `eventrelease` attribute has been privatized and deprecated. - The *maxdist* argument and attribute is deprecated, use *grab_range* instead. - The `pressv` attribute has been privatized and deprecated. - The `prev` attribute has been privatized and deprecated. - The `rect` attribute has been privatized and deprecated. - The *rectprops* argument is deprecated, use *props* instead. - The `rectprops` attribute has been privatized and deprecated. - The *span_stays* argument is deprecated, use the *interactive* argument instead. - The `span_stays` attribute has been privatized and deprecated. - The `state` attribute has been privatized and deprecated. ### LassoSelector - The *lineprops* argument is deprecated, use *props* instead. - The `onpress` and `onrelease` methods are deprecated. They are straight aliases for `press` and `release`. ## `ConversionInterface.convert` no longer needs to accept unitless values Previously, custom subclasses of [.units.ConversionInterface]{.title-ref} needed to implement a `convert` method that not only accepted instances of the unit, but also unitless values (which are passed through as is). This is no longer the case (`convert` is never called with a unitless value), and such support in [.StrCategoryConverter]{.title-ref} is deprecated. Likewise, the `.ConversionInterface.is_numlike` helper is deprecated. Consider calling [.Axis.convert_units]{.title-ref} instead, which still supports unitless values. ## Locator and Formatter wrapper methods The `set_view_interval`, `set_data_interval` and `set_bounds` methods of [.Locator]{.title-ref}s and [.Formatter]{.title-ref}s (and their common base class, TickHelper) are deprecated. Directly manipulate the view and data intervals on the underlying axis instead. ## Unused positional parameters to `print_` methods None of the `print_` methods implemented by canvas subclasses used positional arguments other that the first (the output filename or file-like), so these extra parameters are deprecated. ## `QuadMesh` signature The [.QuadMesh]{.title-ref} signature : def __init__(meshWidth, meshHeight, coordinates, antialiased=True, shading='flat', **kwargs) is deprecated and replaced by the new signature : def __init__(coordinates, *, antialiased=True, shading='flat', **kwargs) In particular: - The *coordinates* argument must now be a (M, N, 2) array-like. Previously, the grid shape was separately specified as (*meshHeight* + 1, *meshWidth* + 1\) and *coordinates* could be an array-like of any shape with M \* N \* 2 elements. - All parameters except *coordinates* are keyword-only now. ## rcParams will no longer cast inputs to str After a deprecation period, rcParams that expect a (non-pathlike) str will no longer cast non-str inputs using [str]{.title-ref}. This will avoid confusing errors in subsequent code if e.g. a list input gets implicitly cast to a str. ## Case-insensitive scales Previously, scales could be set case-insensitively (e.g., `set_xscale("LoG")`). This is deprecated; all builtin scales use lowercase names. ## Interactive cursor details Setting a mouse cursor on a window has been moved from the toolbar to the canvas. Consequently, several implementation details on toolbars and within backends have been deprecated. ### `NavigationToolbar2.set_cursor` and `backend_tools.SetCursorBase.set_cursor` Instead, use the [.FigureCanvasBase.set_cursor]{.title-ref} method on the canvas (available as the `canvas` attribute on the toolbar or the Figure.) ### `backend_tools.SetCursorBase` and subclasses `backend_tools.SetCursorBase` was subclassed to provide backend-specific implementations of `set_cursor`. As that is now deprecated, the subclassing is no longer necessary. Consequently, the following subclasses are also deprecated: - `matplotlib.backends.backend_gtk3.SetCursorGTK3` - `matplotlib.backends.backend_qt5.SetCursorQt` - `matplotlib.backends._backend_tk.SetCursorTk` - `matplotlib.backends.backend_wx.SetCursorWx` Instead, use the [.backend_tools.ToolSetCursor]{.title-ref} class. ### `cursord` in GTK, Qt, and wx backends The `backend_gtk3.cursord`, `backend_qt.cursord`, and `backend_wx.cursord` dictionaries are deprecated. This makes the GTK module importable on headless environments. ## Miscellaneous deprecations - `is_url` and `URL_REGEX` are deprecated. (They were previously defined in the toplevel `matplotlib`{.interpreted-text role="mod"} module.) - The `ArrowStyle.beginarrow` and `ArrowStyle.endarrow` attributes are deprecated; use the `arrow` attribute to define the desired heads and tails of the arrow. - `backend_pgf.LatexManager.str_cache` is deprecated. - `backends.qt_compat.ETS` and `backends.qt_compat.QT_RC_MAJOR_VERSION` are deprecated, with no replacement. - The `blocking_input` module has been deprecated. Instead, use `canvas.start_event_loop()` and `canvas.stop_event_loop()` while connecting event callbacks as needed. - `cbook.report_memory` is deprecated; use `psutil.virtual_memory` instead. - `cm.LUTSIZE` is deprecated. Use `image.lut`{.interpreted-text role="rc"} instead. This value only affects colormap quantization levels for default colormaps generated at module import time. - `Collection.__init__` previously ignored *transOffset* without *offsets* also being specified. In the future, *transOffset* will begin having an effect regardless of *offsets*. In the meantime, if you wish to set *transOffset*, call [.Collection.set_offset_transform]{.title-ref} explicitly. - `Colorbar.patch` is deprecated; this attribute is not correctly updated anymore. - `ContourLabeler.get_label_width` is deprecated. - `dviread.PsfontsMap` now raises LookupError instead of KeyError for missing fonts. - `Dvi.baseline` is deprecated (with no replacement). - The *format* parameter of `dviread.find_tex_file` is deprecated (with no replacement). - `FancyArrowPatch.get_path_in_displaycoord` and `ConnectionPatch.get_path_in_displaycoord` are deprecated. The path in display coordinates can still be obtained, as for other patches, using `patch.get_transform().transform_path(patch.get_path())`. - The `font_manager.win32InstalledFonts` and `font_manager.get_fontconfig_fonts` helper functions have been deprecated. - All parameters of `imshow` starting from *aspect* will become keyword-only. - `QuadMesh.convert_mesh_to_paths` and `QuadMesh.convert_mesh_to_triangles` are deprecated. `QuadMesh.get_paths()` can be used as an alternative for the former; there is no replacement for the latter. - `ScalarMappable.callbacksSM` is deprecated. Use `ScalarMappable.callbacks` instead. - `streamplot.get_integrator` is deprecated. - `style.core.STYLE_FILE_PATTERN`, `style.core.load_base_library`, and `style.core.iter_user_libraries` are deprecated. - `SubplotParams.validate` is deprecated. Use [.SubplotParams.update]{.title-ref} to change [.SubplotParams]{.title-ref} while always keeping it in a valid state. - The `grey_arrayd`, `font_family`, `font_families`, and `font_info` attributes of [.TexManager]{.title-ref} are deprecated. - `Text.get_prop_tup` is deprecated with no replacements (because the [.Text]{.title-ref} class cannot know whether a backend needs to update cache e.g. when the text\'s color changes). - `Tick.apply_tickdir` didn\'t actually update the tick markers on the existing Line2D objects used to draw the ticks and is deprecated; use [.Axis.set_tick_params]{.title-ref} instead. - `tight_layout.auto_adjust_subplotpars` is deprecated. - The `grid_info` attribute of `axisartist` classes has been deprecated. - `axisartist.clip_path` is deprecated with no replacement. - `axes_grid1.axes_grid.CbarAxes` and `axes_grid1.axisartist.CbarAxes` are deprecated (they are now dynamically generated based on the owning axes class). - The `axes_grid1.Divider.get_vsize_hsize` and `axes_grid1.Grid.get_vsize_hsize` methods are deprecated. Copy their implementations if needed. - `AxesDivider.append_axes(..., add_to_figure=False)` is deprecated. Use `ax.remove()` to remove the Axes from the figure if needed. - `FixedAxisArtistHelper.change_tick_coord` is deprecated with no replacement. - `floating_axes.GridHelperCurveLinear.get_boundary` is deprecated, with no replacement. - `ParasiteAxesBase.get_images_artists` has been deprecated. - The \"units finalize\" signal (previously emitted by Axis instances) is deprecated. Connect to \"units\" instead. - Passing formatting parameters positionally to `stem()` is deprecated ## `plot_directive` deprecations The `:encoding:` option to `.. plot` directive has had no effect since Matplotlib 1.3.1, and is now deprecated. The following helpers in [matplotlib.sphinxext.plot_directive]{.title-ref} are deprecated: - `unescape_doctest` (use [doctest.script_from_examples]{.title-ref} instead), - `split_code_at_show`, - `run_code`. ## Testing support ### `matplotlib.test()` is deprecated Run tests using `pytest` from the commandline instead. The variable `matplotlib.default_test_modules` is only used for `matplotlib.test()` and is thus deprecated as well. To test an installed copy, be sure to specify both `matplotlib` and `mpl_toolkits` with `--pyargs`: pytest --pyargs matplotlib.tests mpl_toolkits.tests See `testing`{.interpreted-text role="ref"} for more details. ### Unused pytest fixtures and markers The fixture `matplotlib.testing.conftest.mpl_image_comparison_parameters` is not used internally by Matplotlib. If you use this please copy it into your code base. The `@pytest.mark.style` marker is deprecated; use `@mpl.style.context`, which has the same effect. ## Support for `nx1 = None` or `ny1 = None` in `AxesLocator` and `Divider.locate` In [.axes_grid1.axes_divider]{.title-ref}, various internal APIs will stop supporting passing `nx1 = None` or `ny1 = None` to mean `nx + 1` or `ny + 1`, in preparation for a possible future API which allows indexing and slicing of dividers (possibly `divider[a:b] == divider.new_locator(a, b)`, but also `divider[a:] == divider.new_locator(a, )`). The user-facing [.Divider.new_locator]{.title-ref} API is unaffected \-- it correctly normalizes `nx1 = None` and `ny1 = None` as needed. --- # Development changes ## Increase to minimum supported versions of dependencies For Matplotlib 3.5, the `minimum supported versions `{.interpreted-text role="ref"} and some `optional dependencies `{.interpreted-text role="ref"} are being bumped: +---------------+---------------+---------------+ | Dependency | min in mpl3.4 | min in mpl3.5 | +===============+===============+===============+ | NumPy | > 1.16 | > 1.17 | +---------------+---------------+---------------+ | Tk (optional) | > 8.3 | > 8.4 | +---------------+---------------+---------------+ This is consistent with our `min_deps_policy`{.interpreted-text role="ref"} and [NEP29](https://numpy.org/neps/nep-0029-deprecation_policy.html) ## New wheel architectures Wheels have been added for: - Python 3.10 - PyPy 3.7 - macOS on Apple Silicon (both arm64 and universal2) ## New build dependencies Versioning has been switched from bundled versioneer to [setuptools-scm](https://github.com/pypa/setuptools_scm/) using the `release-branch-semver` version scheme. The latter is well-maintained, but may require slight modification to packaging scripts. The [setuptools-scm-git-archive](https://pypi.org/project/setuptools-scm-git-archive/) plugin is also used for consistent version export. ## Data directory is no longer optional Historically, the `mpl-data` directory has been optional (example files were unnecessary, and fonts could be deleted if a suitable dependency on a system font were provided). Though example files are still optional, they have been substantially pared down, and we now consider the directory to be required. Specifically, the `matplotlibrc` file found there is used for runtime verifications and must exist. Packagers may still symlink fonts to system versions if needed. ## New runtime dependencies ### fontTools for type 42 subsetting A new dependency [fontTools](https://fonttools.readthedocs.io/) is integrated into Matplotlib 3.5. It is designed to be used with PS/EPS and PDF documents; and handles Type 42 font subsetting. ### Underscore support in LaTeX The [underscore](https://ctan.org/pkg/underscore) package is now a requirement to improve support for underscores in LaTeX. This is consistent with our `min_deps_policy`{.interpreted-text role="ref"}. ## Matplotlib-specific build options moved from `setup.cfg` to `mplsetup.cfg` In order to avoid conflicting with the use of `setup.cfg`{.interpreted-text role="file"} by `setuptools`, the Matplotlib-specific build options have moved from `setup.cfg` to `mplsetup.cfg`. The `setup.cfg.template`{.interpreted-text role="file"} has been correspondingly been renamed to `mplsetup.cfg.template`{.interpreted-text role="file"}. Note that the path to this configuration file can still be set via the `MPLSETUPCFG` environment variable, which allows one to keep using the same file before and after this change. --- # Removals The following deprecated APIs have been removed: ## Removed behaviour ### Stricter validation of function parameters - Calling [.Figure.add_axes]{.title-ref} with no arguments will raise an error. Adding a free-floating axes needs a position rectangle. If you want a figure-filling single axes, use [.Figure.add_subplot]{.title-ref} instead. - [.Figure.add_subplot]{.title-ref} validates its inputs; in particular, for `add_subplot(rows, cols, index)`, all parameters must be integral. Previously strings and floats were accepted and converted to int. - Passing *None* as the *which* argument to `autofmt_xdate` is no longer supported; use its more explicit synonym, `which="major"`, instead. - Setting the *orientation* of an `eventplot()` or [.EventCollection]{.title-ref} to \"none\" or *None* is no longer supported; set it to \"horizontal\" instead. Moreover, the two orientations (\"horizontal\" and \"vertical\") are now case-sensitive. - Passing parameters *norm* and *vmin*/*vmax* simultaneously to functions using colormapping such as `scatter()` and `imshow()` is no longer supported. Instead of `norm=LogNorm(), vmin=min_val, vmax=max_val` pass `norm=LogNorm(min_val, max_val)`. *vmin* and *vmax* should only be used without setting *norm*. - Passing *None* as either the *radius* or *startangle* arguments of an [.Axes.pie]{.title-ref} is no longer accepted; use the explicit defaults of 1 and 0, respectively, instead. - Passing *None* as the *normalize* argument of [.Axes.pie]{.title-ref} (the former default) is no longer accepted, and the pie will always be normalized by default. If you wish to plot an incomplete pie, explicitly pass `normalize=False`. - Support for passing *None* to `subplot_class_factory` has been removed. Explicitly pass in the base [\~matplotlib.axes.Axes]{.title-ref} class instead. - Passing multiple keys as a single comma-separated string or multiple arguments to [.ToolManager.update_keymap]{.title-ref} is no longer supported; pass keys as a list of strings instead. - Passing the dash offset as *None* is no longer accepted, as this was never universally implemented, e.g. for vector output. Set the offset to 0 instead. - Setting a custom method overriding [.Artist.contains]{.title-ref} using `Artist.set_contains` has been removed, as has `Artist.get_contains`. There is no replacement, but you may still customize pick events using [.Artist.set_picker]{.title-ref}. - [\~.Axes.semilogx]{.title-ref}, [\~.Axes.semilogy]{.title-ref}, [\~.Axes.loglog]{.title-ref}, [.LogScale]{.title-ref}, and [.SymmetricalLogScale]{.title-ref} used to take keyword arguments that depends on the axis orientation (\"basex\" vs \"basey\", \"subsx\" vs \"subsy\", \"nonposx\" vs \"nonposy\"); these parameter names have been removed in favor of \"base\", \"subs\", \"nonpositive\". This removal also affects e.g. `ax.set_yscale("log", basey=...)` which must now be spelled `ax.set_yscale("log", base=...)`. The change from \"nonpos\" to \"nonpositive\" also affects [\~.scale.LogTransform]{.title-ref}, [\~.scale.InvertedLogTransform]{.title-ref}, [\~.scale.SymmetricalLogTransform]{.title-ref}, etc. To use *different* bases for the x-axis and y-axis of a [\~.Axes.loglog]{.title-ref} plot, use e.g. `ax.set_xscale("log", base=10); ax.set_yscale("log", base=2)`. - Passing *None*, or no argument, to `parasite_axes_class_factory`, `parasite_axes_auxtrans_class_factory`, `host_axes_class_factory` is no longer accepted; pass an explicit base class instead. ### Case-sensitivity is now enforced more - Upper or mixed-case property names are no longer normalized to lowercase in [.Artist.set]{.title-ref} and [.Artist.update]{.title-ref}. This allows one to pass names such as *patchA* or *UVC*. - Case-insensitive capstyles and joinstyles are no longer lower-cased; please pass capstyles (\"miter\", \"round\", \"bevel\") and joinstyles (\"butt\", \"round\", \"projecting\") as lowercase. - Saving metadata in PDF with the PGF backend no longer changes keys to lowercase. Only the canonically cased keys listed in the PDF specification (and the [\~.backend_pgf.PdfPages]{.title-ref} documentation) are accepted. ### No implicit initialization of `Tick` attributes The [.Tick]{.title-ref} constructor no longer initializes the attributes `tick1line`, `tick2line`, `gridline`, `label1`, and `label2` via `_get_tick1line`, `_get_tick2line`, `_get_gridline`, `_get_text1`, and `_get_text2`. Please directly set the attribute in the subclass\' `__init__` instead. ### `NavigationToolbar2` subclass changes Overriding the `_init_toolbar` method of [.NavigationToolbar2]{.title-ref} to initialize third-party toolbars is no longer supported. Instead, the toolbar should be initialized in the `__init__` method of the subclass (which should call the base-class\' `__init__` as appropriate). The `press` and `release` methods of [.NavigationToolbar2]{.title-ref} were called when pressing or releasing a mouse button, but *only* when an interactive pan or zoom was occurring (contrary to what the docs stated). They are no longer called; if you write a backend which needs to customize such events, please directly override `press_pan`/`press_zoom`/`release_pan`/`release_zoom` instead. ### Removal of old file mode flag Flags containing \"U\" passed to [.cbook.to_filehandle]{.title-ref} and [.cbook.open_file_cm]{.title-ref} are no longer accepted. This is consistent with their removal from [open]{.title-ref} in Python 3.9. ### Keymaps toggling `Axes.get_navigate` have been removed This includes numeric key events and rcParams. ### The `TTFPATH` and `AFMPATH` environment variables Support for the (undocumented) `TTFPATH` and `AFMPATH` environment variables has been removed. Register additional fonts using `matplotlib.font_manager.fontManager.addfont()`. ## Modules - `matplotlib.backends.qt_editor.formsubplottool`; use `matplotlib.backends.backend_qt.SubplotToolQt` instead. - `matplotlib.compat` - `matplotlib.ttconv` - The Qt4-based backends, `qt4agg` and `qt4cairo`, have been removed. Qt4 has reached its end-of-life in 2015 and there are no releases of either PyQt4 or PySide for recent versions of Python. Please use one of the Qt5 or Qt6 backends. ## Classes, methods and attributes The following module-level classes/variables have been removed: - `backend_bases.StatusbarBase` and all its subclasses, and `StatusBarWx`; messages are displayed in the toolbar - `backend_pgf.GraphicsContextPgf` - `MODIFIER_KEYS`, `SUPER`, `ALT`, `CTRL`, and `SHIFT` of [matplotlib.backends.backend_qt5agg]{.title-ref} and [matplotlib.backends.backend_qt5cairo]{.title-ref} - `backend_wx.DEBUG_MSG` - `dviread.Encoding` - `Fil`, `Fill`, `Filll`, `NegFil`, `NegFill`, `NegFilll`, and `SsGlue` from [.mathtext]{.title-ref}; directly construct glue instances with `Glue("fil")`, etc. - `mathtext.GlueSpec` - `OldScalarFormatter`, `IndexFormatter` and `IndexDateFormatter`; use [.FuncFormatter]{.title-ref} instead - `OldAutoLocator` - `AVConvBase`, `AVConvWriter` and `AVConvFileWriter`. Debian 8 (2015, EOL 06/2020) and Ubuntu 14.04 (EOL 04/2019) were the last versions of Debian and Ubuntu to ship avconv. It remains possible to force the use of avconv by using the FFmpeg-based writers with `animation.ffmpeg_path`{.interpreted-text role="rc"} set to \"avconv\". - `matplotlib.axes._subplots._subplot_classes` - `axes_grid1.axes_rgb.RGBAxesBase`; use `RGBAxes` instead The following class attributes have been removed: - `backend_pgf.LatexManager.latex_stdin_utf8` - `backend_pgf.PdfPages.metadata` - `ContourSet.ax` and `Quiver.ax`; use `ContourSet.axes` or `Quiver.axes` as with other artists - `DateFormatter.illegal_s` - `dates.YearLocator.replaced`; [.YearLocator]{.title-ref} is now a subclass of [.RRuleLocator]{.title-ref}, and the attribute `YearLocator.replaced` has been removed. For tick locations that required modifying this, a custom rrule and [.RRuleLocator]{.title-ref} can be used instead. - `FigureManagerBase.statusbar`; messages are displayed in the toolbar - `FileMovieWriter.clear_temp` - `mathtext.Glue.glue_subtype` - `MovieWriter.args_key`, `MovieWriter.exec_key`, and `HTMLWriter.args_key` - `NavigationToolbar2QT.basedir`; the base directory to the icons is `os.path.join(mpl.get_data_path(), "images")` - `NavigationToolbar2QT.ctx` - `NavigationToolbar2QT.parent`; to access the parent window, use `toolbar.canvas.parent()` or `toolbar.parent()` - `prevZoomRect`, `retinaFix`, `savedRetinaImage`, `wxoverlay`, `zoomAxes`, `zoomStartX`, and `zoomStartY` attributes of `NavigationToolbar2Wx` - `NonUniformImage.is_grayscale`, `PcolorImage.is_grayscale`, for consistency with `AxesImage.is_grayscale`. (Note that previously, these attributes were only available *after rendering the image*). - `RendererCairo.fontweights`, `RendererCairo.fontangles` - `used_characters` of [.RendererPdf]{.title-ref}, [.PdfFile]{.title-ref}, and [.RendererPS]{.title-ref} - `LogScale.LogTransform`, `LogScale.InvertedLogTransform`, `SymmetricalScale.SymmetricalTransform`, and `SymmetricalScale.InvertedSymmetricalTransform`; directly access the transform classes from [matplotlib.scale]{.title-ref} - `cachedir`, `rgba_arrayd`, `serif`, `sans_serif`, `cursive`, and `monospace` attributes of [.TexManager]{.title-ref} - `axleft`, `axright`, `axbottom`, `axtop`, `axwspace`, and `axhspace` attributes of [.widgets.SubplotTool]{.title-ref}; access the `ax` attribute of the corresponding slider - `widgets.TextBox.params_to_disable` - `angle_helper.LocatorBase.den`; it has been renamed to *nbins* - `axes_grid.CbarAxesBase.cbid` and `axes_grid.CbarAxesBase.locator`; use `mappable.colorbar_cid` or `colorbar.locator` instead The following class methods have been removed: - `Axes.update_datalim_bounds`; use `ax.dataLim.set(Bbox.union([ax.dataLim, bounds]))` - `pan` and `zoom` methods of [\~.axis.Axis]{.title-ref} and [\~.ticker.Locator]{.title-ref} have been removed; panning and zooming are now implemented using the `start_pan`, `drag_pan`, and `end_pan` methods of [\~.axes.Axes]{.title-ref} - `.BboxBase.inverse_transformed`; call [.BboxBase.transformed]{.title-ref} on the [\~.Transform.inverted()]{.title-ref} transform - `Collection.set_offset_position` and `Collection.get_offset_position` have been removed; the `offset_position` of the [.Collection]{.title-ref} class is now \"screen\" - `Colorbar.on_mappable_changed` and `Colorbar.update_bruteforce`; use `Colorbar.update_normal()` instead - `docstring.Substitution.from_params` has been removed; directly assign to `params` of `docstring.Substitution` instead - `DraggableBase.artist_picker`; set the artist\'s picker instead - `DraggableBase.on_motion_blit`; use [.DraggableBase.on_motion]{.title-ref} instead - `FigureCanvasGTK3._renderer_init` - `Locator.refresh()` and the associated helper methods `NavigationToolbar2.draw()` and `ToolViewsPositions.refresh_locators()` - `track_characters` and `merge_used_characters` of [.RendererPdf]{.title-ref}, [.PdfFile]{.title-ref}, and [.RendererPS]{.title-ref} - `RendererWx.get_gc` - `SubplotSpec.get_rows_columns`; use the `GridSpec.nrows`, `GridSpec.ncols`, `SubplotSpec.rowspan`, and `SubplotSpec.colspan` properties instead. - `ScalarMappable.update_dict`, `ScalarMappable.add_checker()`, and `ScalarMappable.check_update()`; register a callback in `ScalarMappable.callbacks` to be notified of updates - `TexManager.make_tex_preview` and `TexManager.make_dvi_preview` - `funcleft`, `funcright`, `funcbottom`, `functop`, `funcwspace`, and `funchspace` methods of [.widgets.SubplotTool]{.title-ref} - `axes_grid1.axes_rgb.RGBAxes.add_RGB_to_figure` - `axisartist.axis_artist.AxisArtist.dpi_transform` - `axisartist.grid_finder.MaxNLocator.set_factor` and `axisartist.grid_finder.FixedLocator.set_factor`; the factor is always 1 now ## Functions - `bezier.make_path_regular` has been removed; use `Path.cleaned()` (or `Path.cleaned(curves=True)`, etc.) instead, but note that these methods add a `STOP` code at the end of the path. - `bezier.concatenate_paths` has been removed; use `Path.make_compound_path()` instead. - `cbook.local_over_kwdict` has been removed; use [.cbook.normalize_kwargs]{.title-ref} instead. - `qt_compat.is_pyqt5` has been removed due to the release of PyQt6. The Qt version can be checked using `QtCore.qVersion()`. - `testing.compare.make_external_conversion_command` has been removed. - `axes_grid1.axes_rgb.imshow_rgb` has been removed; use `imshow(np.dstack([r, g, b]))` instead. ## Arguments - The *s* parameter to [.Axes.annotate]{.title-ref} and [.pyplot.annotate]{.title-ref} is no longer supported; use the new name *text*. - The *inframe* parameter to [matplotlib.axes.Axes.draw]{.title-ref} has been removed; use [.Axes.redraw_in_frame]{.title-ref} instead. - The *required*, *forbidden* and *allowed* parameters of [.cbook.normalize_kwargs]{.title-ref} have been removed. - The *ismath* parameter of the `draw_tex` method of all renderer classes has been removed (as a call to `draw_tex` --- not to be confused with `draw_text`! --- means that the entire string should be passed to the `usetex` machinery anyways). Likewise, the text machinery will no longer pass the *ismath* parameter when calling `draw_tex` (this should only matter for backend implementers). - The *quality*, *optimize*, and *progressive* parameters of [.Figure.savefig]{.title-ref} (which only affected JPEG output) have been removed, as well as from the corresponding `print_jpg` methods. JPEG output options can be set by directly passing the relevant parameters in *pil_kwargs*. - The *clear_temp* parameter of [.FileMovieWriter]{.title-ref} has been removed; files placed in a temporary directory (using `frame_prefix=None`, the default) will be cleared; files placed elsewhere will not. - The *copy* parameter of `mathtext.Glue` has been removed. - The *quantize* parameter of [.Path.cleaned()]{.title-ref} has been removed. - The *dummy* parameter of [.RendererPgf]{.title-ref} has been removed. - The *props* parameter of [.Shadow]{.title-ref} has been removed; use keyword arguments instead. - The *recursionlimit* parameter of `matplotlib.test` has been removed. - The *label* parameter of [.Tick]{.title-ref} has no effect and has been removed. - [\~.ticker.MaxNLocator]{.title-ref} no longer accepts a positional parameter and the keyword argument *nbins* simultaneously because they specify the same quantity. - The *add_all* parameter to `axes_grid.Grid`, `axes_grid.ImageGrid`, `axes_rgb.make_rgb_axes`, and `axes_rgb.RGBAxes` have been removed; the APIs always behave as if `add_all=True`. - The *den* parameter of `axisartist.angle_helper.LocatorBase` has been removed; use *nbins* instead. - The *s* keyword argument to [.AnnotationBbox.get_fontsize]{.title-ref} has no effect and has been removed. - The *offset_position* keyword argument of the [.Collection]{.title-ref} class has been removed; the `offset_position` now \"screen\". - Arbitrary keyword arguments to `StreamplotSet` have no effect and have been removed. - The *fontdict* and *minor* parameters of [.Axes.set_xticklabels]{.title-ref} / [.Axes.set_yticklabels]{.title-ref} are now keyword-only. - All parameters of [.Figure.subplots]{.title-ref} except *nrows* and *ncols* are now keyword-only; this avoids typing e.g. `subplots(1, 1, 1)` when meaning `subplot(1, 1, 1)`, but actually getting `subplots(1, 1, sharex=1)`. - All parameters of [.pyplot.tight_layout]{.title-ref} are now keyword-only, to be consistent with [.Figure.tight_layout]{.title-ref}. - `ColorbarBase` only takes a single positional argument now, the `Axes` to create it in, with all other options required to be keyword arguments. The warning for keyword arguments that were overridden by the mappable is now removed. - Omitting the *renderer* parameter to [matplotlib.axes.Axes.draw]{.title-ref} is no longer supported; use `axes.draw_artist(axes)` instead. - Passing `ismath="TeX!"` to [.RendererAgg.get_text_width_height_descent]{.title-ref} is no longer supported; pass `ismath="TeX"` instead, - Changes to the signature of the [matplotlib.axes.Axes.draw]{.title-ref} method make it consistent with all other artists; thus additional parameters to [.Artist.draw]{.title-ref} have also been removed. ## rcParams - The `animation.avconv_path` and `animation.avconv_args` rcParams have been removed. - The `animation.html_args` rcParam has been removed. - The `keymap.all_axes` rcParam has been removed. - The `mathtext.fallback_to_cm` rcParam has been removed. Use `mathtext.fallback`{.interpreted-text role="rc"} instead. - The `savefig.jpeg_quality` rcParam has been removed. - The `text.latex.preview` rcParam has been removed. - The following deprecated rcParams validators, defined in [.rcsetup]{.title-ref}, have been removed: - `validate_alignment` - `validate_axes_titlelocation` - `validate_axis_locator` - `validate_bool_maybe_none` - `validate_fontset` - `validate_grid_axis` - `validate_hinting` - `validate_legend_loc` - `validate_mathtext_default` - `validate_movie_frame_fmt` - `validate_movie_html_fmt` - `validate_movie_writer` - `validate_nseq_float` - `validate_nseq_int` - `validate_orientation` - `validate_pgf_texsystem` - `validate_ps_papersize` - `validate_svg_fonttype` - `validate_toolbar` - `validate_webagg_address` - Some rcParam validation has become stricter: - `axes.axisbelow`{.interpreted-text role="rc"} no longer accepts strings starting with \"line\" (case-insensitive) as \"line\"; use \"line\" (case-sensitive) instead. - `text.latex.preamble`{.interpreted-text role="rc"} and `pdf.preamble` no longer accept non-string values. - All `*.linestyle` rcParams no longer accept `offset = None`; set the offset to 0 instead. --- # API Changes for 3.5.0 ::: {.contents local="" depth="1"} ::: --- # API Changes for 3.5.2 ::: {.contents local="" depth="1"} ::: ## QuadMesh mouseover defaults to False New in 3.5, [.QuadMesh.get_cursor_data]{.title-ref} allows display of data values under the cursor. However, this can be very slow for large meshes, so by `.QuadMesh.set_mouseover` defaults to *False*. --- # API Changes for 3.5.3 ::: {.contents local="" depth="1"} ::: ## Passing *linefmt* positionally is undeprecated Positional use of all formatting parameters in [\~.Axes.stem]{.title-ref} has been deprecated since Matplotlib 3.5. This deprecation is relaxed so that one can still pass *linefmt* positionally, i.e. `stem(x, y, 'r')`. --- # Behaviour changes ## `plt.get_cmap` and `matplotlib.cm.get_cmap` return a copy Formerly, [\~.pyplot.get_cmap]{.title-ref} and `matplotlib.cm.get_cmap` returned a global version of a [.Colormap]{.title-ref}. This was prone to errors as modification of the colormap would propagate from one location to another without warning. Now, a new copy of the colormap is returned. ## Large `imshow` images are now downsampled When showing an image using [\~matplotlib.axes.Axes.imshow]{.title-ref} that has more than $2^{24}$ columns or $2^{23}$ rows, the image will now be downsampled to below this resolution before being resampled for display by the AGG renderer. Previously such a large image would be shown incorrectly. To prevent this downsampling and the warning it raises, manually downsample your data before handing it to [\~matplotlib.axes.Axes.imshow]{.title-ref}. ## Default date limits changed to 1970-01-01 -- 1970-01-02 Previously the default limits for an empty axis set up for dates ([.Axis.axis_date]{.title-ref}) was 2000-01-01 to 2010-01-01. This has been changed to 1970-01-01 to 1970-01-02. With the default epoch, this makes the numeric limit for date axes the same as for other axes (0.0-1.0), and users are less likely to set a locator with far too many ticks. ## *markerfmt* argument to `stem` The behavior of the *markerfmt* parameter of [\~.Axes.stem]{.title-ref} has changed: - If *markerfmt* does not contain a color, the color is taken from *linefmt*. - If *markerfmt* does not contain a marker, the default is \'o\'. Before, *markerfmt* was passed unmodified to `plot(..., fmt)`, which had a number of unintended side-effects; e.g. only giving a color switched to a solid line without markers. For a simple call `stem(x, y)` without parameters, the new rules still reproduce the old behavior. ## `get_ticklabels` now always populates labels Previously [.Axis.get_ticklabels]{.title-ref} (and [.Axes.get_xticklabels]{.title-ref}, [.Axes.get_yticklabels]{.title-ref}) would only return empty strings unless a draw had already been performed. Now the ticks and their labels are updated when the labels are requested. ## Warning when scatter plot color settings discarded When making an animation of a scatter plot, if you don\'t set *c* (the color value parameter) when initializing the artist, the color settings are ignored. [.Axes.scatter]{.title-ref} now raises a warning if color-related settings are changed without setting *c*. ## 3D `contourf` polygons placed between levels The polygons used in a 3D [\~.Axes3D.contourf]{.title-ref} plot are now placed halfway between the contour levels, as each polygon represents the location of values that lie between two levels. ## Axes title now avoids y-axis offset Previously, Axes titles could overlap the y-axis offset text, which is often in the upper left corner of the axes. Now titles are moved above the offset text if overlapping when automatic title positioning is in effect (i.e. if *y* in [.Axes.set_title]{.title-ref} is *None* and `axes.titley`{.interpreted-text role="rc"} is also *None*). ## Dotted operators gain extra space in mathtext In mathtext, `\doteq \doteqdot \dotminus \dotplus \dots` are now surrounded by extra space because they are correctly treated as relational or binary operators. ## *math* parameter of `mathtext.get_unicode_index` defaults to False In math mode, ASCII hyphens (U+002D) are now replaced by Unicode minus signs (U+2212) at the parsing stage. ## `ArtistList` proxies copy contents on iteration When iterating over the contents of the dynamically generated proxy lists for the Artist-type accessors (see `Behavioural API Changes 3.5 - Axes children combined`{.interpreted-text role="ref"}), a copy of the contents is made. This ensure that artists can safely be added or removed from the Axes while iterating over their children. This is a departure from the expected behavior of mutable iterable data types in Python --- iterating over a list while mutating it has surprising consequences and dictionaries will error if they change size during iteration. Because all of the accessors are filtered views of the same underlying list, it is possible for seemingly unrelated changes, such as removing a Line, to affect the iteration over any of the other accessors. In this case, we have opted to make a copy of the relevant children before yielding them to the user. This change is also consistent with our plan to make these accessors immutable in Matplotlib 3.7. ## `AxesImage` string representation The string representation of [.AxesImage]{.title-ref} changes from stating the position in the figure `"AxesImage(80,52.8;496x369.6)"` to giving the number of pixels `"AxesImage(size=(300, 200))"`. ## Improved autoscaling for Bézier curves Bézier curves are now autoscaled to their extents - previously they were autoscaled to their ends and control points, which in some cases led to unnecessarily large limits. ## `QuadMesh` mouseover defaults to False New in 3.5, [.QuadMesh.get_cursor_data]{.title-ref} allows display of data values under the cursor. However, this can be very slow for large meshes, so mouseover now defaults to *False*. ## Changed pgf backend document class The pgf backend now uses the `article` document class as basis for compilation. ## `MathtextBackendAgg.get_results` no longer returns `used_characters` The last item (`used_characters`) in the tuple returned by `MathtextBackendAgg.get_results` has been removed. In order to unpack this tuple in a backward and forward-compatible way, use e.g. `ox, oy, width, height, descent, image, *_ = parse(...)`, which will ignore `used_characters` if it was present. ## `Type1Font` objects include more properties The `matplotlib._type1font.Type1Font.prop` dictionary now includes more keys, such as `CharStrings` and `Subrs`. The value of the `Encoding` key is now a dictionary mapping codes to glyph names. The `matplotlib._type1font.Type1Font.transform` method now correctly removes `UniqueID` properties from the font. ## `rcParams.copy()` returns `RcParams` rather than `dict` Returning an [.RcParams]{.title-ref} instance from [.RcParams.copy]{.title-ref} makes the copy still validate inputs, and additionally avoids emitting deprecation warnings when using a previously copied instance to update the global instance (even if some entries are deprecated). ## `rc_context` no longer resets the value of `'backend'` [matplotlib.rc_context]{.title-ref} incorrectly reset the value of `backend`{.interpreted-text role="rc"} if backend resolution was triggered in the context. This affected only the value. The actual backend was not changed. Now, [matplotlib.rc_context]{.title-ref} does not reset `backend`{.interpreted-text role="rc"} anymore. ## Default `rcParams["animation.convert_args"]` changed It now defaults to `["-layers", "OptimizePlus"]` to try to generate smaller GIFs. Set it back to an empty list to recover the previous behavior. ## Style file encoding now specified to be UTF-8 It has been impossible to import Matplotlib with a non UTF-8 compatible locale encoding because we read the style library at import time. This change is formalizing and documenting the status quo so there is no deprecation period. ## MacOSX backend uses sRGB instead of GenericRGB color space MacOSX backend now display sRGB tagged image instead of GenericRGB which is an older (now deprecated) Apple color space. This is the source color space used by ColorSync to convert to the current display profile. ## Renderer optional for `get_tightbbox` and `get_window_extent` The [.Artist.get_tightbbox]{.title-ref} and [.Artist.get_window_extent]{.title-ref} methods no longer require the *renderer* keyword argument, saving users from having to query it from `fig.canvas.get_renderer`. If the *renderer* keyword argument is not supplied, these methods first check if there is a cached renderer from a previous draw and use that. If there is no cached renderer, then the methods will use `fig.canvas.get_renderer()` as a fallback. ## `FigureFrameWx` constructor, subclasses, and `get_canvas` The `FigureCanvasWx` constructor gained a *canvas_class* keyword-only parameter which specifies the canvas class that should be used. This parameter will become required in the future. The `get_canvas` method, which was previously used to customize canvas creation, is deprecated. The `FigureFrameWxAgg` and `FigureFrameWxCairo` subclasses, which overrode `get_canvas`, are deprecated. ## `FigureFrameWx.sizer` \... has been removed. The frame layout is no longer based on a sizer, as the canvas is now the sole child widget; the toolbar is now a regular toolbar added using `SetToolBar`. ## Incompatible layout engines raise You cannot switch between `tight_layout` and `constrained_layout` if a colorbar has already been added to a figure. Invoking the incompatible layout engine used to warn, but now raises with a [RuntimeError]{.title-ref}. ## `CallbackRegistry` raises on unknown signals When Matplotlib instantiates a [.CallbackRegistry]{.title-ref}, it now limits callbacks to the signals that the registry knows about. In practice, this means that calling [\~.FigureCanvasBase.mpl_connect]{.title-ref} with an invalid signal name now raises a [ValueError]{.title-ref}. ## Changed exception type for incorrect SVG date metadata Providing date metadata with incorrect type to the SVG backend earlier resulted in a [ValueError]{.title-ref}. Now, a [TypeError]{.title-ref} is raised instead. ## Specified exception types in `Grid` In a few cases an [Exception]{.title-ref} was thrown when an incorrect argument value was set in the [mpl_toolkits.axes_grid1.axes_grid.Grid]{.title-ref} (= `mpl_toolkits.axisartist.axes_grid.Grid`) constructor. These are replaced as follows: - Providing an incorrect value for *ngrids* now raises a [ValueError]{.title-ref} - Providing an incorrect type for *rect* now raises a [TypeError]{.title-ref} --- # Deprecations ## Parameters to `plt.figure()` and the `Figure` constructor All parameters to [.pyplot.figure]{.title-ref} and the [.Figure]{.title-ref} constructor, other than *num*, *figsize*, and *dpi*, will become keyword-only after a deprecation period. ## Deprecation aliases in cbook The module `matplotlib.cbook.deprecation` was previously deprecated in Matplotlib 3.4, along with deprecation-related API in `matplotlib.cbook`. Due to technical issues, `matplotlib.cbook.MatplotlibDeprecationWarning` and `matplotlib.cbook.mplDeprecation` did not raise deprecation warnings on use. Changes in Python have now made it possible to warn when these aliases are being used. In order to avoid downstream breakage, these aliases will now warn, and their removal has been pushed from 3.6 to 3.8 to give time to notice said warnings. As replacement, please use [matplotlib.MatplotlibDeprecationWarning]{.title-ref}. ## `Axes` subclasses should override `clear` instead of `cla` For clarity, [.axes.Axes.clear]{.title-ref} is now preferred over [.Axes.cla]{.title-ref}. However, for backwards compatibility, the latter will remain as an alias for the former. For additional compatibility with third-party libraries, Matplotlib will continue to call the `cla` method of any [\~.axes.Axes]{.title-ref} subclasses if they define it. In the future, this will no longer occur, and Matplotlib will only call the `clear` method in [\~.axes.Axes]{.title-ref} subclasses. It is recommended to define only the `clear` method when on Matplotlib 3.6, and only `cla` for older versions. ## Pending deprecation top-level cmap registration and access functions in `mpl.cm` As part of a [multi-step process](https://github.com/matplotlib/matplotlib/issues/20853) we are refactoring the global state for managing the registered colormaps. In Matplotlib 3.5 we added a [.ColormapRegistry]{.title-ref} class and exposed an instance at the top level as `matplotlib.colormaps`. The existing top level functions in [matplotlib.cm]{.title-ref} (`get_cmap`, `register_cmap`, `unregister_cmap`) were changed to be aliases around the same instance. In Matplotlib 3.6 we have marked those top level functions as pending deprecation with the intention of deprecation in Matplotlib 3.7. The following functions have been marked for pending deprecation: - `matplotlib.cm.get_cmap`; use `matplotlib.colormaps[name]` instead if you have a [str]{.title-ref}. **Added 3.6.1** Use [matplotlib.cm.ColormapRegistry.get_cmap]{.title-ref} if you have a string, [None]{.title-ref} or a [matplotlib.colors.Colormap]{.title-ref} object that you want to convert to a [matplotlib.colors.Colormap]{.title-ref} instance. - `matplotlib.cm.register_cmap`; use [matplotlib.colormaps.register \<.ColormapRegistry.register\>]{.title-ref} instead - `matplotlib.cm.unregister_cmap`; use [matplotlib.colormaps.unregister \<.ColormapRegistry.unregister\>]{.title-ref} instead - `matplotlib.pyplot.register_cmap`; use [matplotlib.colormaps.register \<.ColormapRegistry.register\>]{.title-ref} instead The [matplotlib.pyplot.get_cmap]{.title-ref} function will stay available for backward compatibility. ## Pending deprecation of layout methods The methods [\~.Figure.set_tight_layout]{.title-ref}, [\~.Figure.set_constrained_layout]{.title-ref}, are discouraged, and now emit a [PendingDeprecationWarning]{.title-ref} in favor of explicitly referencing the layout engine via `figure.set_layout_engine('tight')` and `figure.set_layout_engine('constrained')`. End users should not see the warning, but library authors should adjust. The methods [\~.Figure.set_constrained_layout_pads]{.title-ref} and [\~.Figure.get_constrained_layout_pads]{.title-ref} are will be deprecated in favor of `figure.get_layout_engine().set()` and `figure.get_layout_engine().get()`, and currently emit a [PendingDeprecationWarning]{.title-ref}. ## seaborn styles renamed Matplotlib currently ships many style files inspired from the seaborn library (\"seaborn\", \"seaborn-bright\", \"seaborn-colorblind\", etc.) but they have gone out of sync with the library itself since the release of seaborn 0.9. To prevent confusion, the style files have been renamed \"seaborn-v0_8\", \"seaborn-v0_8-bright\", \"seaborn-v0_8-colorblind\", etc. Users are encouraged to directly use seaborn to access the up-to-date styles. ## Auto-removal of overlapping Axes by `plt.subplot` and `plt.subplot2grid` Previously, [.pyplot.subplot]{.title-ref} and [.pyplot.subplot2grid]{.title-ref} would automatically remove preexisting Axes that overlap with the newly added Axes. This behavior was deemed confusing, and is now deprecated. Explicitly call `ax.remove()` on Axes that need to be removed. ## Passing *linefmt* positionally to `stem` is undeprecated Positional use of all formatting parameters in [\~.Axes.stem]{.title-ref} has been deprecated since Matplotlib 3.5. This deprecation is relaxed so that one can still pass *linefmt* positionally, i.e. `stem(x, y, 'r')`. ## `stem(..., use_line_collection=False)` \... is deprecated with no replacement. This was a compatibility fallback to a former more inefficient representation of the stem lines. ## Positional / keyword arguments Passing all but the very few first arguments positionally in the constructors of Artists is deprecated. Most arguments will become keyword-only in a future version. Passing too many positional arguments to `tripcolor` is now deprecated (extra arguments were previously silently ignored). Passing *emit* and *auto* parameters of `set_xlim`, `set_ylim`, `set_zlim`, `set_rlim` positionally is deprecated; they will become keyword-only in a future release. The *transOffset* parameter of [.Collection.set_offset_transform]{.title-ref} and the various `create_collection` methods of legend handlers has been renamed to *offset_transform* (consistently with the property name). Calling `MarkerStyle()` with no arguments or `MarkerStyle(None)` is deprecated; use `MarkerStyle("")` to construct an empty marker style. `Axes.get_window_extent` / `Figure.get_window_extent` accept only *renderer*. This aligns the API with the general [.Artist.get_window_extent]{.title-ref} API. All other parameters were ignored anyway. The *cleared* parameter of `get_renderer`, which only existed for AGG-based backends, has been deprecated. Use `renderer.clear()` instead to explicitly clear the renderer buffer. ## Methods to set parameters in `LogLocator` and `LogFormatter*` In [\~.LogFormatter]{.title-ref} and derived subclasses, the methods `base` and `label_minor` for setting the respective parameter are deprecated and replaced by `set_base` and `set_label_minor`, respectively. In [\~.LogLocator]{.title-ref}, the methods `base` and `subs` for setting the respective parameter are deprecated. Instead, use `set_params(base=..., subs=...)`. ## `Axes.get_renderer_cache` The canvas now takes care of the renderer and whether to cache it or not. The alternative is to call `axes.figure.canvas.get_renderer()`. ## Groupers from `get_shared_x_axes` / `get_shared_y_axes` will be immutable Modifications to the Groupers returned by `get_shared_x_axes` and `get_shared_y_axes` are deprecated. In the future, these methods will return immutable views on the grouper structures. Note that previously, calling e.g. `join()` would already fail to set up the correct structures for sharing axes; use [.Axes.sharex]{.title-ref} or [.Axes.sharey]{.title-ref} instead. ## Unused methods in `Axis`, `Tick`, `XAxis`, and `YAxis` `Tick.label` has been pending deprecation since 3.1 and is now deprecated. Use `Tick.label1` instead. The following methods are no longer used and deprecated without a replacement: - `Axis.get_ticklabel_extents` - `Tick.get_pad_pixels` - `XAxis.get_text_heights` - `YAxis.get_text_widths` ## `mlab.stride_windows` \... is deprecated. Use `np.lib.stride_tricks.sliding_window_view` instead (or `np.lib.stride_tricks.as_strided` on NumPy \< 1.20). ## Event handlers The `draw_event`, `resize_event`, `close_event`, `key_press_event`, `key_release_event`, `pick_event`, `scroll_event`, `button_press_event`, `button_release_event`, `motion_notify_event`, `enter_notify_event` and `leave_notify_event` methods of [.FigureCanvasBase]{.title-ref} are deprecated. They had inconsistent signatures across backends, and made it difficult to improve event metadata. In order to trigger an event on a canvas, directly construct an [.Event]{.title-ref} object of the correct class and call `canvas.callbacks.process(event.name, event)`. ## Widgets All parameters to `MultiCursor` starting from *useblit* are becoming keyword-only (passing them positionally is deprecated). The `canvas` and `background` attributes of `MultiCursor` are deprecated with no replacement. The *visible* attribute of Selector widgets has been deprecated; use `set_visible` or `get_visible` instead. The *state_modifier_keys* attribute of Selector widgets has been privatized and the modifier keys must be set when creating the widget. ## `Axes3D.dist` \... has been privatized. Use the *zoom* keyword argument in [.Axes3D.set_box_aspect]{.title-ref} instead. ## 3D Axis The previous constructor of [.axis3d.Axis]{.title-ref}, with signature `(self, adir, v_intervalx, d_intervalx, axes, *args, rotate_label=None, **kwargs)` is deprecated in favor of a new signature closer to the one of 2D Axis; it is now `(self, axes, *, rotate_label=None, **kwargs)` where `kwargs` are forwarded to the 2D Axis constructor. The axis direction is now inferred from the axis class\' `axis_name` attribute (as in the 2D case); the `adir` attribute is deprecated. The `init3d` method of 3D Axis is also deprecated; all the relevant initialization is done as part of the constructor. The `d_interval` and `v_interval` attributes of 3D Axis are deprecated; use `get_data_interval` and `get_view_interval` instead. The `w_xaxis`, `w_yaxis`, and `w_zaxis` attributes of `Axis3D` have been pending deprecation since 3.1. They are now deprecated. Instead use `xaxis`, `yaxis`, and `zaxis`. `mplot3d.axis3d.Axis.set_pane_pos` is deprecated. This is an internal method where the provided values are overwritten during drawing. Hence, it does not serve any purpose to be directly accessible. The two helper functions `mplot3d.axis3d.move_from_center` and `mplot3d.axis3d.tick_update_position` are considered internal and deprecated. If these are required, please vendor the code from the corresponding private methods `_move_from_center` and `_tick_update_position`. ## `Figure.callbacks` is deprecated The Figure `callbacks` property is deprecated. The only signal was \"dpi_changed\", which can be replaced by connecting to the \"resize_event\" on the canvas `figure.canvas.mpl_connect("resize_event", func)` instead. ## `FigureCanvas` without a `required_interactive_framework` attribute Support for such canvas classes is deprecated. Note that canvas classes which inherit from `FigureCanvasBase` always have such an attribute. ## Backend-specific deprecations - `backend_gtk3.FigureManagerGTK3Agg` and `backend_gtk4.FigureManagerGTK4Agg`; directly use `backend_gtk3.FigureManagerGTK3` and `backend_gtk4.FigureManagerGTK4` instead. - The *window* parameter to `backend_gtk3.NavigationToolbar2GTK3` had no effect, and is now deprecated. - `backend_gtk3.NavigationToolbar2GTK3.win` - `backend_gtk3.RendererGTK3Cairo` and `backend_gtk4.RendererGTK4Cairo`; use [.RendererCairo]{.title-ref} instead, which has gained the `set_context` method, which also auto-infers the size of the underlying surface. - `backend_cairo.RendererCairo.set_ctx_from_surface` and `backend_cairo.RendererCairo.set_width_height` in favor of [.RendererCairo.set_context]{.title-ref}. - `backend_gtk3.error_msg_gtk` - `backend_gtk3.icon_filename` and `backend_gtk3.window_icon` - `backend_macosx.NavigationToolbar2Mac.prepare_configure_subplots` has been replaced by `configure_subplots()`. - `backend_pdf.Name.hexify` - `backend_pdf.Operator` and `backend_pdf.Op.op` are deprecated in favor of a single standard [enum.Enum]{.title-ref} interface on [.backend_pdf.Op]{.title-ref}. - `backend_pdf.fill`; vendor the code of the similarly named private functions if you rely on these functions. - `backend_pgf.LatexManager.texcommand` and `backend_pgf.LatexManager.latex_header` - `backend_pgf.NO_ESCAPE` - `backend_pgf.common_texification` - `backend_pgf.get_fontspec` - `backend_pgf.get_preamble` - `backend_pgf.re_mathsep` - `backend_pgf.writeln` - `backend_ps.convert_psfrags` - `backend_ps.quote_ps_string`; vendor the code of the similarly named private functions if you rely on it. - `backend_qt.qApp`; use `QtWidgets.QApplication.instance()` instead. - `backend_svg.escape_attrib`; vendor the code of the similarly named private functions if you rely on it. - `backend_svg.escape_cdata`; vendor the code of the similarly named private functions if you rely on it. - `backend_svg.escape_comment`; vendor the code of the similarly named private functions if you rely on it. - `backend_svg.short_float_fmt`; vendor the code of the similarly named private functions if you rely on it. - `backend_svg.generate_transform` and `backend_svg.generate_css` - `backend_tk.NavigationToolbar2Tk.lastrect` and `backend_tk.RubberbandTk.lastrect` - `backend_tk.NavigationToolbar2Tk.window`; use `toolbar.master` instead. - `backend_tools.ToolBase.destroy`; To run code upon tool removal, connect to the `tool_removed_event` event. - `backend_wx.RendererWx.offset_text_height` - `backend_wx.error_msg_wx` - `FigureCanvasBase.pick`; directly call [.Figure.pick]{.title-ref}, which has taken over the responsibility of checking the canvas widget lock as well. - `FigureCanvasBase.resize`, which has no effect; use `FigureManagerBase.resize` instead. - `FigureManagerMac.close` - `FigureFrameWx.sizer`; use `frame.GetSizer()` instead. - `FigureFrameWx.figmgr` and `FigureFrameWx.get_figure_manager`; use `frame.canvas.manager` instead. - `FigureFrameWx.num`; use `frame.canvas.manager.num` instead. - `FigureFrameWx.toolbar`; use `frame.GetToolBar()` instead. - `FigureFrameWx.toolmanager`; use `frame.canvas.manager.toolmanager` instead. ## Modules The modules `matplotlib.afm`, `matplotlib.docstring`, `matplotlib.fontconfig_pattern`, `matplotlib.tight_bbox`, `matplotlib.tight_layout`, and `matplotlib.type1font` are considered internal and public access is deprecated. ## `checkdep_usetex` deprecated This method was only intended to disable tests in case no latex install was found. As such, it is considered to be private and for internal use only. Please vendor the code if you need this. ## `date_ticker_factory` deprecated The `date_ticker_factory` method in the [matplotlib.dates]{.title-ref} module is deprecated. Instead use [\~.AutoDateLocator]{.title-ref} and [\~.AutoDateFormatter]{.title-ref} for a more flexible and scalable locator and formatter. If you need the exact `date_ticker_factory` behavior, please copy the code. ## `dviread.find_tex_file` will raise `FileNotFoundError` In the future, `dviread.find_tex_file` will raise a [FileNotFoundError]{.title-ref} for missing files. Previously, it would return an empty string in such cases. Raising an exception allows attaching a user-friendly message instead. During the transition period, a warning is raised. ## `transforms.Affine2D.identity()` \... is deprecated in favor of directly calling the [.Affine2D]{.title-ref} constructor with no arguments. ## Deprecations in `testing.decorators` The unused class `CleanupTestCase` and decorator `cleanup` are deprecated and will be removed. Vendor the code, including the private function `_cleanup_cm`. The function `check_freetype_version` is considered internal and deprecated. Vendor the code of the private function `_check_freetype_version`. ## `text.get_rotation()` \... is deprecated with no replacement. Copy the original implementation if needed. ## Miscellaneous internals - `axes_grid1.axes_size.AddList`; use `sum(sizes, start=Fixed(0))` (for example) to sum multiple size objects. - `axes_size.Padded`; use `size + pad` instead - `axes_size.SizeFromFunc`, `axes_size.GetExtentHelper` - `AxisArtistHelper.delta1` and `AxisArtistHelper.delta2` - `axislines.GridHelperBase.new_gridlines` and `axislines.Axes.new_gridlines` - `cbook.maxdict`; use the standard library `functools.lru_cache` instead. - `_DummyAxis.dataLim` and `_DummyAxis.viewLim`; use `get_data_interval()`, `set_data_interval()`, `get_view_interval()`, and `set_view_interval()` instead. - `GridSpecBase.get_grid_positions(..., raw=True)` - `ImageMagickBase.delay` and `ImageMagickBase.output_args` - `MathtextBackend`, `MathtextBackendAgg`, `MathtextBackendPath`, `MathTextWarning` - `TexManager.get_font_config`; it previously returned an internal hashed key for used for caching purposes. - `TextToPath.get_texmanager`; directly construct a [.texmanager.TexManager]{.title-ref} instead. - `ticker.is_close_to_int`; use `math.isclose(x, round(x))` instead. - `ticker.is_decade`; use `y = numpy.log(x)/numpy.log(base); numpy.isclose(y, numpy.round(y))` instead. --- # Development changes ## Increase to minimum supported versions of dependencies For Matplotlib 3.6, the `minimum supported versions `{.interpreted-text role="ref"} are being bumped: +------------+-----------------+---------------+ | Dependency | > min in mpl3.5 | min in mpl3.6 | +============+=================+===============+ | > Python | > 3.7 | > 3.8 | +------------+-----------------+---------------+ | > NumPy | > 1.17 | > 1.19 | +------------+-----------------+---------------+ This is consistent with our `min_deps_policy`{.interpreted-text role="ref"} and [NEP29](https://numpy.org/neps/nep-0029-deprecation_policy.html) ## Build setup options changes The `gui_support.macosx` setup option has been renamed to `packages.macosx`. ## New wheel architectures Wheels have been added for: - Python 3.11 - PyPy 3.8 and 3.9 ## Increase to required versions of documentation dependencies [sphinx](https://pypi.org/project/Sphinx/) \>= 3.0 and [numpydoc](https://pypi.org/project/numpydoc/) \>= 1.0 are now required for building the documentation. --- # Removals The following deprecated APIs have been removed: ## Removed behaviour ### Stricter validation of function parameters - Unknown keyword arguments to [.Figure.savefig]{.title-ref}, [.pyplot.savefig]{.title-ref}, and the `FigureCanvas.print_*` methods now raise a [TypeError]{.title-ref}, instead of being ignored. - Extra parameters to the [\~.axes.Axes]{.title-ref} constructor, i.e., those other than *fig* and *rect*, are now keyword only. - Passing arguments not specifically listed in the signatures of [.Axes3D.plot_surface]{.title-ref} and [.Axes3D.plot_wireframe]{.title-ref} is no longer supported; pass any extra arguments as keyword arguments instead. - Passing positional arguments to [.LineCollection]{.title-ref} has been removed; use specific keyword argument names now. ### `imread` no longer accepts URLs Passing a URL to [\~.pyplot.imread()]{.title-ref} has been removed. Please open the URL for reading and directly use the Pillow API (e.g., `PIL.Image.open(urllib.request.urlopen(url))`, or `PIL.Image.open(io.BytesIO(requests.get(url).content))`) instead. ### MarkerStyle is immutable The methods `MarkerStyle.set_fillstyle` and `MarkerStyle.set_marker` have been removed. Create a new [.MarkerStyle]{.title-ref} with the respective parameters instead. ### Passing bytes to `FT2Font.set_text` \... is no longer supported. Pass [str]{.title-ref} instead. ### Support for passing tool names to `ToolManager.add_tool` \... has been removed. The second parameter to [.ToolManager.add_tool]{.title-ref} must now always be a tool class. ### `backend_tools.ToolFullScreen` now inherits from `ToolBase`, not from `ToolToggleBase` [.ToolFullScreen]{.title-ref} can only switch between the non-fullscreen and fullscreen states, but not unconditionally put the window in a given state; hence the `enable` and `disable` methods were misleadingly named. Thus, the [.ToolToggleBase]{.title-ref}-related API (`enable`, `disable`, etc.) was removed. ### `BoxStyle._Base` and `transmute` method of box styles \... have been removed. Box styles implemented as classes no longer need to inherit from a base class. ### Loaded modules logging The list of currently loaded modules is no longer logged at the DEBUG level at Matplotlib import time, because it can produce extensive output and make other valuable DEBUG statements difficult to find. If you were relying on this output, please arrange for your own logging (the built-in [sys.modules]{.title-ref} can be used to get the currently loaded modules). ## Modules - The `cbook.deprecation` module has been removed from the public API as it is considered internal. - The `mpl_toolkits.axes_grid` module has been removed. All functionality from `mpl_toolkits.axes_grid` can be found in either [mpl_toolkits.axes_grid1]{.title-ref} or [mpl_toolkits.axisartist]{.title-ref}. Axes classes from `mpl_toolkits.axes_grid` based on `Axis` from [mpl_toolkits.axisartist]{.title-ref} can be found in [mpl_toolkits.axisartist]{.title-ref}. ## Classes, methods and attributes The following module-level classes/variables have been removed: - `cm.cmap_d` - `colorbar.colorbar_doc`, `colorbar.colorbar_kw_doc` - `ColorbarPatch` - `mathtext.Fonts` and all its subclasses - `mathtext.FontConstantsBase` and all its subclasses - `mathtext.latex_to_bakoma`, `mathtext.latex_to_cmex`, `mathtext.latex_to_standard` - `mathtext.MathtextBackendPdf`, `mathtext.MathtextBackendPs`, `mathtext.MathtextBackendSvg`, `mathtext.MathtextBackendCairo`; use `.MathtextBackendPath` instead. - `mathtext.Node` and all its subclasses - `mathtext.NUM_SIZE_LEVELS` - `mathtext.Parser` - `mathtext.Ship` - `mathtext.SHRINK_FACTOR` and `mathtext.GROW_FACTOR` - `mathtext.stix_virtual_fonts`, - `mathtext.tex2uni` - `backend_pgf.TmpDirCleaner` - `backend_ps.GraphicsContextPS`; use `GraphicsContextBase` instead. - `backend_wx.IDLE_DELAY` - `axes_grid1.parasite_axes.ParasiteAxesAuxTransBase`; use [.ParasiteAxesBase]{.title-ref} instead. - `axes_grid1.parasite_axes.ParasiteAxesAuxTrans`; use [.ParasiteAxes]{.title-ref} instead. The following class attributes have been removed: - `Line2D.validCap` and `Line2D.validJoin`; validation is centralized in `rcsetup`. - `Patch.validCap` and `Patch.validJoin`; validation is centralized in `rcsetup`. - `renderer.M`, `renderer.eye`, `renderer.vvec`, `renderer.get_axis_position` placed on the Renderer during 3D Axes draw; these attributes are all available via [.Axes3D]{.title-ref}, which can be accessed via `self.axes` on all [.Artist]{.title-ref}s. - `RendererPdf.mathtext_parser`, `RendererPS.mathtext_parser`, `RendererSVG.mathtext_parser`, `RendererCairo.mathtext_parser` - `StandardPsFonts.pswriter` - `Subplot.figbox`; use [.Axes.get_position]{.title-ref} instead. - `Subplot.numRows`; `ax.get_gridspec().nrows` instead. - `Subplot.numCols`; `ax.get_gridspec().ncols` instead. - `SubplotDivider.figbox` - `cids`, `cnt`, `observers`, `change_observers`, and `submit_observers` on all [.Widget]{.title-ref}s The following class methods have been removed: - `Axis.cla()`; use [.Axis.clear]{.title-ref} instead. - `RadialAxis.cla()` and `ThetaAxis.cla()`; use [.RadialAxis.clear]{.title-ref} or [.ThetaAxis.clear]{.title-ref} instead. - `Spine.cla()`; use [.Spine.clear]{.title-ref} instead. - `ContourLabeler.get_label_coords()`; there is no replacement as it was considered an internal helper. - `FancyArrowPatch.get_dpi_cor` and `FancyArrowPatch.set_dpi_cor` - `FigureCanvas.get_window_title()` and `FigureCanvas.set_window_title()`; use [.FigureManagerBase.get_window_title]{.title-ref} or [.FigureManagerBase.set_window_title]{.title-ref} if using pyplot, or use GUI-specific methods if embedding. - `FigureManager.key_press()` and `FigureManager.button_press()`; trigger the events directly on the canvas using `canvas.callbacks.process(event.name, event)` for key and button events. - `RendererAgg.get_content_extents()` and `RendererAgg.tostring_rgba_minimized()` - `NavigationToolbar2Wx.get_canvas()` - `ParasiteAxesBase.update_viewlim()`; use `ParasiteAxesBase.apply_aspect` instead. - `Subplot.get_geometry()`; use `SubplotBase.get_subplotspec` instead. - `Subplot.change_geometry()`; use `SubplotBase.set_subplotspec` instead. - `Subplot.update_params()`; this method did nothing. - `Subplot.is_first_row()`; use `ax.get_subplotspec().is_first_row` instead. - `Subplot.is_first_col()`; use `ax.get_subplotspec().is_first_col` instead. - `Subplot.is_last_row()`; use `ax.get_subplotspec().is_last_row` instead. - `Subplot.is_last_col()`; use `ax.get_subplotspec().is_last_col` instead. - `SubplotDivider.change_geometry()`; use [.SubplotDivider.set_subplotspec]{.title-ref} instead. - `SubplotDivider.get_geometry()`; use [.SubplotDivider.get_subplotspec]{.title-ref} instead. - `SubplotDivider.update_params()` - `get_depth`, `parse`, `to_mask`, `to_rgba`, and `to_png` of [.MathTextParser]{.title-ref}; use [.mathtext.math_to_image]{.title-ref} instead. - `MovieWriter.cleanup()`; the cleanup logic is instead fully implemented in [.MovieWriter.finish]{.title-ref} and `cleanup` is no longer called. ## Functions The following functions have been removed; - `backend_template.new_figure_manager()`, `backend_template.new_figure_manager_given_figure()`, and `backend_template.draw_if_interactive()` have been removed, as part of the introduction of the simplified backend API. - Deprecation-related re-imports `cbook.deprecated()`, and `cbook.warn_deprecated()`. - `colorbar.colorbar_factory()`; use [.Colorbar]{.title-ref} instead. `colorbar.make_axes_kw_doc()` - `mathtext.Error()` - `mathtext.ship()` - `mathtext.tex2uni()` - `axes_grid1.parasite_axes.parasite_axes_auxtrans_class_factory()`; use [.parasite_axes_class_factory]{.title-ref} instead. - `sphinext.plot_directive.align()`; use `docutils.parsers.rst.directives.images.Image.align` instead. ## Arguments The following arguments have been removed: - *dpi* from `print_ps()` in the PS backend and `print_pdf()` in the PDF backend. Instead, the methods will obtain the DPI from the `savefig` machinery. - *dpi_cor* from [\~.FancyArrowPatch]{.title-ref} - *minimum_descent* from `TextArea`; it is now effectively always True - *origin* from `FigureCanvasWx.gui_repaint()` - *project* from `Line3DCollection.draw()` - *renderer* from [.Line3DCollection.do_3d_projection]{.title-ref}, [.Patch3D.do_3d_projection]{.title-ref}, [.PathPatch3D.do_3d_projection]{.title-ref}, [.Path3DCollection.do_3d_projection]{.title-ref}, [.Patch3DCollection.do_3d_projection]{.title-ref}, [.Poly3DCollection.do_3d_projection]{.title-ref} - *resize_callback* from the Tk backend; use `get_tk_widget().bind('', ..., True)` instead. - *return_all* from `gridspec.get_position()` - Keyword arguments to `gca()`; there is no replacement. ## rcParams The setting `ps.useafm`{.interpreted-text role="rc"} no longer has any effect on [matplotlib.mathtext]{.title-ref}. --- # API Changes for 3.6.0 ::: {.contents local="" depth="1"} ::: --- # API Changes for 3.6.1 ## Deprecations ### Colorbars for orphaned mappables are deprecated, but no longer raise Before 3.6.0, Colorbars for mappables that do not have a parent Axes would steal space from the current Axes. 3.6.0 raised an error on this, but without a deprecation cycle. For 3.6.1 this is reverted; the current Axes is used, but a deprecation warning is shown instead. In this undetermined case, users and libraries should explicitly specify what Axes they want space to be stolen from: `fig.colorbar(mappable, ax=plt.gca())`. --- # Behaviour Changes ## All Axes have `get_subplotspec` and `get_gridspec` methods now, which returns None for Axes not positioned via a gridspec Previously, this method was only present for Axes positioned via a gridspec. Following this change, checking `hasattr(ax, "get_gridspec")` should now be replaced by `ax.get_gridspec() is not None`. For compatibility with older Matplotlib releases, one can also check `hasattr(ax, "get_gridspec") and ax.get_gridspec() is not None`. ## `HostAxesBase.get_aux_axes` now defaults to using the same base axes class as the host axes If using an `mpl_toolkits.axisartist`-based host Axes, the parasite Axes will also be based on `mpl_toolkits.axisartist`. This behavior is consistent with `HostAxesBase.twin`, `HostAxesBase.twinx`, and `HostAxesBase.twiny`. ## `plt.get_cmap` and `matplotlib.cm.get_cmap` return a copy Formerly, [\~.pyplot.get_cmap]{.title-ref} and `matplotlib.cm.get_cmap` returned a global version of a [.Colormap]{.title-ref}. This was prone to errors as modification of the colormap would propagate from one location to another without warning. Now, a new copy of the colormap is returned. ## `TrapezoidMapTriFinder` uses different random number generator The random number generator used to determine the order of insertion of triangle edges in `TrapezoidMapTriFinder` has changed. This can result in a different triangle index being returned for a point that lies exactly on an edge between two triangles. This can also affect triangulation interpolation and refinement algorithms that use `TrapezoidMapTriFinder`. ## `FuncAnimation(save_count=None)` Passing `save_count=None` to [.FuncAnimation]{.title-ref} no longer limits the number of frames to 100. Make sure that it either can be inferred from *frames* or provide an integer *save_count*. ## `CenteredNorm` halfrange is not modified when vcenter changes Previously, the **halfrange** would expand in proportion to the amount that **vcenter** was moved away from either **vmin** or **vmax**. Now, the halfrange remains fixed when vcenter is changed, and **vmin** and **vmax** are updated based on the **vcenter** and **halfrange** values. For example, this is what the values were when changing vcenter previously. ``` python norm = CenteredNorm(vcenter=0, halfrange=1) # Move vcenter up by one norm.vcenter = 1 # updates halfrange and vmax (vmin stays the same) # norm.halfrange == 2, vmin == -1, vmax == 3 ``` and now, with that same example ``` python norm = CenteredNorm(vcenter=0, halfrange=1) norm.vcenter = 1 # updates vmin and vmax (halfrange stays the same) # norm.halfrange == 1, vmin == 0, vmax == 2 ``` The **halfrange** can be set manually or `norm.autoscale()` can be used to automatically set the limits after setting **vcenter**. ## `fig.subplot_mosaic` no longer passes the `gridspec_kw` args to nested gridspecs. For nested [.Figure.subplot_mosaic]{.title-ref} layouts, it is almost always inappropriate for *gridspec_kw* arguments to be passed to lower nest levels, and these arguments are incompatible with the lower levels in many cases. This dictionary is no longer passed to the inner layouts. Users who need to modify *gridspec_kw* at multiple levels should use [.Figure.subfigures]{.title-ref} to get nesting, and construct the inner layouts with [.Figure.subplots]{.title-ref} or [.Figure.subplot_mosaic]{.title-ref}. ## `HPacker` alignment with **bottom** or **top** are now correct Previously, the **bottom** and **top** alignments were swapped. This has been corrected so that the alignments correspond appropriately. ## On Windows only fonts known to the registry will be discovered Previously, Matplotlib would recursively walk user and system font directories to discover fonts, however this lead to a number of undesirable behaviors including finding deleted fonts. Now Matplotlib will only find fonts that are known to the Windows registry. This means that any user installed fonts must go through the Windows font installer rather than simply being copied to the correct folder. This only impacts the set of fonts Matplotlib will consider when using [matplotlib.font_manager.findfont]{.title-ref}. To use an arbitrary font, directly pass the path to a font as shown in `/gallery/text_labels_and_annotations/font_file`{.interpreted-text role="doc"}. ## `QuadMesh.set_array` now always raises `ValueError` for inputs with incorrect shapes It could previously also raise [TypeError]{.title-ref} in some cases. ## `contour` and `contourf` auto-select suitable levels when given boolean inputs If the height array given to [.Axes.contour]{.title-ref} or [.Axes.contourf]{.title-ref} is of bool dtype and *levels* is not specified, *levels* now defaults to `[0.5]` for [\~.Axes.contour]{.title-ref} and `[0, 0.5, 1]` for [.Axes.contourf]{.title-ref}. ## `contour` no longer warns if no contour lines are drawn. This can occur if the user explicitly passes a `levels` array with no values between `z.min()` and `z.max()`; or if `z` has the same value everywhere. ## `AxesImage.set_extent` now raises `TypeError` for unknown keyword arguments It previously raised a [ValueError]{.title-ref}. ## Change of `legend(loc="best")` behavior The algorithm of the auto-legend locator has been tweaked to better handle non rectangular patches. Additional details on this change can be found in `9580`{.interpreted-text role="ghissue"} and `9598`{.interpreted-text role="ghissue"}. --- # Deprecations ## `Axes` subclasses should override `clear` instead of `cla` For clarity, [.axes.Axes.clear]{.title-ref} is now preferred over [.Axes.cla]{.title-ref}. However, for backwards compatibility, the latter will remain as an alias for the former. For additional compatibility with third-party libraries, Matplotlib will continue to call the `cla` method of any [\~.axes.Axes]{.title-ref} subclasses if they define it. In the future, this will no longer occur, and Matplotlib will only call the `clear` method in [\~.axes.Axes]{.title-ref} subclasses. It is recommended to define only the `clear` method when on Matplotlib 3.6, and only `cla` for older versions. ## rcParams type Relying on `rcParams` being a `dict` subclass is deprecated. Nothing will change for regular users because `rcParams` will continue to be dict-like (technically fulfill the `MutableMapping` interface). The [.RcParams]{.title-ref} class does validation checking on calls to `.RcParams.__getitem__` and `.RcParams.__setitem__`. However, there are rare cases where we want to circumvent the validation logic and directly access the underlying data values. Previously, this could be accomplished via a call to the parent methods `dict.__getitem__(rcParams, key)` and `dict.__setitem__(rcParams, key, val)`. Matplotlib 3.7 introduces `rcParams._set(key, val)` and `rcParams._get(key)` as a replacement to calling the parent methods. They are intentionally marked private to discourage external use; However, if direct [.RcParams]{.title-ref} data access is needed, please switch from the dict functions to the new `_get()` and `_set()`. Even though marked private, we guarantee API stability for these methods and they are subject to Matplotlib\'s API and deprecation policy. Please notify the Matplotlib developers if you rely on `rcParams` being a dict subclass in any other way, for which there is no migration path yet. ## Deprecation aliases in cbook The module `matplotlib.cbook.deprecation` was previously deprecated in Matplotlib 3.4, along with deprecation-related API in `matplotlib.cbook`. Due to technical issues, `matplotlib.cbook.MatplotlibDeprecationWarning` and `matplotlib.cbook.mplDeprecation` did not raise deprecation warnings on use. Changes in Python have now made it possible to warn when these aliases are being used. In order to avoid downstream breakage, these aliases will now warn, and their removal has been pushed from 3.6 to 3.8 to give time to notice said warnings. As replacement, please use [matplotlib.MatplotlibDeprecationWarning]{.title-ref}. ## `draw_gouraud_triangle` \... is deprecated as in most backends this is a redundant call. Use [\~.RendererBase.draw_gouraud_triangles]{.title-ref} instead. A `draw_gouraud_triangle` call in a custom [\~matplotlib.artist.Artist]{.title-ref} can readily be replaced as: self.draw_gouraud_triangles(gc, points.reshape((1, 3, 2)), colors.reshape((1, 3, 4)), trans) A [\~.RendererBase.draw_gouraud_triangles]{.title-ref} method can be implemented from an existing `draw_gouraud_triangle` method as: transform = transform.frozen() for tri, col in zip(triangles_array, colors_array): self.draw_gouraud_triangle(gc, tri, col, transform) ## `matplotlib.pyplot.get_plot_commands` \... is a pending deprecation. This is considered internal and no end-user should need it. ## `matplotlib.tri` submodules are deprecated The `matplotlib.tri.*` submodules are deprecated. All functionality is available in `matplotlib.tri` directly and should be imported from there. ## Passing undefined *label_mode* to `Grid` \... is deprecated. This includes [mpl_toolkits.axes_grid1.axes_grid.Grid]{.title-ref}, [mpl_toolkits.axes_grid1.axes_grid.AxesGrid]{.title-ref}, and [mpl_toolkits.axes_grid1.axes_grid.ImageGrid]{.title-ref} as well as the corresponding classes imported from `mpl_toolkits.axisartist.axes_grid`. Pass `label_mode='keep'` instead to get the previous behavior of not modifying labels. ## Colorbars for orphaned mappables are deprecated, but no longer raise Before 3.6.0, Colorbars for mappables that do not have a parent axes would steal space from the current Axes. 3.6.0 raised an error on this, but without a deprecation cycle. For 3.6.1 this is reverted, the current axes is used, but a deprecation warning is shown instead. In this undetermined case users and libraries should explicitly specify what axes they want space to be stolen from: `fig.colorbar(mappable, ax=plt.gca())`. ## `Animation` attributes The attributes `repeat` of [.TimedAnimation]{.title-ref} and subclasses and `save_count` of [.FuncAnimation]{.title-ref} are considered private and deprecated. ## `contour.ClabelText` and `ContourLabeler.set_label_props` \... are deprecated. Use `Text(..., transform_rotates_text=True)` as a replacement for `contour.ClabelText(...)` and `text.set(text=text, color=color, fontproperties=labeler.labelFontProps, clip_box=labeler.axes.bbox)` as a replacement for the `ContourLabeler.set_label_props(label, text, color)`. ## `ContourLabeler` attributes The `labelFontProps`, `labelFontSizeList`, and `labelTextsList` attributes of [.ContourLabeler]{.title-ref} have been deprecated. Use the `labelTexts` attribute and the font properties of the corresponding text objects instead. ## `backend_ps.PsBackendHelper` and `backend_ps.ps_backend_helper` \... are deprecated with no replacement. ## `backend_webagg.ServerThread` is deprecated \... with no replacement. ## `parse_fontconfig_pattern` will no longer ignore unknown constant names Previously, in a fontconfig pattern like `DejaVu Sans:foo`, the unknown `foo` constant name would be silently ignored. This now raises a warning, and will become an error in the future. ## `BufferRegion.to_string` and `BufferRegion.to_string_argb` \... are deprecated. Use `np.asarray(buffer_region)` to get an array view on a buffer region without making a copy; to convert that view from RGBA (the default) to ARGB, use `np.take(..., [2, 1, 0, 3], axis=2)`. ## `num2julian`, `julian2num` and `JULIAN_OFFSET` \... of the [.dates]{.title-ref} module are deprecated without replacements. These are undocumented and not exported. If you rely on these, please make a local copy. ## `unit_cube`, `tunit_cube`, and `tunit_edges` \... of [.Axes3D]{.title-ref} are deprecated without replacements. If you rely on them, please copy the code of the corresponding private function (name starting with `_`). ## Most arguments to widgets have been made keyword-only Passing all but the very few first arguments positionally in the constructors of Widgets is deprecated. Most arguments will become keyword-only in a future version. ## `SimpleEvent` The `SimpleEvent` nested class (previously accessible via the public subclasses of `ConnectionStyle._Base`, such as [.ConnectionStyle.Arc]{.title-ref}, has been deprecated. ## `RadioButtons.circles` \... is deprecated. (RadioButtons now draws itself using [\~.Axes.scatter]{.title-ref}.) ## `CheckButtons.rectangles` and `CheckButtons.lines` `CheckButtons.rectangles` and `CheckButtons.lines` are deprecated. (`CheckButtons` now draws itself using [\~.Axes.scatter]{.title-ref}.) ## `OffsetBox.get_extent_offsets` and `OffsetBox.get_extent` \... are deprecated; these methods are also deprecated on all subclasses of [.OffsetBox]{.title-ref}. To get the offsetbox extents, instead of `get_extent`, use [.OffsetBox.get_bbox]{.title-ref}, which directly returns a [.Bbox]{.title-ref} instance. To also get the child offsets, instead of `get_extent_offsets`, separately call [\~.OffsetBox.get_offset]{.title-ref} on each children after triggering a draw. ## `legend.legendHandles` \... was undocumented and has been renamed to `legend_handles`. Using `legendHandles` is deprecated. ## `ticklabels` parameter of [.Axis.set_ticklabels]{.title-ref} renamed to `labels` ## `offsetbox.bbox_artist` \... is deprecated. This is just a wrapper to call [.patches.bbox_artist]{.title-ref} if a flag is set in the file, so use that directly if you need the behavior. ## `Quiver.quiver_doc` and `Barbs.barbs_doc` \... are deprecated. These are the doc-string and should not be accessible as a named class member. ## Deprecate unused parameter *x* to `TextBox.begin_typing` This parameter was unused in the method, but was a required argument. ## Deprecation of top-level cmap registration and access functions in `mpl.cm` As part of a [multi-step process](https://github.com/matplotlib/matplotlib/issues/20853) we are refactoring the global state for managing the registered colormaps. In Matplotlib 3.5 we added a [.ColormapRegistry]{.title-ref} class and exposed an instance at the top level as `matplotlib.colormaps`. The existing top level functions in [matplotlib.cm]{.title-ref} (`get_cmap`, `register_cmap`, `unregister_cmap`) were changed to be aliases around the same instance. In Matplotlib 3.6 we have marked those top level functions as pending deprecation. In Matplotlib 3.7, the following functions have been marked for deprecation: - `matplotlib.cm.get_cmap`; use `matplotlib.colormaps[name]` instead if you have a [str]{.title-ref}. **Added 3.6.1** Use [matplotlib.cm.ColormapRegistry.get_cmap]{.title-ref} if you have a string, [None]{.title-ref} or a [matplotlib.colors.Colormap]{.title-ref} object that you want to convert to a [matplotlib.colors.Colormap]{.title-ref} instance. - `matplotlib.cm.register_cmap`; use [matplotlib.colormaps.register \<.ColormapRegistry.register\>]{.title-ref} instead - `matplotlib.cm.unregister_cmap`; use [matplotlib.colormaps.unregister \<.ColormapRegistry.unregister\>]{.title-ref} instead - `matplotlib.pyplot.register_cmap`; use [matplotlib.colormaps.register \<.ColormapRegistry.register\>]{.title-ref} instead The [matplotlib.pyplot.get_cmap]{.title-ref} function will stay available for backward compatibility. ## `BrokenBarHCollection` is deprecated It was just a thin wrapper inheriting from [.PolyCollection]{.title-ref}; [\~.Axes.broken_barh]{.title-ref} has now been changed to return a [.PolyCollection]{.title-ref} instead. The `BrokenBarHCollection.span_where` helper is likewise deprecated; for the duration of the deprecation it has been moved to the parent [.PolyCollection]{.title-ref} class. Use [\~.Axes.fill_between]{.title-ref} as a replacement; see `/gallery/lines_bars_and_markers/span_regions`{.interpreted-text role="doc"} for an example. ## Passing inconsistent `loc` and `nth_coord` to axisartist helpers Trying to construct for example a \"top y-axis\" or a \"left x-axis\" is now deprecated. ## `passthru_pt` This attribute of `AxisArtistHelper`s is deprecated. ## `axes3d.vvec`, `axes3d.eye`, `axes3d.sx`, and `axes3d.sy` \... are deprecated without replacement. ## `Line2D` When creating a Line2D or using [.Line2D.set_xdata]{.title-ref} and [.Line2D.set_ydata]{.title-ref}, passing x/y data as non sequence is deprecated. --- # Development changes ## Windows wheel runtime bundling Wheels built for Windows now bundle the MSVC runtime DLL `msvcp140.dll`. This enables importing Matplotlib on systems that do not have the runtime installed. ## Increase to minimum supported versions of dependencies For Matplotlib 3.7, the `minimum supported versions `{.interpreted-text role="ref"} are being bumped: +------------+-----------------+---------------+ | Dependency | > min in mpl3.6 | min in mpl3.7 | +============+=================+===============+ | > NumPy | > 1.19 | > 1.20 | +------------+-----------------+---------------+ | pyparsing | > 2.2.1 | > 2.3.1 | +------------+-----------------+---------------+ | > Qt | | > 5.10 | +------------+-----------------+---------------+ - There are no wheels or conda packages that support both Qt 5.9 (or older) and Python 3.8 (or newer). This is consistent with our `min_deps_policy`{.interpreted-text role="ref"} and [NEP29](https://numpy.org/neps/nep-0029-deprecation_policy.html) ## New dependencies - [importlib-resources](https://pypi.org/project/importlib-resources/) (\>= 3.2.0; only required on Python \< 3.10) ## Maximum line length increased to 88 characters The maximum line length for new contributions has been extended from 79 characters to 88 characters. This change provides an extra 9 characters to allow code which is a single idea to fit on fewer lines (often a single line). The chosen length is the same as [black](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length). --- # Removals ## `epoch2num` and `num2epoch` are removed These methods convert from unix timestamps to matplotlib floats, but are not used internally to Matplotlib, and should not be needed by end users. To convert a unix timestamp to datetime, simply use [datetime.datetime.fromtimestamp]{.title-ref}, or to use NumPy [\~numpy.datetime64]{.title-ref} `dt = np.datetime64(e*1e6, 'us')`. ## Locator and Formatter wrapper methods The `set_view_interval`, `set_data_interval` and `set_bounds` methods of [.Locator]{.title-ref}s and [.Formatter]{.title-ref}s (and their common base class, TickHelper) are removed. Directly manipulate the view and data intervals on the underlying axis instead. ## Interactive cursor details Setting a mouse cursor on a window has been moved from the toolbar to the canvas. Consequently, several implementation details on toolbars and within backends have been removed. ### `NavigationToolbar2.set_cursor` and `backend_tools.SetCursorBase.set_cursor` Instead, use the [.FigureCanvasBase.set_cursor]{.title-ref} method on the canvas (available as the `canvas` attribute on the toolbar or the Figure.) ### `backend_tools.SetCursorBase` and subclasses `backend_tools.SetCursorBase` was subclassed to provide backend-specific implementations of `set_cursor`. As that is now removed, the subclassing is no longer necessary. Consequently, the following subclasses are also removed: - `matplotlib.backends.backend_gtk3.SetCursorGTK3` - `matplotlib.backends.backend_qt5.SetCursorQt` - `matplotlib.backends._backend_tk.SetCursorTk` - `matplotlib.backends.backend_wx.SetCursorWx` Instead, use the [.backend_tools.ToolSetCursor]{.title-ref} class. ### `cursord` in GTK and wx backends The `backend_gtk3.cursord` and `backend_wx.cursord` dictionaries are removed. This makes the GTK module importable on headless environments. ## `auto_add_to_figure=True` for `Axes3D` \... is no longer supported. Instead use `fig.add_axes(ax)`. ## The first parameter of `Axes.grid` and `Axis.grid` has been renamed to *visible* The parameter was previously named *b*. This name change only matters if that parameter was passed using a keyword argument, e.g. `grid(b=False)`. ## Removal of deprecations in the Selector widget API ### RectangleSelector and EllipseSelector The *drawtype* keyword argument to [\~matplotlib.widgets.RectangleSelector]{.title-ref} is removed. From now on, the only behaviour will be `drawtype='box'`. Support for `drawtype=line` is removed altogether. As a result, the *lineprops* keyword argument to [\~matplotlib.widgets.RectangleSelector]{.title-ref} is also removed. To retain the behaviour of `drawtype='none'`, use `rectprops={'visible': False}` to make the drawn [\~matplotlib.patches.Rectangle]{.title-ref} invisible. Cleaned up attributes and arguments are: - The `active_handle` attribute has been privatized and removed. - The `drawtype` attribute has been privatized and removed. - The `eventpress` attribute has been privatized and removed. - The `eventrelease` attribute has been privatized and removed. - The `interactive` attribute has been privatized and removed. - The *marker_props* argument is removed, use *handle_props* instead. - The *maxdist* argument is removed, use *grab_range* instead. - The *rectprops* argument is removed, use *props* instead. - The `rectprops` attribute has been privatized and removed. - The `state` attribute has been privatized and removed. - The `to_draw` attribute has been privatized and removed. ### PolygonSelector - The *line* attribute is removed. If you want to change the selector artist properties, use the `set_props` or `set_handle_props` methods. - The *lineprops* argument is removed, use *props* instead. - The *markerprops* argument is removed, use *handle_props* instead. - The *maxdist* argument and attribute is removed, use *grab_range* instead. - The *vertex_select_radius* argument and attribute is removed, use *grab_range* instead. ### SpanSelector - The `active_handle` attribute has been privatized and removed. - The `eventpress` attribute has been privatized and removed. - The `eventrelease` attribute has been privatized and removed. - The `pressv` attribute has been privatized and removed. - The `prev` attribute has been privatized and removed. - The `rect` attribute has been privatized and removed. - The *rectprops* parameter has been renamed to *props*. - The `rectprops` attribute has been privatized and removed. - The *span_stays* parameter has been renamed to *interactive*. - The `span_stays` attribute has been privatized and removed. - The `state` attribute has been privatized and removed. ### LassoSelector - The *lineprops* argument is removed, use *props* instead. - The `onpress` and `onrelease` methods are removed. They are straight aliases for `press` and `release`. - The `matplotlib.widgets.TextBox.DIST_FROM_LEFT` attribute has been removed. It was marked as private in 3.5. ## `backend_template.show` \... has been removed, in order to better demonstrate the new backend definition API. ## Unused positional parameters to `print_` methods None of the `print_` methods implemented by canvas subclasses used positional arguments other that the first (the output filename or file-like), so these extra parameters are removed. ## `QuadMesh` signature The [.QuadMesh]{.title-ref} signature : def __init__(meshWidth, meshHeight, coordinates, antialiased=True, shading='flat', **kwargs) is removed and replaced by the new signature : def __init__(coordinates, *, antialiased=True, shading='flat', **kwargs) In particular: - The *coordinates* argument must now be a (M, N, 2) array-like. Previously, the grid shape was separately specified as (*meshHeight* + 1, *meshWidth* + 1\) and *coordinates* could be an array-like of any shape with M \* N \* 2 elements. - All parameters except *coordinates* are keyword-only now. ## Expiration of `FancyBboxPatch` deprecations The [.FancyBboxPatch]{.title-ref} constructor no longer accepts the *bbox_transmuter* parameter, nor can the *boxstyle* parameter be set to \"custom\" \-- instead, directly set *boxstyle* to the relevant boxstyle instance. The *mutation_scale* and *mutation_aspect* parameters have also become keyword-only. The *mutation_aspect* parameter is now handled internally and no longer passed to the boxstyle callables when mutating the patch path. ## Testing support ### `matplotlib.test()` has been removed Run tests using `pytest` from the commandline instead. The variable `matplotlib.default_test_modules` was only used for `matplotlib.test()` and is thus removed as well. To test an installed copy, be sure to specify both `matplotlib` and `mpl_toolkits` with `--pyargs`: pytest --pyargs matplotlib.tests mpl_toolkits.tests See `testing`{.interpreted-text role="ref"} for more details. ## Auto-removal of grids by [\~.Axes.pcolor]{.title-ref} and [\~.Axes.pcolormesh]{.title-ref} [\~.Axes.pcolor]{.title-ref} and [\~.Axes.pcolormesh]{.title-ref} previously remove any visible axes major grid. This behavior is removed; please explicitly call `ax.grid(False)` to remove the grid. ## Modification of `Axes` children sublists See `Behavioural API Changes 3.5 - Axes children combined`{.interpreted-text role="ref"} for more information; modification of the following sublists is no longer supported: - `Axes.artists` - `Axes.collections` - `Axes.images` - `Axes.lines` - `Axes.patches` - `Axes.tables` - `Axes.texts` To remove an Artist, use its [.Artist.remove]{.title-ref} method. To add an Artist, use the corresponding `Axes.add_*` method. ## Passing incorrect types to `Axes.add_*` methods The following `Axes.add_*` methods will now raise if passed an unexpected type. See their documentation for the types they expect. - [.Axes.add_collection]{.title-ref} - [.Axes.add_image]{.title-ref} - [.Axes.add_line]{.title-ref} - [.Axes.add_patch]{.title-ref} - [.Axes.add_table]{.title-ref} ## `ConversionInterface.convert` no longer accepts unitless values Previously, custom subclasses of [.units.ConversionInterface]{.title-ref} needed to implement a `convert` method that not only accepted instances of the unit, but also unitless values (which are passed through as is). This is no longer the case (`convert` is never called with a unitless value), and such support in `.StrCategoryConverter` is removed. Likewise, the `.ConversionInterface.is_numlike` helper is removed. Consider calling [.Axis.convert_units]{.title-ref} instead, which still supports unitless values. ## Normal list of [.Artist]{.title-ref} objects now returned by [.HandlerLine2D.create_artists]{.title-ref} For Matplotlib 3.5 and 3.6 a proxy list was returned that simulated the return of [.HandlerLine2DCompound.create_artists]{.title-ref}. Now a list containing only the single artist is return. ## rcParams will no longer cast inputs to str rcParams that expect a (non-pathlike) str no longer cast non-str inputs using [str]{.title-ref}. This will avoid confusing errors in subsequent code if e.g. a list input gets implicitly cast to a str. ## Case-insensitive scales Previously, scales could be set case-insensitively (e.g., `set_xscale("LoG")`). Now all builtin scales use lowercase names. ## Support for `nx1 = None` or `ny1 = None` in `AxesLocator` and `Divider.locate` In [.axes_grid1.axes_divider]{.title-ref}, various internal APIs no longer supports passing `nx1 = None` or `ny1 = None` to mean `nx + 1` or `ny + 1`, in preparation for a possible future API which allows indexing and slicing of dividers (possibly `divider[a:b] == divider.new_locator(a, b)`, but also `divider[a:] == divider.new_locator(a, )`). The user-facing [.Divider.new_locator]{.title-ref} API is unaffected \-- it correctly normalizes `nx1 = None` and `ny1 = None` as needed. ## change signature of `.FigureCanvasBase.enter_notify_event` The *xy* parameter is now required and keyword only. This was deprecated in 3.0 and originally slated to be removed in 3.5. ## `Colorbar` tick update parameters The *update_ticks* parameter of [.Colorbar.set_ticks]{.title-ref} and [.Colorbar.set_ticklabels]{.title-ref} was ignored since 3.5 and has been removed. ## plot directive removals The public methods: - `matplotlib.sphinxext.split_code_at_show` - `matplotlib.sphinxext.unescape_doctest` - `matplotlib.sphinxext.run_code` have been removed. The deprecated *encoding* option to the plot directive has been removed. ## Miscellaneous removals - `is_url` and `URL_REGEX` are removed. (They were previously defined in the toplevel `matplotlib`{.interpreted-text role="mod"} module.) - The `ArrowStyle.beginarrow` and `ArrowStyle.endarrow` attributes are removed; use the `arrow` attribute to define the desired heads and tails of the arrow. - `backend_pgf.LatexManager.str_cache` is removed. - `backends.qt_compat.ETS` and `backends.qt_compat.QT_RC_MAJOR_VERSION` are removed, with no replacement. - The `blocking_input` module is removed. Instead, use `canvas.start_event_loop()` and `canvas.stop_event_loop()` while connecting event callbacks as needed. - `cbook.report_memory` is removed; use `psutil.virtual_memory` instead. - `cm.LUTSIZE` is removed. Use `image.lut`{.interpreted-text role="rc"} instead. This value only affects colormap quantization levels for default colormaps generated at module import time. - `Colorbar.patch` is removed; this attribute was not correctly updated anymore. - `ContourLabeler.get_label_width` is removed. - `Dvi.baseline` is removed (with no replacement). - The *format* parameter of `dviread.find_tex_file` is removed (with no replacement). - `FancyArrowPatch.get_path_in_displaycoord` and `ConnectionPatch.get_path_in_displaycoord` are removed. The path in display coordinates can still be obtained, as for other patches, using `patch.get_transform().transform_path(patch.get_path())`. - The `font_manager.win32InstalledFonts` and `font_manager.get_fontconfig_fonts` helper functions are removed. - All parameters of `imshow` starting from *aspect* are keyword-only. - `QuadMesh.convert_mesh_to_paths` and `QuadMesh.convert_mesh_to_triangles` are removed. `QuadMesh.get_paths()` can be used as an alternative for the former; there is no replacement for the latter. - `ScalarMappable.callbacksSM` is removed. Use `ScalarMappable.callbacks` instead. - `streamplot.get_integrator` is removed. - `style.core.STYLE_FILE_PATTERN`, `style.core.load_base_library`, and `style.core.iter_user_libraries` are removed. - `SubplotParams.validate` is removed. Use [.SubplotParams.update]{.title-ref} to change [.SubplotParams]{.title-ref} while always keeping it in a valid state. - The `grey_arrayd`, `font_family`, `font_families`, and `font_info` attributes of [.TexManager]{.title-ref} are removed. - `Text.get_prop_tup` is removed with no replacements (because the [.Text]{.title-ref} class cannot know whether a backend needs to update cache e.g. when the text\'s color changes). - `Tick.apply_tickdir` didn\'t actually update the tick markers on the existing Line2D objects used to draw the ticks and is removed; use [.Axis.set_tick_params]{.title-ref} instead. - `tight_layout.auto_adjust_subplotpars` is removed. - The `grid_info` attribute of `axisartist` classes has been removed. - `axes_grid1.axes_grid.CbarAxes` and `axisartist.axes_grid.CbarAxes` are removed (they are now dynamically generated based on the owning axes class). - The `axes_grid1.Divider.get_vsize_hsize` and `axes_grid1.Grid.get_vsize_hsize` methods are removed. - `AxesDivider.append_axes(..., add_to_figure=False)` is removed. Use `ax.remove()` to remove the Axes from the figure if needed. - `FixedAxisArtistHelper.change_tick_coord` is removed with no replacement. - `floating_axes.GridHelperCurveLinear.get_boundary` is removed with no replacement. - `ParasiteAxesBase.get_images_artists` is removed. - The \"units finalize\" signal (previously emitted by Axis instances) is removed. Connect to \"units\" instead. - Passing formatting parameters positionally to `stem()` is no longer possible. - `axisartist.clip_path` is removed with no replacement. --- # API Changes for 3.7.0 ::: {.contents local="" depth="1"} ::: --- # Behaviour Changes ## Tk backend respects file format selection when saving figures When saving a figure from a Tkinter GUI to a filename without an extension, the file format is now selected based on the value of the dropdown menu, rather than defaulting to PNG. When the filename contains an extension, or the OS automatically appends one, the behavior remains unchanged. ## Placing of maximum and minimum minor ticks Calculation of minor tick locations has been corrected to make the maximum and minimum minor ticks more consistent. In some cases this results in an extra minor tick on an Axis. ## `hexbin` now defaults to `rcParams["patch.linewidth"]` The default value of the *linewidths* argument of [.Axes.hexbin]{.title-ref} has been changed from `1.0` to `patch.linewidth`{.interpreted-text role="rc"}. This improves the consistency with [.QuadMesh]{.title-ref} in [.Axes.pcolormesh]{.title-ref} and [.Axes.hist2d]{.title-ref}. ## TwoSlopeNorm now auto-expands to always have two slopes In the case where either `vmin` or `vmax` are not manually specified to [\~.TwoSlopeNorm]{.title-ref}, and where the data it is scaling is all less than or greater than the center point, the limits are now auto-expanded so there are two symmetrically sized slopes either side of the center point. Previously `vmin` and `vmax` were clipped at the center point, which caused issues when displaying color bars. This does not affect behaviour when `vmin` and `vmax` are manually specified by the user. ## Event objects emitted for `axes_leave_event` `axes_leave_event` now emits a synthetic [.LocationEvent]{.title-ref}, instead of reusing the last event object associated with a `motion_notify_event`. ## Streamplot now draws streamlines as one piece if no width or no color variance Since there is no need to draw streamlines piece by piece if there is no color change or width change, now streamplot will draw each streamline in one piece. The behavior for varying width or varying color is not changed, same logic is used for these kinds of streamplots. ## `canvas` argument now required for `FigureFrameWx` `FigureFrameWx` now requires a keyword-only `canvas` argument when it is constructed. ## `ContourSet` is now a single Collection Prior to this release, [.ContourSet]{.title-ref} (the object returned by [\~.Axes.contour]{.title-ref}) was a custom object holding multiple [.Collection]{.title-ref}s (and not an [.Artist]{.title-ref}) \-- one collection per level, each connected component of that level\'s contour being an entry in the corresponding collection. [.ContourSet]{.title-ref} is now instead a plain [.Collection]{.title-ref} (and thus an [.Artist]{.title-ref}). The collection contains a single path per contour level; this path may be non-continuous in case there are multiple connected components. Setting properties on the ContourSet can now usually be done using standard collection setters (`cset.set_linewidth(3)` to use the same linewidth everywhere or `cset.set_linewidth([1, 2, 3, ...])` to set different linewidths on each level) instead of having to go through the individual sub-components (`cset.collections[0].set_linewidth(...)`). Note that during the transition period, it remains possible to access the (deprecated) `.collections` attribute; this causes the ContourSet to modify itself to use the old-style multi-Collection representation. ## `SubFigure` default facecolor is now transparent Subfigures default facecolor changed to `"none"`. Previously the default was the value of `figure.facecolor`. ## Reject size related keyword arguments to MovieWriter *grab_frame* method Although we pass [.Figure.savefig]{.title-ref} keyword arguments through the [.AbstractMovieWriter.grab_frame]{.title-ref} some of the arguments will result in invalid output if passed. To be successfully stitched into a movie, each frame must be exactly the same size, thus *bbox_inches* and *dpi* are excluded. Additionally, the movie writers are opinionated about the format of each frame, so the *format* argument is also excluded. Passing these arguments will now raise [TypeError]{.title-ref} for all writers (it already did so for some arguments and some writers). The *bbox_inches* argument is already ignored (with a warning) if passed to [.Animation.save]{.title-ref}. Additionally, if `savefig.bbox`{.interpreted-text role="rc"} is set to `'tight'`, [.AbstractMovieWriter.grab_frame]{.title-ref} will now error. Previously this rcParam would be temporarily overridden (with a warning) in [.Animation.save]{.title-ref}, it is now additionally overridden in [.AbstractMovieWriter.saving]{.title-ref}. ## Changes of API after deprecation - [.dviread.find_tex_file]{.title-ref} now raises [FileNotFoundError]{.title-ref} when the requested filename is not found. - [.Figure.colorbar]{.title-ref} now raises if *cax* is not given and it is unable to determine from which Axes to steal space, i.e. if *ax* is also not given and *mappable* has not been added to an Axes. - [.pyplot.subplot]{.title-ref} and [.pyplot.subplot2grid]{.title-ref} no longer auto-remove preexisting overlapping Axes; explicitly call `Axes.remove` as needed. ## Invalid types for Annotation xycoords now raise TypeError Previously, a [RuntimeError]{.title-ref} would be raised in some cases. ## Default antialiasing behavior changes for `Text` and `Annotation` `matplotlib.pyplot.annotate()` and `matplotlib.pyplot.text()` now support parameter *antialiased* when initializing. Examples: ``` python mpl.text.Text(.5, .5, "foo\nbar", antialiased=True) plt.text(0.5, 0.5, '6 inches x 2 inches', antialiased=True) ax.annotate('local max', xy=(2, 1), xytext=(3, 1.5), antialiased=False) ``` See \"What\'s New\" for more details on usage. With this new feature, you may want to make sure that you are creating and saving/showing the figure under the same context: # previously this was a no-op, now it is what works with rccontext(text.antialiased=False): fig, ax = plt.subplots() ax.annotate('local max', xy=(2, 1), xytext=(3, 1.5)) fig.savefig('/tmp/test.png') # previously this had an effect, now this is a no-op fig, ax = plt.subplots() ax.annotate('local max', xy=(2, 1), xytext=(3, 1.5)) with rccontext(text.antialiased=False): fig.savefig('/tmp/test.png') Also note that antialiasing for tick labels will be set with `text.antialiased`{.interpreted-text role="rc"} when they are created (usually when a `Figure` is created) - This means antialiasing for them can no longer be changed by modifying `text.antialiased`{.interpreted-text role="rc"}. ## `ScalarMappable.to_rgba()` now respects the mask of RGB(A) arrays Previously, the mask was ignored. Now the alpha channel is set to 0 if any component (R, G, B, or A) is masked. ## `Text.get_rotation_mode` return value Passing `None` as `rotation_mode` to [.Text]{.title-ref} (the default value) or passing it to [.Text.set_rotation_mode]{.title-ref} will make [.Text.get_rotation_mode]{.title-ref} return `"default"` instead of `None`. The behaviour otherwise is the same. ## PostScript paper size adds option to use figure size The `ps.papersize`{.interpreted-text role="rc"} rcParam can now be set to `'figure'`, which will use a paper size that corresponds exactly with the size of the figure that is being saved. ## `hexbin` *mincnt* parameter made consistently inclusive Previously, *mincnt* was inclusive with no *C* provided but exclusive when *C* is provided. It is now inclusive of *mincnt* in both cases. # `matplotlib.mpl_toolkits` is now an implicit namespace package Following the deprecation of `pkg_resources.declare_namespace` in `setuptools` 67.3.0, `matplotlib.mpl_toolkits` is now implemented as an implicit namespace, following [PEP 420](https://peps.python.org/pep-0420/). As a consequence using `pip` to install a version of Matplotlib \>= 3.8 on top of a version of Matplotlib \< 3.8 (e.g. via `pip install --local` or `python -m venv --system-site-packages ...`) will fail because the old `matplotlib.mpl_toolkits` files will be found whereas the newer files will be found for all other modules. This will result in errors due to the version mismatch. To avoid this issue you need to avoid having multiple versions of Matplotlib in different entries of `sys.path`. Either uninstall Matplotlib at the system level or use a more isolated virtual environment. --- # Deprecations ## Calling `paths.get_path_collection_extents` with empty *offsets* Calling [\~.get_path_collection_extents]{.title-ref} with an empty *offsets* parameter has an ambiguous interpretation and is therefore deprecated. When the deprecation period expires, this will produce an error. ## `axes_grid1.axes_divider` API changes The `AxesLocator` class is deprecated. The `new_locator` method of divider instances now instead returns an opaque callable (which can still be passed to `ax.set_axes_locator`). `Divider.locate` is deprecated; use `Divider.new_locator(...)(ax, renderer)` instead. ## `bbox.anchored()` with no explicit container Not passing a *container* argument to [.BboxBase.anchored]{.title-ref} is now deprecated. ## Functions in `mpl_toolkits.mplot3d.proj3d` The function `transform` is just an alias for `proj_transform`, use the latter instead. The following functions are either unused (so no longer required in Matplotlib) or considered private. If you rely on them, please make a copy of the code, including all functions that starts with a `_` (considered private). - `ortho_transformation` - `persp_transformation` - `proj_points` - `proj_trans_points` - `rot_x` - `rotation_about_vector` - `view_transformation` ## Arguments other than `renderer` to `get_tightbbox` \... are keyword-only arguments. This is for consistency and that different classes have different additional arguments. ## The object returned by `pcolor()` has changed to a `PolyQuadMesh` class The old object was a [.PolyCollection]{.title-ref} with flattened vertices and array data. The new [.PolyQuadMesh]{.title-ref} class subclasses [.PolyCollection]{.title-ref}, but adds in better 2D coordinate and array handling in alignment with [.QuadMesh]{.title-ref}. Previously, if a masked array was input, the list of polygons within the collection would shrink to the size of valid polygons and users were required to keep track of which polygons were drawn and call `set_array()` with the smaller \"compressed\" array size. Passing the \"compressed\" and flattened array values is now deprecated and the full 2D array of values (including the mask) should be passed to [.PolyQuadMesh.set_array]{.title-ref}. ## `LocationEvent.lastevent` \... is deprecated with no replacement. ## `allsegs`, `allkinds`, `tcolors` and `tlinewidths` attributes of [.ContourSet]{.title-ref} These attributes are deprecated; if required, directly retrieve the vertices and codes of the Path objects from `ContourSet.get_paths()` and the colors and the linewidths via `ContourSet.get_facecolor()`, `ContourSet.get_edgecolor()` and `ContourSet.get_linewidths()`. ## `ContourSet.collections` \... is deprecated. [.ContourSet]{.title-ref} is now implemented as a single [.Collection]{.title-ref} of paths, each path corresponding to a contour level, possibly including multiple unconnected components. During the deprecation period, accessing `ContourSet.collections` will revert the current ContourSet instance to the old object layout, with a separate [.PathCollection]{.title-ref} per contour level. ## `INVALID_NON_AFFINE`, `INVALID_AFFINE`, `INVALID` attributes of `TransformNode` These attributes are deprecated. ## `Grouper.clean()` with no replacement. The Grouper class now cleans itself up automatically. ## `GridHelperCurveLinear.get_data_boundary` \... is deprecated. Use `grid_finder.extreme_finder(*[None] * 5)` to get the extremes of the grid. ## *np_load* parameter of `cbook.get_sample_data` This parameter is deprecated; [.get_sample_data]{.title-ref} now auto-loads numpy arrays. Use `get_sample_data(..., asfileobj=False)` instead to get the filename of the data file, which can then be passed to [open]{.title-ref}, if desired. ## `RendererAgg.tostring_rgb` and `FigureCanvasAgg.tostring_rgb` \... are deprecated with no direct replacement. Consider using `buffer_rgba` instead, which should cover most use cases. ## The parameter of `Annotation.contains` and `Legend.contains` is renamed to *mouseevent* \... consistently with [.Artist.contains]{.title-ref}. ## Accessing `event.guiEvent` after event handlers return \... is deprecated: for some GUI toolkits, it is unsafe to do so. In the future, `event.guiEvent` will be set to None once the event handlers return; you may separately stash the object at your own risk. ## Widgets The *visible* attribute getter of Selector widgets has been deprecated; use `get_visible` ## Method parameters renamed to match base classes The only parameter of `transform_affine` and `transform_non_affine` in `Transform` subclasses is renamed to *values*. The *points* parameter of `transforms.IdentityTransform.transform` is renamed to *values*. The *trans* parameter of `table.Cell.set_transform` is renamed to *t* consistently with [.Artist.set_transform]{.title-ref}. The *clippath* parameters of `axis.Axis.set_clip_path` and `axis.Tick.set_clip_path` are renamed to *path* consistently with [.Artist.set_clip_path]{.title-ref}. The *s* parameter of `images.NonUniformImage.set_filternorm` is renamed to *filternorm* consistently with `_ImageBase.set_filternorm`. The *s* parameter of `images.NonUniformImage.set_filterrad` is renamed to *filterrad* consistently with `_ImageBase.set_filterrad`. ## *numdecs* parameter and attribute of `LogLocator` \... are deprecated without replacement, because they have no effect. ## `NavigationToolbar2QT.message` is deprecated \... with no replacement. ## `ft2font.FT2Image.draw_rect` and `ft2font.FT2Font.get_xys` \... are deprecated as they are unused. If you rely on these, please let us know. ## `backend_ps.psDefs` The `psDefs` module-level variable in `backend_ps` is deprecated with no replacement. ## Callable axisartist Axes Calling an axisartist Axes to mean [\~matplotlib.pyplot.axis]{.title-ref} is deprecated; explicitly call the method instead. ## `AnchoredEllipse` is deprecated Instead, directly construct an [.AnchoredOffsetbox]{.title-ref}, an [.AuxTransformBox]{.title-ref}, and an [\~.patches.Ellipse]{.title-ref}, as demonstrated in `/gallery/misc/anchored_artists`{.interpreted-text role="doc"}. ## Automatic papersize selection in PostScript Setting `ps.papersize`{.interpreted-text role="rc"} to `'auto'` or passing `papersize='auto'` to [.Figure.savefig]{.title-ref} is deprecated. Either pass an explicit paper type name, or omit this parameter to use the default from the rcParam. ## `Tick.set_label1` and `Tick.set_label2` \... are deprecated. Calling these methods from third-party code usually has no effect, as the labels are overwritten at draw time by the tick formatter. ## Passing extra positional arguments to `Figure.add_axes` Positional arguments passed to [.Figure.add_axes]{.title-ref} other than a rect or an existing `Axes` are currently ignored, and doing so is now deprecated. ## `CbarAxesBase.toggle_label` \... is deprecated. Instead, use standard methods for manipulating colorbar labels ([.Colorbar.set_label]{.title-ref}) and tick labels ([.Axes.tick_params]{.title-ref}). ## `TexManager.texcache` \... is considered private and deprecated. The location of the cache directory is clarified in the doc-string. ## Artists explicitly passed in will no longer be filtered by legend() based on their label Currently, artists explicitly passed to `legend(handles=[...])` are filtered out if their label starts with an underscore. This behavior is deprecated; explicitly filter out such artists (`[art for art in artists if not art.get_label().startswith('_')]`) if necessary. ## `FigureCanvasBase.switch_backends` \... is deprecated with no replacement. ## `cbook.Stack` is deprecated \... with no replacement. ## `inset_location.InsetPosition` is deprecated Use [\~.Axes.inset_axes]{.title-ref} instead. ## `axisartist.axes_grid` and `axisartist.axes_rgb` These modules, which provide wrappers combining the functionality of [.axes_grid1]{.title-ref} and [.axisartist]{.title-ref}, are deprecated; directly use e.g. `AxesGrid(..., axes_class=axislines.Axes)` instead. ## `ContourSet.antialiased` \... is deprecated; use [\~.Collection.get_antialiased]{.title-ref} or [\~.Collection.set_antialiased]{.title-ref} instead. Note that [\~.Collection.get_antialiased]{.title-ref} returns an array. ## Passing non-int or sequence of non-int to `Table.auto_set_column_width` Column numbers are ints, and formerly passing any other type was effectively ignored. This will become an error in the future. ## `PdfPages(keep_empty=True)` A zero-page pdf is not valid, thus passing `keep_empty=True` to [.backend_pdf.PdfPages]{.title-ref} and [.backend_pgf.PdfPages]{.title-ref}, and the `keep_empty` attribute of these classes, are deprecated. Currently, these classes default to keeping empty outputs, but that behavior is deprecated too. Explicitly passing `keep_empty=False` remains supported for now to help transition to the new behavior. Furthermore, [.backend_pdf.PdfPages]{.title-ref} no longer immediately creates the target file upon instantiation, but only when the first figure is saved. To fully control file creation, directly pass an opened file object as argument (`with open(path, "wb") as file, PdfPages(file) as pdf: ...`). ## Auto-closing of figures when switching backend \... is deprecated. Explicitly call `plt.close("all")` if necessary. In the future, allowable backend switches (i.e. those that do not swap a GUI event loop with another one) will not close existing figures. ## Support for passing the \"frac\" key in `annotate(..., arrowprops={"frac": ...})` \... has been removed. This key has had no effect since Matplotlib 1.5. --- # Development changes ## Increase to minimum supported versions of dependencies For Matplotlib 3.8, the `minimum supported versions `{.interpreted-text role="ref"} are being bumped: +------------+-----------------+---------------+ | Dependency | > min in mpl3.7 | min in mpl3.8 | +============+=================+===============+ | > Python | > 3.8 | > 3.9 | +------------+-----------------+---------------+ | kiwisolver | > 1.0.1 | > 1.3.1 | +------------+-----------------+---------------+ | > NumPy | > 1.20.0 | > 1.21.0 | +------------+-----------------+---------------+ | > Pillow | > 6.2.1 | > 8.0 | +------------+-----------------+---------------+ This is consistent with our `min_deps_policy`{.interpreted-text role="ref"} and [NEP29](https://numpy.org/neps/nep-0029-deprecation_policy.html) ## Increase to minimum supported optional dependencies For Matplotlib 3.8, the `minimum supported versions of optional dependencies `{.interpreted-text role="ref"} are being bumped: +------------+-----------------+---------------+ | Dependency | > min in mpl3.7 | min in mpl3.8 | +============+=================+===============+ | > Tk | > 8.4 | > 8.5 | +------------+-----------------+---------------+ | > Qt | > 5.10 | > 5.12 | +------------+-----------------+---------------+ - There are no wheels or conda packages that support both Qt 5.11 (or older) and Python 3.9 (or newer). This is consistent with our `min_deps_policy`{.interpreted-text role="ref"} ## Provisional support for PEP484 Type Hint Annotations New public API should be type hinted in `.pyi` stub files (except `pyplot` and tests which are typed in-line). Tests should be type hinted minimally, essentially only when `mypy` generates errors. CI and configuration for running `mypy` have been added. ## Generation of `pyplot.py` requires `black` The autogenerated portions of `pyplot.py` use `black` autoformatting to ensure syntax-correct, readable output code. As such `black` is now a development and test requirement (for the test which regenerates `pyplot`). ## Wheels for some systems are no longer distributed Pre-compiled wheels for 32-bit Linux and Windows are no longer provided on PyPI since Matplotlib 3.8. Multi-architecture `universal2` wheels for macOS are no longer provided on PyPI since Matplotlib 3.8. In general, `pip` will always prefer the architecture-specific (`amd64`- or `arm64`-only) wheels, so these provided little benefit. ## New wheel architectures Wheels have been added for: - musl based systems --- # Removals ## cbook removals - `matplotlib.cbook.MatplotlibDeprecationWarning` and `matplotlib.cbook.mplDeprecation` are removed; use [matplotlib.MatplotlibDeprecationWarning]{.title-ref} instead. - `cbook.maxdict`; use the standard library `functools.lru_cache` instead. ## Groupers from `get_shared_x_axes` / `get_shared_y_axes` are immutable Modifications to the Groupers returned by `get_shared_x_axes` and `get_shared_y_axes` are no longer allowed. Note that previously, calling e.g. `join()` would already fail to set up the correct structures for sharing axes; use [.Axes.sharex]{.title-ref} or [.Axes.sharey]{.title-ref} instead. ## Deprecated modules removed The following deprecated modules are removed: - `afm` - `docstring` - `fontconfig_pattern` - `tight_bbox` - `tight_layout` - `type1font` ## Parameters to `plt.figure()` and the `Figure` constructor All parameters to [.pyplot.figure]{.title-ref} and the [.Figure]{.title-ref} constructor, other than *num*, *figsize*, and *dpi*, are now keyword-only. ## `stem(..., use_line_collection=False)` \... is no longer supported. This was a compatibility fallback to a former more inefficient representation of the stem lines. ## Positional / keyword arguments Passing all but the very few first arguments positionally in the constructors of Artists is no longer possible. Most arguments are now keyword-only. The *emit* and *auto* parameters of `set_xlim`, `set_ylim`, `set_zlim`, `set_rlim` are now keyword-only. The *transOffset* parameter of [.Collection.set_offset_transform]{.title-ref} and the various `create_collection` methods of legend handlers has been renamed to *offset_transform* (consistently with the property name). `Axes.get_window_extent` / `Figure.get_window_extent` accept only *renderer*. This aligns the API with the general [.Artist.get_window_extent]{.title-ref} API. All other parameters were ignored anyway. ## Methods to set parameters in `LogLocator` and `LogFormatter*` In [\~.LogFormatter]{.title-ref} and derived subclasses, the methods `base` and `label_minor` for setting the respective parameter are removed and replaced by `set_base` and `set_label_minor`, respectively. In [\~.LogLocator]{.title-ref}, the methods `base` and `subs` for setting the respective parameter are removed. Instead, use `set_params(base=..., subs=...)`. ## `Axes.get_renderer_cache` The canvas now takes care of the renderer and whether to cache it or not, so the `Axes.get_renderer_cache` method is removed. The alternative is to call `axes.figure.canvas.get_renderer()`. ## Unused methods in `Axis`, `Tick`, `XAxis`, and `YAxis` `Tick.label` is now removed. Use `Tick.label1` instead. The following methods are no longer used and removed without a replacement: - `Axis.get_ticklabel_extents` - `Tick.get_pad_pixels` - `XAxis.get_text_heights` - `YAxis.get_text_widths` ## `mlab.stride_windows` \... is removed. Use `numpy.lib.stride_tricks.sliding_window_view` instead. ## `Axes3D` The `dist` attribute has been privatized. Use the *zoom* keyword argument in [.Axes3D.set_box_aspect]{.title-ref} instead. The `w_xaxis`, `w_yaxis`, and `w_zaxis` attributes are now removed. Instead use `xaxis`, `yaxis`, and `zaxis`. ## 3D Axis `mplot3d.axis3d.Axis.set_pane_pos` is removed. This is an internal method where the provided values are overwritten during drawing. Hence, it does not serve any purpose to be directly accessible. The two helper functions `mplot3d.axis3d.move_from_center` and `mplot3d.axis3d.tick_update_position` are considered internal and deprecated. If these are required, please vendor the code from the corresponding private methods `_move_from_center` and `_tick_update_position`. ## `checkdep_usetex` removed This method was only intended to disable tests in case no latex install was found. As such, it is considered to be private and for internal use only. Please vendor the code from a previous version if you need this. ## `date_ticker_factory` removed The `date_ticker_factory` method in the [matplotlib.dates]{.title-ref} module is removed. Instead use [\~.AutoDateLocator]{.title-ref} and [\~.AutoDateFormatter]{.title-ref} for a more flexible and scalable locator and formatter. If you need the exact `date_ticker_factory` behavior, please copy the code from a previous version. ## `transforms.Affine2D.identity()` \... is removed in favor of directly calling the [.Affine2D]{.title-ref} constructor with no arguments. ## Removals in `testing.decorators` The unused class `CleanupTestCase` and decorator `cleanup` are removed. The function `check_freetype_version` is considered internal and removed. Vendor the code from a previous version. ## `text.get_rotation()` \... is removed with no replacement. Copy the previous implementation if needed. `Figure.callbacks` is removed \~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~ The Figure `callbacks` property has been removed. The only signal was \"dpi_changed\", which can be replaced by connecting to the \"resize_event\" on the canvas `figure.canvas.mpl_connect("resize_event", func)` instead. ## Passing too many positional arguments to `tripcolor` \... raises `TypeError` (extra arguments were previously ignored). ## The *filled* argument to `Colorbar` is removed This behavior was already governed by the underlying `ScalarMappable`. ## Widgets The *visible* attribute setter of Selector widgets has been removed; use `set_visible` The associated getter is also deprecated, but not yet expired. ## `Axes3D.set_frame_on` and `Axes3D.get_frame_on` removed `Axes3D.set_frame_on` is documented as \"Set whether the 3D axes panels are drawn.\". However, it has no effect on 3D axes and is being removed in favor of `Axes3D.set_axis_on` and `Axes3D.set_axis_off`. ## Miscellaneous internals - `axes_grid1.axes_size.AddList`; use `sum(sizes, start=Fixed(0))` (for example) to sum multiple size objects. - `axes_size.Padded`; use `size + pad` instead - `axes_size.SizeFromFunc`, `axes_size.GetExtentHelper` - `AxisArtistHelper.delta1` and `AxisArtistHelper.delta2` - `axislines.GridHelperBase.new_gridlines` and `axislines.Axes.new_gridlines` - `_DummyAxis.dataLim` and `_DummyAxis.viewLim`; use `get_data_interval()`, `set_data_interval()`, `get_view_interval()`, and `set_view_interval()` instead. - `ImageMagickBase.delay` and `ImageMagickBase.output_args` - `MathtextBackend`, `MathtextBackendAgg`, `MathtextBackendPath`, `MathTextWarning` - `TexManager.get_font_config`; it previously returned an internal hashed key for used for caching purposes. - `TextToPath.get_texmanager`; directly construct a [.texmanager.TexManager]{.title-ref} instead. - `ticker.is_close_to_int`; use `math.isclose(x, round(x))` instead. - `ticker.is_decade`; use `y = numpy.log(x)/numpy.log(base); numpy.isclose(y, numpy.round(y))` instead. ## Backend-specific removals - `backend_pdf.Name.hexify` - `backend_pdf.Operator` and `backend_pdf.Op.op` are removed in favor of a single standard [enum.Enum]{.title-ref} interface on [.backend_pdf.Op]{.title-ref}. - `backend_pdf.fill`; vendor the code of the similarly named private functions if you rely on these functions. - `backend_pgf.LatexManager.texcommand` and `backend_pgf.LatexManager.latex_header` - `backend_pgf.NO_ESCAPE` - `backend_pgf.common_texification` - `backend_pgf.get_fontspec` - `backend_pgf.get_preamble` - `backend_pgf.re_mathsep` - `backend_pgf.writeln` - `backend_ps.convert_psfrags` - `backend_ps.quote_ps_string`; vendor the code of the similarly named private functions if you rely on it. - `backend_svg.escape_attrib`; vendor the code of the similarly named private functions if you rely on it. - `backend_svg.escape_cdata`; vendor the code of the similarly named private functions if you rely on it. - `backend_svg.escape_comment`; vendor the code of the similarly named private functions if you rely on it. - `backend_svg.short_float_fmt`; vendor the code of the similarly named private functions if you rely on it. - `backend_svg.generate_transform` and `backend_svg.generate_css` ## Removal of deprecated APIs The following deprecated APIs have been removed. Unless a replacement is stated, please vendor the previous implementation if needed. - The following methods of \`.FigureCanvasBase\`: `pick` (use `Figure.pick` instead), `resize`, `draw_event`, `resize_event`, `close_event`, `key_press_event`, `key_release_event`, `pick_event`, `scroll_event`, `button_press_event`, `button_release_event`, `motion_notify_event`, `leave_notify_event`, `enter_notify_event` (for all the `foo_event` methods, construct the relevant [.Event]{.title-ref} object and call `canvas.callbacks.process(event.name, event)` instead). - `ToolBase.destroy` (connect to `tool_removed_event` instead). - The *cleared* parameter to [.FigureCanvasAgg.get_renderer]{.title-ref} (call `renderer.clear()` instead). - The following methods of \`.RendererCairo\`: `set_ctx_from_surface` and `set_width_height` (use `set_context` instead, which automatically infers the canvas size). - The `window` or `win` parameters and/or attributes of `NavigationToolbar2Tk`, `NavigationToolbar2GTK3`, and `NavigationToolbar2GTK4`, and the `lastrect` attribute of `NavigationToolbar2Tk` - The `error_msg_gtk` function and the `icon_filename` and `window_icon` globals in `backend_gtk3`; the `error_msg_wx` function in `backend_wx`. - `FigureManagerGTK3Agg` and `FigureManagerGTK4Agg` (use `FigureManagerGTK3` instead); `RendererGTK3Cairo` and `RendererGTK4Cairo`. - `NavigationToolbar2Mac.prepare_configure_subplots` (use [\~.NavigationToolbar2.configure_subplots]{.title-ref} instead). - `FigureManagerMac.close`. - The `qApp` global in [.backend_qt]{.title-ref} (use `QtWidgets.QApplication.instance()` instead). - The `offset_text_height` method of `RendererWx`; the `sizer`, `figmgr`, `num`, `toolbar`, `toolmanager`, `get_canvas`, and `get_figure_manager` attributes or methods of `FigureFrameWx` (use `frame.GetSizer()`, `frame.canvas.manager`, `frame.canvas.manager.num`, `frame.GetToolBar()`, `frame.canvas.manager.toolmanager`, the *canvas_class* constructor parameter, and `frame.canvas.manager`, respectively, instead). - `FigureFrameWxAgg` and `FigureFrameWxCairo` (use `FigureFrameWx(..., canvas_class=FigureCanvasWxAgg)` and `FigureFrameWx(..., canvas_class=FigureCanvasWxCairo)`, respectively, instead). - The `filled` attribute and the `draw_all` method of [.Colorbar]{.title-ref} (instead of `draw_all`, use `figure.draw_without_rendering`). - Calling [.MarkerStyle]{.title-ref} without setting the *marker* parameter or setting it to None (use `MarkerStyle("")` instead). - Support for third-party canvas classes without a `required_interactive_framework` attribute (this can only occur if the canvas class does not inherit from [.FigureCanvasBase]{.title-ref}). - The `canvas` and `background` attributes of [.MultiCursor]{.title-ref}; the `state_modifier_keys` attribute of selector widgets. - Passing *useblit*, *horizOn*, or *vertOn* positionally to [.MultiCursor]{.title-ref}. - Support for the `seaborn-` styles; use `seaborn-v0_8-` instead, or directly use the seaborn API. --- # API Changes for 3.8.0 ::: {.contents local="" depth="1"} ::: --- # API Changes for 3.8.1 ## Behaviour ### Default behaviour of `hexbin` with *C* provided requires at least 1 point The behaviour changed in 3.8.0 to be inclusive of *mincnt*. However, that resulted in errors or warnings with some reduction functions, so now the default is to require at least 1 point to call the reduction function. This effectively restores the default behaviour to match that of Matplotlib 3.7 and before. ## Deprecations ### Deprecations removed in `contour` `contour.allsegs`, `contour.allkinds`, and `contour.find_nearest_contour` are no longer marked for deprecation. ## Development ### Minimum version of setuptools bumped to 64 To comply with requirements of `setuptools_scm`, the minimum version of `setuptools` has been increased from 42 to 64. --- # Behaviour Changes ## plot() shorthand format interprets \"Cn\" (n\>9) as a color-cycle color Previously, `plot(..., "-C11")` would be interpreted as requesting a plot using linestyle \"-\", color \"C1\" (color #1 of the color cycle), and marker \"1\" (\"tri-down\"). It is now interpreted as requesting linestyle \"-\" and color \"C11\" (color #11 of the color cycle). It is recommended to pass ambiguous markers (such as \"1\") explicitly using the *marker* keyword argument. If the shorthand form is desired, such markers can also be unambiguously set by putting them *before* the color string. ## Legend labels for `plot` Previously if a sequence was passed to the *label* parameter of [\~.Axes.plot]{.title-ref} when plotting a single dataset, the sequence was automatically cast to string for the legend label. Now, if the sequence has only one element, that element will be the legend label. To keep the old behavior, cast the sequence to string before passing. ## Boxplots now ignore masked data points [\~matplotlib.axes.Axes.boxplot]{.title-ref} and [\~matplotlib.cbook.boxplot_stats]{.title-ref} now ignore any masked points in the input data. ## `axhspan` and `axvspan` now return `Rectangle`s, not `Polygon`s This change allows using [\~.Axes.axhspan]{.title-ref} to draw an annulus on polar axes. This change also affects other elements built via [\~.Axes.axhspan]{.title-ref} and [\~.Axes.axvspan]{.title-ref}, such as `Slider.poly`. ## Improved handling of pan/zoom events of overlapping Axes The forwarding of pan/zoom events is now determined by the visibility of the background-patch (e.g. `ax.patch.get_visible()`) and by the `zorder` of the axes. - Axes with a visible patch capture the event and do not pass it on to axes below. Only the Axes with the highest `zorder` that contains the event is triggered (if there are multiple Axes with the same `zorder`, the last added Axes counts) - Axes with an invisible patch are also invisible to events and they are passed on to the axes below. To override the default behavior and explicitly set whether an Axes should forward navigation events, use [.Axes.set_forward_navigation_events]{.title-ref}. ## `loc='best'` for `legend` now considers `Text` and `PolyCollections` The location selection `legend` now considers the existence of `Text` and `PolyCollections` in the `badness` calculation. Note: The `best` option can already be quite slow for plots with large amounts of data. For `PolyCollections`, it only considers the `Path` of `PolyCollections` and not the enclosed area when checking for overlap to reduce additional latency. However, it can still be quite slow when there are large amounts of `PolyCollections` in the plot to check for. ## Exception when not passing a Bbox to BboxTransform\*-classes The exception when not passing a Bbox to BboxTransform\*-classes that expect one, e.g., [\~matplotlib.transforms.BboxTransform]{.title-ref} has changed from `ValueError` to `TypeError`. ## *loc* parameter of `Cell` no longer accepts `None` The default value of the *loc* parameter has been changed from `None` to `right`, which already was the default location. The behavior of [.Cell]{.title-ref} didn\'t change when called without an explicit *loc* parameter. ## `ContourLabeler.add_label` now respects *use_clabeltext* \... and sets [.Text.set_transform_rotates_text]{.title-ref} accordingly. ## `Line2D` When creating a Line2D or using [.Line2D.set_xdata]{.title-ref} and [.Line2D.set_ydata]{.title-ref}, passing x/y data as non sequence is now an error. ## `ScalarMappable`s auto-scale their norm when an array is set Collections previously deferred auto-scaling of the norm until draw time. This has been changed to scale the norm whenever the first array is set to align with the docstring and reduce unexpected behavior when accessing the norm before drawing. ## `SubplotParams` moved from `matplotlib.figure` to `matplotlib.gridspec` It is still importable from `matplotlib.figure`, so does not require any changes to existing code. ## `PowerNorm` no longer clips values below vmin When `clip=False` is set (the default) on [\~matplotlib.colors.PowerNorm]{.title-ref}, values below `vmin` are now linearly normalised. Previously they were clipped to zero. This fixes issues with the display of colorbars associated with a power norm. ## Image path semantics of toolmanager-based tools Previously, MEP22 (\"toolmanager-based\") Tools would try to load their icon (`tool.image`) relative to the current working directory, or, as a fallback, from Matplotlib\'s own image directory. Because both approaches are problematic for third-party tools (the end-user may change the current working directory at any time, and third-parties cannot add new icons in Matplotlib\'s image directory), this behavior is deprecated; instead, `tool.image` is now interpreted relative to the directory containing the source file where the `Tool.image` class attribute is defined. (Defining `tool.image` as an absolute path also works and is compatible with both the old and the new semantics.) --- # Deprecations ## `plot_date` Use of `plot_date` has been discouraged since Matplotlib 3.5 and the function is now formally deprecated. - `datetime`-like data should directly be plotted using [\~.Axes.plot]{.title-ref}. - If you need to plot plain numeric data as `date-format`{.interpreted-text role="ref"} or need to set a timezone, call `ax.xaxis.axis_date` / `ax.yaxis.axis_date` before [\~.Axes.plot]{.title-ref}. See [.Axis.axis_date]{.title-ref}. ## Legend labels for `plot` Previously if a sequence was passed to the *label* parameter of [\~.Axes.plot]{.title-ref} when plotting a single dataset, the sequence was automatically cast to string for the legend label. This behavior is now deprecated and in future will error if the sequence length is not one (consistent with multi-dataset behavior, where the number of elements must match the number of datasets). To keep the old behavior, cast the sequence to string before passing. ## `boxplot` tick labels The parameter *labels* has been renamed to *tick_labels* for clarity and consistency with [\~.Axes.bar]{.title-ref}. ## Mixing positional and keyword arguments for `legend` handles and labels This previously only raised a warning, but is now formally deprecated. If passing *handles* and *labels*, they must be passed either both positionally or both as keyword. ## Applying theta transforms in `PolarTransform` Applying theta transforms in [\~matplotlib.projections.polar.PolarTransform]{.title-ref} and [\~matplotlib.projections.polar.InvertedPolarTransform]{.title-ref} is deprecated, and will be removed in a future version of Matplotlib. This is currently the default behaviour when these transforms are used externally, but only takes affect when: - An axis is associated with the transform. - The axis has a non-zero theta offset or has theta values increasing in a clockwise direction. To silence this warning and adopt future behaviour, set `apply_theta_transforms=False`. If you need to retain the behaviour where theta values are transformed, chain the `PolarTransform` with a [\~matplotlib.transforms.Affine2D]{.title-ref} transform that performs the theta shift and/or sign shift. ## *interval* parameter of `TimerBase.start` Setting the timer *interval* while starting it is deprecated. The interval can be specified instead in the timer constructor, or by setting the `timer.interval` attribute. ## *nth_coord* parameter to axisartist helpers for fixed axis Helper APIs in [.axisartist]{.title-ref} for generating a \"fixed\" axis on rectilinear axes ([.FixedAxisArtistHelperRectilinear]{.title-ref}) no longer take a *nth_coord* parameter, as that parameter is entirely inferred from the (required) *loc* parameter and having inconsistent *nth_coord* and *loc* is an error. For curvilinear axes, the *nth_coord* parameter remains supported (it affects the *ticks*, not the axis position itself), but that parameter will become keyword-only, for consistency with the rectilinear case. ## `rcsetup.interactive_bk`, `rcsetup.non_interactive_bk` and `rcsetup.all_backends` \... are deprecated and replaced by `matplotlib.backends.backend_registry.list_builtin` with the following arguments - `matplotlib.backends.BackendFilter.INTERACTIVE` - `matplotlib.backends.BackendFilter.NON_INTERACTIVE` - `None` respectively. ## Miscellaneous deprecations - `backend_ps.get_bbox_header` is considered an internal helper - `BboxTransformToMaxOnly`; if you rely on this, please make a copy of the code - `ContourLabeler.add_label_clabeltext` - `TransformNode.is_bbox`; instead check the object using `isinstance(..., BboxBase)` - `GridHelperCurveLinear.get_tick_iterator` --- # Development changes ## Build system ported to Meson The build system of Matplotlib has been ported from setuptools to [meson-python](https://meson-python.readthedocs.io) and [Meson](https://mesonbuild.com). Consequently, there have been a few changes for development and packaging purposes. 1. Installation by `pip` of packages with `pyproject.toml` use [build isolation](https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#build-isolation) by default, which interferes with editable installation. Thus for developers using editable installs, it is now necessary to pass the `--no-build-isolation` flag to `pip install`. This means that all build-time requirements must be available in the environment for an editable install. 2. Build configuration has moved from a custom `mplsetup.cfg`{.interpreted-text role="file"} (also configurable via `MPLSETUP` environment variable) to Meson options. These may be specified using [meson-python\'s build config settings](https://meson-python.readthedocs.io/en/stable/how-to-guides/config-settings.html) for `setup-args`. See `meson_options.txt`{.interpreted-text role="file"} for all options. For example, a `mplsetup.cfg`{.interpreted-text role="file"} containing the following: [rc_options] backend=Agg [libs] system_qhull = True may be replaced by passing the following arguments to `pip`: --config-settings=setup-args="-DrcParams-backend=Agg" --config-settings=setup-args="-Dsystem-qhull=true" Note that you must use `pip` \>= 23.1 in order to pass more than one setting. 3. Relatedly, Meson\'s [builtin options](https://mesonbuild.com/Builtin-options.html) are now used instead of custom options, e.g., the LTO option is now `b_lto`. 4. On Windows, Meson activates a Visual Studio environment automatically. However, it will not do so if another compiler is available. See [Meson\'s documentation](https://mesonbuild.com/Builtin-options.html#details-for-vsenv) if you wish to change the priority of chosen compilers. 5. Installation of test data was previously controlled by `mplsetup.cfg`{.interpreted-text role="file"}, but has now been moved to Meson\'s install tags. To install test data, add the `tests` tag to the requested install (be sure to include the existing tags as below): --config-settings=install-args="--tags=data,python-runtime,runtime,tests" 6. Checking typing stubs with `stubtest` does not work easily with editable install. For the time being, we suggest using a normal (non-editable) install if you wish to run `stubtest`. ## Increase to minimum supported versions of dependencies For Matplotlib 3.9, the `minimum supported versions `{.interpreted-text role="ref"} are being bumped: +------------+-----------------+---------------+ | Dependency | > min in mpl3.8 | min in mpl3.9 | +============+=================+===============+ | > NumPy | > 1.21.0 | > 1.23.0 | +------------+-----------------+---------------+ | setuptools | > 42 | > 64 | +------------+-----------------+---------------+ This is consistent with our `min_deps_policy`{.interpreted-text role="ref"} and [SPEC 0](https://scientific-python.org/specs/spec-0000/). To comply with requirements of `setuptools_scm`, the minimum version of `setuptools` has been increased from 42 to 64. ## Extensions require C++17 Matplotlib now requires a compiler that supports C++17 in order to build its extensions. According to [SciPy\'s analysis](https://docs.scipy.org/doc/scipy/dev/toolchain.html#c-language-standards), this should be available on all supported platforms. ## Windows on ARM64 support Windows on ARM64 now bundles FreeType 2.6.1 instead of 2.11.1 when building from source. This may cause small changes to text rendering, but should become consistent with all other platforms. --- # Removals ## Top-level cmap registration and access functions in `mpl.cm` As part of the [multi-step refactoring of colormap registration](https://github.com/matplotlib/matplotlib/issues/20853), the following functions have been removed: - `matplotlib.cm.get_cmap`; use `matplotlib.colormaps[name]` instead if you have a [str]{.title-ref}. Use [matplotlib.cm.ColormapRegistry.get_cmap]{.title-ref} if you have a [str]{.title-ref}, [None]{.title-ref} or a [matplotlib.colors.Colormap]{.title-ref} object that you want to convert to a [.Colormap]{.title-ref} object. - `matplotlib.cm.register_cmap`; use [matplotlib.colormaps.register \<.ColormapRegistry.register\>]{.title-ref} instead. - `matplotlib.cm.unregister_cmap`; use [matplotlib.colormaps.unregister \<.ColormapRegistry.unregister\>]{.title-ref} instead. - `matplotlib.pyplot.register_cmap`; use [matplotlib.colormaps.register \<.ColormapRegistry.register\>]{.title-ref} instead. The [matplotlib.pyplot.get_cmap]{.title-ref} function will stay available for backward compatibility. ## Contour labels `contour.ClabelText` and `ContourLabeler.set_label_props` are removed. Use `Text(..., transform_rotates_text=True)` as a replacement for `contour.ClabelText(...)` and `text.set(text=text, color=color, fontproperties=labeler.labelFontProps, clip_box=labeler.axes.bbox)` as a replacement for the `ContourLabeler.set_label_props(label, text, color)`. The `labelFontProps`, `labelFontSizeList`, and `labelTextsList` attributes of [.ContourLabeler]{.title-ref} have been removed. Use the `labelTexts` attribute and the font properties of the corresponding text objects instead. ## `num2julian`, `julian2num` and `JULIAN_OFFSET` \... of the [.dates]{.title-ref} module are removed without replacements. These were undocumented and not exported. Julian dates in Matplotlib were calculated from a Julian date epoch: `jdate = (date - np.datetime64(EPOCH)) / np.timedelta64(1, 'D')`. Conversely, a Julian date was converted to datetime as `date = np.timedelta64(int(jdate * 24 * 3600), 's') + np.datetime64(EPOCH)`. Matplotlib was using `EPOCH='-4713-11-24T12:00'` so that 2000-01-01 at 12:00 is 2_451_545.0 (see ). ## `offsetbox` methods `offsetbox.bbox_artist` is removed. This was just a wrapper to call [.patches.bbox_artist]{.title-ref} if a flag is set in the file, so use that directly if you need the behavior. `OffsetBox.get_extent_offsets` and `OffsetBox.get_extent` are removed; these methods are also removed on all subclasses of [.OffsetBox]{.title-ref}. To get the offsetbox extents, instead of `get_extent`, use [.OffsetBox.get_bbox]{.title-ref}, which directly returns a [.Bbox]{.title-ref} instance. To also get the child offsets, instead of `get_extent_offsets`, separately call [\~.OffsetBox.get_offset]{.title-ref} on each children after triggering a draw. ## `parse_fontconfig_pattern` raises on unknown constant names Previously, in a fontconfig pattern like `DejaVu Sans:foo`, the unknown `foo` constant name would be silently ignored. This now raises an error. ## `tri` submodules The `matplotlib.tri.*` submodules are removed. All functionality is available in `matplotlib.tri` directly and should be imported from there. ## Widget API - `CheckButtons.rectangles` and `CheckButtons.lines` are removed; [.CheckButtons]{.title-ref} now draws itself using [\~.Axes.scatter]{.title-ref}. - `RadioButtons.circles` is removed; [.RadioButtons]{.title-ref} now draws itself using [\~.Axes.scatter]{.title-ref}. - `MultiCursor.needclear` is removed with no replacement. - The unused parameter *x* to `TextBox.begin_typing` was a required argument, and is now removed. ### Most arguments to widgets have been made keyword-only Passing all but the very few first arguments positionally in the constructors of Widgets is now keyword-only. In general, all optional arguments are keyword-only. ## `Axes3D` API - `Axes3D.unit_cube`, `Axes3D.tunit_cube`, and `Axes3D.tunit_edges` are removed without replacement. - `axes3d.vvec`, `axes3d.eye`, `axes3d.sx`, and `axes3d.sy` are removed without replacement. ## Inconsistent *nth_coord* and *loc* passed to `_FixedAxisArtistHelperBase` The value of the *nth_coord* parameter of `_FixedAxisArtistHelperBase` and its subclasses is now inferred from the value of *loc*; passing inconsistent values (e.g., requesting a \"top y axis\" or a \"left x axis\") has no more effect. ## Passing undefined *label_mode* to `Grid` \... is no longer allowed. This includes [mpl_toolkits.axes_grid1.axes_grid.Grid]{.title-ref}, [mpl_toolkits.axes_grid1.axes_grid.AxesGrid]{.title-ref}, and [mpl_toolkits.axes_grid1.axes_grid.ImageGrid]{.title-ref} as well as the corresponding classes imported from `mpl_toolkits.axisartist.axes_grid`. Pass `label_mode='keep'` instead to get the previous behavior of not modifying labels. ## `draw_gouraud_triangle` \... is removed. Use [\~.RendererBase.draw_gouraud_triangles]{.title-ref} instead. A `draw_gouraud_triangle` call in a custom [\~matplotlib.artist.Artist]{.title-ref} can readily be replaced as: self.draw_gouraud_triangles(gc, points.reshape((1, 3, 2)), colors.reshape((1, 3, 4)), trans) A [\~.RendererBase.draw_gouraud_triangles]{.title-ref} method can be implemented from an existing `draw_gouraud_triangle` method as: transform = transform.frozen() for tri, col in zip(triangles_array, colors_array): self.draw_gouraud_triangle(gc, tri, col, transform) ## Miscellaneous removals The following items have previously been replaced, and are now removed: - *ticklabels* parameter of `matplotlib.axis.Axis.set_ticklabels` has been renamed to *labels*. - `Barbs.barbs_doc` and `Quiver.quiver_doc` are removed. These are the doc-strings and should not be accessible as a named class member, but as normal doc-strings would. - `collections.PolyCollection.span_where` and `collections.BrokenBarHCollection`; use `fill_between` instead. - `Legend.legendHandles` was undocumented and has been renamed to `legend_handles`. The following items have been removed without replacements: - The attributes `repeat` of [.TimedAnimation]{.title-ref} and subclasses and `save_count` of [.FuncAnimation]{.title-ref} are considered private and removed. - `matplotlib.backend.backend_agg.BufferRegion.to_string` - `matplotlib.backend.backend_agg.BufferRegion.to_string_argb` - `matplotlib.backends.backend_ps.PsBackendHelper` - `matplotlib.backends.backend_webagg.ServerThread` - *raw* parameter of [.GridSpecBase.get_grid_positions]{.title-ref} - `matplotlib.patches.ConnectionStyle._Base.SimpleEvent` - `passthru_pt` attribute of `mpl_toolkits.axisartist.AxisArtistHelper` --- # API Changes for 3.9.0 ::: {.contents local="" depth="1"} ::: --- # API Changes for 3.9.1 ## Development ### Documentation-specific custom Sphinx roles are now semi-public For third-party packages that derive types from Matplotlib, our use of custom roles may prevent Sphinx from building their docs. These custom Sphinx roles are now public solely for the purposes of use within projects that derive from Matplotlib types. See `matplotlib.sphinxext.roles`{.interpreted-text role="mod"} for details. --- # API Changes for 3.9.2 ## Development ### Windows wheel runtime bundling made static In 3.7.0, the MSVC runtime DLL was bundled in wheels to enable importing Matplotlib on systems that do not have it installed. However, this could cause inconsistencies with other wheels that did the same, and trigger random crashes depending on import order. See [this issue](https://github.com/matplotlib/matplotlib/issues/28551) for further details. Since 3.9.2, wheels now bundle the MSVC runtime DLL statically to avoid such issues. --- # `matplotlib.projections.geo` ::: {.automodule members="" show-inheritance=""} matplotlib.projections.geo ::: --- # `matplotlib.projections.polar` ::: {.automodule members="" show-inheritance=""} matplotlib.projections.polar ::: --- # `matplotlib.projections` ::: {.automodule members="" show-inheritance=""} matplotlib.projections ::: ## Built-in projections Matplotlib has built-in support for polar and some geographic projections. See the following pages for more information: ::: {.toctree maxdepth="1"} projections/polar projections/geo ::: --- # `pylab` ::: {.automodule no-members=""} pylab ::: --- # `matplotlib.pyplot` ::: currentmodule matplotlib.pyplot ::: ::: {.automodule no-members="" no-undoc-members=""} matplotlib.pyplot ::: ## Managing Figure and Axes ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} axes cla clf close delaxes fignum_exists figure gca gcf get_figlabels get_fignums sca subplot subplot2grid subplot_mosaic subplots twinx twiny ::: ## Adding data to the plot ### Basic ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} plot errorbar scatter step loglog semilogx semilogy fill_between fill_betweenx bar barh bar_label grouped_bar stem eventplot pie pie_label stackplot broken_barh vlines hlines fill polar ::: ### Spans ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} axhline axhspan axvline axvspan axline ::: ### Spectral ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} acorr angle_spectrum cohere csd magnitude_spectrum phase_spectrum psd specgram xcorr ::: ### Statistics ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} ecdf boxplot violinplot ::: ### Binned ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} hexbin hist hist2d stairs ::: ### Contours ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} clabel contour contourf ::: ### 2D arrays ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} imshow matshow pcolor pcolormesh spy figimage ::: ### Unstructured triangles ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} triplot tripcolor tricontour tricontourf ::: ### Text and annotations ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} annotate text figtext table arrow figlegend legend ::: ### Vector fields ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} barbs quiver quiverkey streamplot ::: ## Axis configuration ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} autoscale axis box grid locator_params minorticks_off minorticks_on rgrids thetagrids tick_params ticklabel_format xlabel xlim xscale xticks ylabel ylim yscale yticks suptitle title ::: ## Layout ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} margins subplots_adjust subplot_tool tight_layout ::: ## Colormapping ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} clim colorbar gci sci get_cmap set_cmap imread imsave ::: Colormaps are available via the colormap registry [matplotlib.colormaps]{.title-ref}. For convenience this registry is available in `pyplot` as ::: {.autodata no-value=""} colormaps ::: Additionally, there are shortcut functions to set builtin colormaps; e.g. `plt.viridis()` is equivalent to `plt.set_cmap('viridis')`. ::: {.autodata no-value=""} color_sequences ::: ## Configuration ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} rc rc_context rcdefaults ::: ## Output ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} draw draw_if_interactive ioff ion install_repl_displayhook isinteractive pause savefig show switch_backend uninstall_repl_displayhook ::: ## Other ::: {.autosummary toctree="_as_gen" template="autosummary.rst" nosignatures=""} connect disconnect findobj get getp get_current_fig_manager ginput new_figure_manager set_loglevel setp waitforbuttonpress xkcd ::: --- # `matplotlib.quiver` ::: currentmodule matplotlib.quiver ::: ::: {.automodule no-members="" no-inherited-members=""} matplotlib.quiver ::: ## Classes ::: {.autosummary toctree="_as_gen/" template="autosummary.rst"} Quiver QuiverKey Barbs ::: --- # `matplotlib.rcsetup` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.rcsetup ::: --- # `matplotlib.sankey` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.sankey ::: --- # `matplotlib.scale` ::: {.automodule members="" undoc-members="" show-inheritance="" member-order="bysource"} matplotlib.scale ::: --- # `matplotlib.sphinxext.figmpl_directive` ::: {.automodule no-undoc-members=""} matplotlib.sphinxext.figmpl_directive ::: --- # `matplotlib.sphinxext.mathmpl` ::: {.automodule exclude-members="latex_math" no-undoc-members=""} matplotlib.sphinxext.mathmpl ::: --- # `matplotlib.sphinxext.plot_directive` ::: {.automodule no-undoc-members=""} matplotlib.sphinxext.plot_directive ::: --- # `matplotlib.sphinxext.roles` ::: {.automodule no-undoc-members="" private-members="_rcparam_role, _mpltype_role"} matplotlib.sphinxext.roles ::: --- # `matplotlib.spines` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.spines ::: --- # `matplotlib.style` Styles are predefined sets of [.rcParams]{.title-ref} that define the visual appearance of a plot. `customizing`{.interpreted-text role="ref"} describes the mechanism and usage of styles. The `/gallery/style_sheets/style_sheets_reference`{.interpreted-text role="doc"} gives an overview of the builtin styles. ::: {.automodule members="" undoc-members="" show-inheritance="" imported-members=""} matplotlib.style ::: ::: data library A dict mapping from style name to [.rcParams]{.title-ref} defining that style. This is meant to be read-only. Use [.reload_library]{.title-ref} to update. ::: ::: data available List of the names of the available styles. This is meant to be read-only. Use [.reload_library]{.title-ref} to update. ::: --- # `matplotlib.table` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.table ::: --- # `matplotlib.testing` ## `matplotlib.testing`{.interpreted-text role="mod"} ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.testing ::: ## `matplotlib.testing.compare`{.interpreted-text role="mod"} ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.testing.compare ::: ## `matplotlib.testing.decorators`{.interpreted-text role="mod"} ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.testing.decorators ::: ## `matplotlib.testing.exceptions`{.interpreted-text role="mod"} ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.testing.exceptions ::: ## Testing with optional dependencies For more information on fixtures, see `pytest fixtures `{.interpreted-text role="external+pytest:ref"}. ::: autofunction matplotlib.testing.conftest.pd ::: ::: autofunction matplotlib.testing.conftest.xr ::: --- # `matplotlib.texmanager` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.texmanager ::: --- # `matplotlib.text` ::: redirect-from /api/textpath_api ::: ::: {.automodule no-members=""} matplotlib.text ::: ::: {.autoclass members="" undoc-members="" show-inheritance=""} matplotlib.text.Text ::: ::: {.autoclass members="" undoc-members="" show-inheritance=""} matplotlib.text.Annotation ::: ::: {.autoclass members="" undoc-members="" show-inheritance=""} matplotlib.text.OffsetFrom ::: ::: {.autoclass members="" undoc-members="" show-inheritance=""} matplotlib.text.TextPath ::: ::: {.autoclass members="" undoc-members="" show-inheritance=""} matplotlib.text.TextToPath ::: --- # `matplotlib.ticker` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.ticker ::: ::: {.inheritance-diagram parts="1"} matplotlib.ticker ::: --- ::: module mpl_toolkits.axes_grid1 ::: ::: redirect-from /api/toolkits/axes_grid ::: # `mpl_toolkits.axes_grid1` `mpl_toolkits.axes_grid1`{.interpreted-text role="mod"} provides a framework of helper classes to adjust the positioning of multiple fixed-aspect Axes (e.g., displaying images). It can be contrasted with the `aspect` property of Matplotlib Axes, which adjusts the position of a single Axes. See `axes_grid1_users-guide-index`{.interpreted-text role="ref"} for a guide on the usage of axes_grid1. ![](../../gallery/axes_grid1/images/sphx_glr_demo_axes_grid_001.png){.align-center} ::: note ::: title Note ::: This module contains classes and function that were formerly part of the `mpl_toolkits.axes_grid` module that was removed in 3.6. Additional classes from that older module may also be found in [mpl_toolkits.axisartist]{.title-ref}. ::: ::: currentmodule mpl_toolkits ::: **The submodules of the axes_grid1 API are:** ::: {.autosummary toctree="../_as_gen" template="automodule.rst"} axes_grid1.anchored_artists axes_grid1.axes_divider axes_grid1.axes_grid axes_grid1.axes_rgb axes_grid1.axes_size axes_grid1.inset_locator axes_grid1.mpl_axes axes_grid1.parasite_axes ::: --- ::: module mpl_toolkits.axisartist ::: # `mpl_toolkits.axisartist` The *axisartist* namespace provides a derived Axes implementation (`~mpl_toolkits.axisartist.axislines.Axes`{.interpreted-text role="class"}), designed to support curvilinear grids. The biggest difference is that the artists that are responsible for drawing axis lines, ticks, ticklabels, and axis labels are separated out from Matplotlib\'s Axis class. You can find a tutorial describing usage of axisartist at the `axisartist_users-guide-index`{.interpreted-text role="ref"} user guide. ![](../../gallery/axisartist/images/sphx_glr_demo_curvelinear_grid_001.png){.align-center} ::: note ::: title Note ::: This module contains classes and function that were formerly part of the `mpl_toolkits.axes_grid` module that was removed in 3.6. Additional classes from that older module may also be found in [mpl_toolkits.axes_grid1]{.title-ref}. ::: ::: currentmodule mpl_toolkits ::: **The submodules of the axisartist API are:** ::: {.autosummary toctree="../_as_gen" template="automodule.rst"} axisartist.angle_helper axisartist.axes_divider axisartist.axis_artist axisartist.axisline_style axisartist.axislines axisartist.floating_axes axisartist.grid_finder axisartist.grid_helper_curvelinear axisartist.parasite_axes ::: --- # mpl_toolkits.mplot3d.axes3d.Axes3D ::: currentmodule mpl_toolkits.mplot3d.axes3d ::: ::: {.autoclass no-members="" no-undoc-members="" show-inheritance=""} Axes3D ::: ::: currentmodule mpl_toolkits.mplot3d.axes3d.Axes3D ::: ## Plotting ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} plot scatter bar bar3d plot_surface plot_wireframe plot_trisurf fill_between clabel contour tricontour contourf tricontourf quiver voxels errorbar stem ::: ## Text and annotations ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} text text2D ::: ## Clearing ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} clear ::: ## Appearance ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} set_axis_off set_axis_on grid ::: ## Axis ### Axis limits and direction ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} get_zaxis get_xlim set_xlim get_ylim set_ylim get_zlim set_zlim get_w_lims get_xinverted set_xinverted invert_xaxis xaxis_inverted get_yinverted set_yinverted invert_yaxis yaxis_inverted get_zinverted set_zinverted invert_zaxis zaxis_inverted get_xbound set_xbound get_ybound set_ybound get_zbound set_zbound ::: ### Axis labels and title ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} set_zlabel get_zlabel set_title ::: ### Axis scales ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} set_xscale set_yscale set_zscale get_zscale ::: ### Autoscaling and margins ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} get_zmargin set_zmargin margins autoscale autoscale_view set_autoscalez_on get_autoscalez_on auto_scale_xyz ::: ### Aspect ratio ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} set_aspect set_box_aspect apply_aspect ::: ### Ticks ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} tick_params set_zticks get_zticks set_zticklabels get_zticklines get_zgridlines get_zminorticklabels get_zmajorticklabels zaxis_date ::: ## Units ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} convert_zunits ::: ## Adding artists ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} add_collection3d ::: ## Sharing ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} sharez shareview ::: ## Interactive ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} can_zoom can_pan disable_mouse_rotation mouse_init drag_pan format_zdata format_coord ::: ## Projection and perspective ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} view_init set_proj_type get_proj set_top_view ::: ## Drawing ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} draw get_tightbbox ::: ## Aliases and deprecated methods ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} set_zlim3d stem3D text3D ::: ## Other ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} get_axis_position add_contour_set add_contourf_set update_datalim ::: ::: currentmodule mpl_toolkits.mplot3d ::: ## Sample 3D data ::: {.autosummary toctree="../../_as_gen" template="autosummary.rst" nosignatures=""} axes3d.get_test_data ::: ::: {.minigallery add-heading=""} mpl_toolkits.mplot3d.axes3d.Axes3D ::: --- # mplot3d FAQ {#toolkit_mplot3d-faq} ## How is mplot3d different from Mayavi? [Mayavi](https://docs.enthought.com/mayavi/mayavi/) is a very powerful and featureful 3D graphing library. For advanced 3D scenes and excellent rendering capabilities, it is highly recommended to use Mayavi. mplot3d was intended to allow users to create simple 3D graphs with the same \"look-and-feel\" as matplotlib\'s 2D plots. Furthermore, users can use the same toolkit that they are already familiar with to generate both their 2D and 3D plots. ## My 3D plot doesn\'t look right at certain viewing angles This is probably the most commonly reported issue with mplot3d. The problem is that \-- from some viewing angles \-- a 3D object would appear in front of another object, even though it is physically behind it. This can result in plots that do not look \"physically correct.\" Unfortunately, while some work is being done to reduce the occurrence of this artifact, it is currently an intractable problem, and cannot be fully solved until matplotlib supports 3D graphics rendering at its core. The problem occurs due to the reduction of 3D data down to 2D + z-order scalar. A single value represents the 3rd dimension for all parts of 3D objects in a collection. Therefore, when the bounding boxes of two collections intersect, it becomes possible for this artifact to occur. Furthermore, the intersection of two 3D objects (such as polygons or patches) cannot be rendered properly in matplotlib\'s 2D rendering engine. This problem will likely not be solved until OpenGL support is added to all of the backends (patches are greatly welcomed). Until then, if you need complex 3D scenes, we recommend using [Mayavi](https://docs.enthought.com/mayavi/mayavi/). ## I don\'t like how the 3D plot is laid out, how do I change that? Historically, mplot3d has suffered from a hard-coding of parameters used to control visuals such as label spacing, tick length, and grid line width. Work is being done to eliminate this issue. For matplotlib v1.1.0, there is a semi-official manner to modify these parameters. See the note in the `.mplot3d.axis3d`{.interpreted-text role="mod"} section of the mplot3d API documentation for more information. --- # mplot3d View Angles {#toolkit_mplot3d-view-angles} ## How to define the view angle The position of the viewport \"camera\" in a 3D plot is defined by three angles: *elevation*, *azimuth*, and *roll*. From the resulting position, it always points towards the center of the plot box volume. The angle direction is a common convention, and is shared with [PyVista](https://docs.pyvista.org/api/core/camera.html) and [MATLAB](https://www.mathworks.com/help/matlab/ref/view.html). Note that a positive roll angle rotates the viewing plane clockwise, so the 3d axes will appear to rotate counter-clockwise. ![image](/_static/mplot3d_view_angles.png){.align-center} Rotating the plot using the mouse will control azimuth, elevation, as well as roll, and all three angles can be set programmatically: import matplotlib.pyplot as plt ax = plt.figure().add_subplot(projection='3d') ax.view_init(elev=30, azim=45, roll=15) ## Primary view planes To look directly at the primary view planes, the required elevation, azimuth, and roll angles are shown in the diagram of an \"unfolded\" plot below. These are further documented in the [.mplot3d.axes3d.Axes3D.view_init]{.title-ref} API. ::: {.plot align="center"} gallery/mplot3d/view_planes_3d.py ::: ## Rotation with mouse {#toolkit_mouse-rotation} 3D plots can be reoriented by dragging the mouse. There are various ways to accomplish this; the style of mouse rotation can be specified by setting `axes3d.mouserotationstyle`{.interpreted-text role="rc"}, see `/users/explain/customizing`{.interpreted-text role="doc"}. Prior to v3.10, the 2D mouse position corresponded directly to azimuth and elevation; this is also how it is done in [MATLAB](https://www.mathworks.com/help/matlab/ref/view.html). To keep it this way, set `mouserotationstyle: azel`. This approach works fine for spherical coordinate plots, where the *z* axis is special; however, it leads to a kind of \'gimbal lock\' when looking down the *z* axis: the plot reacts differently to mouse movement, dependent on the particular orientation at hand. Also, \'roll\' cannot be controlled. As an alternative, there are various mouse rotation styles where the mouse manipulates a virtual \'trackball\'. In its simplest form (`mouserotationstyle: trackball`), the trackball rotates around an in-plane axis perpendicular to the mouse motion (it is as if there is a plate laying on the trackball; the plate itself is fixed in orientation, but you can drag the plate with the mouse, thus rotating the ball). This is more natural to work with than the `azel` style; however, the plot cannot be easily rotated around the viewing direction - one has to move the mouse in circles with a handedness opposite to the desired rotation, counterintuitively. A different variety of trackball rotates along the shortest arc on the virtual sphere (`mouserotationstyle: sphere`). Rotating around the viewing direction is straightforward with it: grab the ball near its edge instead of near the center. Ken Shoemake\'s ARCBALL [\[Shoemake1992\]](#Shoemake1992){.citation} is also available (`mouserotationstyle: Shoemake`); it resembles the `sphere` style, but is free of hysteresis, i.e., returning mouse to the original position returns the figure to its original orientation; the rotation is independent of the details of the path the mouse took, which could be desirable. However, Shoemake\'s arcball rotates at twice the angular rate of the mouse movement (it is quite noticeable, especially when adjusting roll), and it lacks an obvious mechanical equivalent; arguably, the path-independent rotation is not natural (however convenient), it could take some getting used to. So it is a trade-off. Henriksen et al. [\[Henriksen2002\]](#Henriksen2002){.citation} provide an overview. In summary: -------------- ----------------- ---------- ------------- ----------------- ----------------- Style traditional[^1] incl. uniform[^3] path mechanical roll[^2] independent[^4] counterpart[^5] azel ✔️ ❌ ❌ ✔️ ✔️ trackball ❌ ✓[^6] ✔️ ❌ ✔️ sphere ❌ ✔️ ✔️ ❌ ✔️ arcball ❌ ✔️ ✔️ ✔️ ❌ -------------- ----------------- ---------- ------------- ----------------- ----------------- You can try out one of the various mouse rotation styles using: ``` python import matplotlib as mpl mpl.rcParams['axes3d.mouserotationstyle'] = 'trackball' # 'azel', 'trackball', 'sphere', or 'arcball' import numpy as np import matplotlib.pyplot as plt from matplotlib import cm ax = plt.figure().add_subplot(projection='3d') X = np.arange(-5, 5, 0.25) Y = np.arange(-5, 5, 0.25) X, Y = np.meshgrid(X, Y) R = np.sqrt(X**2 + Y**2) Z = np.sin(R) surf = ax.plot_surface(X, Y, Z, cmap=cm.coolwarm, linewidth=0, antialiased=False) plt.show() ``` Alternatively, create a file `matplotlibrc`, with contents: axes3d.mouserotationstyle: trackball (or any of the other styles, instead of `trackball`), and then run any of the `mplot3d-examples-index`{.interpreted-text role="ref"} examples. The size of the virtual trackball, sphere, or arcball can be adjusted by setting `axes3d.trackballsize`{.interpreted-text role="rc"}. This specifies how much mouse motion is needed to obtain a given rotation angle (when near the center), and it controls where the edge of the sphere or arcball is (how far from the center, hence how close to the plot edge). The size is specified in units of the Axes bounding box, i.e., to make the arcball span the whole bounding box, set it to 1. A size of about 2/3 appears to work reasonably well; this is the default. Both arcballs (`mouserotationstyle: sphere` and `mouserotationstyle: arcball`) have a noticeable edge; the edge can be made less abrupt by specifying a border width, `axes3d.trackballborder`{.interpreted-text role="rc"}. This works somewhat like Gavin Bell\'s arcball, which was originally written for OpenGL [\[Bell1988\]](#Bell1988){.citation}, and is used in Blender and Meshlab. Bell\'s arcball extends the arcball\'s spherical control surface with a hyperbola; the two are smoothly joined. However, the hyperbola extends all the way beyond the edge of the plot. In the mplot3d sphere and arcball style, the border extends to a radius `trackballsize/2 + trackballborder`. Beyond the border, the style works like the original: it controls roll only. A border width of about 0.2 appears to work well; this is the default. To obtain the original Shoemake\'s arcball with a sharp border, set the border width to 0. For an extended border similar to Bell\'s arcball, where the transition from the arcball to the border occurs at 45°, set the border width to $\sqrt 2 \approx 1.414$. The border is a circular arc, wrapped around the arcball sphere cylindrically (like a doughnut), joined smoothly to the sphere, much like Bell\'s hyperbola. ::: {#citations} [Bell1988]{#Bell1988 .citation-label} : Gavin Bell, in the examples included with the GLUT (OpenGL Utility Toolkit) library, [Henriksen2002]{#Henriksen2002 .citation-label} : Knud Henriksen, Jon Sporring, Kasper Hornbæk, \"Virtual Trackballs Revisited\", in IEEE Transactions on Visualization and Computer Graphics, Volume 10, Issue 2, March-April 2004, pp. 206-216, [\[full-text\]](https://www.researchgate.net/publication/8329656_Virtual_Trackballs_Revisited#fullTextFileContent); [Shoemake1992]{#Shoemake1992 .citation-label} : Ken Shoemake, \"ARCBALL: A user interface for specifying three-dimensional rotation using a mouse\", in Proceedings of Graphics Interface \'92, 1992, pp. 151-156, ::: [^1]: The way it was prior to v3.10; this is also MATLAB\'s style [^2]: Mouse controls roll too (not only azimuth and elevation) [^3]: Figure reacts the same way to mouse movements, regardless of orientation (no difference between \'poles\' and \'equator\') [^4]: Returning mouse to original position returns figure to original orientation (rotation is independent of the details of the path the mouse took) [^5]: The style has a corresponding natural implementation as a mechanical device [^6]: While it is possible to control roll with the `trackball` style, this is not immediately obvious (it requires moving the mouse in large circles) and a bit counterintuitive (the resulting roll is in the opposite direction) --- # `mpl_toolkits.mplot3d` The mplot3d toolkit adds simple 3D plotting capabilities (scatter, surface, line, mesh, etc.) to Matplotlib by supplying an Axes object that can create a 2D projection of a 3D scene. The resulting graph will have the same look and feel as regular 2D plots. Not the fastest or most feature complete 3D library out there, but it ships with Matplotlib and thus may be a lighter weight solution for some use cases. See the `mplot3d tutorial `{.interpreted-text role="ref"} for more information. ![image](/_static/demo_mplot3d.png){.align-center} The interactive backends also provide the ability to rotate and zoom the 3D scene. One can rotate the 3D scene by simply clicking-and-dragging the scene. Panning is done by clicking the middle mouse button, and zooming is done by right-clicking the scene and dragging the mouse up and down. Unlike 2D plots, the toolbar pan and zoom buttons are not used. ::: {.toctree maxdepth="2"} mplot3d/faq.rst mplot3d/view_angles.rst mplot3d/axes3d.rst ::: ::: note ::: title Note ::: [.pyplot]{.title-ref} cannot be used to add content to 3D plots, because its function signatures are strictly 2D and cannot handle the additional information needed for 3D. Instead, use the explicit API by calling the respective methods on the [.Axes3D]{.title-ref} object. ::: ::: {.automodule no-members="" no-undoc-members=""} mpl_toolkits.mplot3d ::: ::: module mpl_toolkits.mplot3d.axes3d ::: ::: currentmodule mpl_toolkits.mplot3d ::: ## `~mpl_toolkits.mplot3d.axes3d`{.interpreted-text role="mod"} ::: note ::: title Note ::: 3D plotting in Matplotlib is still not as mature as the 2D case. Please report any functions that do not behave as expected as a bug. In addition, help and patches would be greatly appreciated! ::: [axes3d.Axes3D]{.title-ref} (fig\[, rect, elev, azim, roll, \...\]) 3D Axes object. ::: module mpl_toolkits.mplot3d.axis3d ::: ::: currentmodule mpl_toolkits.mplot3d ::: ## `~mpl_toolkits.mplot3d.axis3d`{.interpreted-text role="mod"} ::: note ::: title Note ::: See `!mpl_toolkits.mplot3d.axis3d._axinfo`{.interpreted-text role="attr"} for a dictionary containing constants that may be modified for controlling the look and feel of mplot3d axes (e.g., label spacing, font colors and panel colors). Historically, axis3d has suffered from having hard-coded constants that precluded user adjustments, and this dictionary was implemented in version 1.1 as a stop-gap measure. ::: ::: {.autosummary toctree="../_as_gen" template="autosummary.rst"} axis3d.Axis ::: ::: module mpl_toolkits.mplot3d.art3d ::: ::: currentmodule mpl_toolkits.mplot3d ::: ## `~mpl_toolkits.mplot3d.art3d`{.interpreted-text role="mod"} ::: {.autosummary toctree="../_as_gen" template="autosummary.rst"} art3d.Line3D art3d.Line3DCollection art3d.Patch3D art3d.Patch3DCollection art3d.Path3DCollection art3d.PathPatch3D art3d.Poly3DCollection art3d.Text3D art3d.get_dir_vector art3d.juggle_axes art3d.line_2d_to_3d art3d.line_collection_2d_to_3d art3d.patch_2d_to_3d art3d.patch_collection_2d_to_3d art3d.pathpatch_2d_to_3d art3d.poly_collection_2d_to_3d art3d.rotate_axes art3d.text_2d_to_3d ::: ::: module mpl_toolkits.mplot3d.proj3d ::: ::: currentmodule mpl_toolkits.mplot3d ::: ## `~mpl_toolkits.mplot3d.proj3d`{.interpreted-text role="mod"} ::: {.autosummary toctree="../_as_gen" template="autosummary.rst"} proj3d.inv_transform proj3d.proj_transform proj3d.proj_transform_clip proj3d.world_transformation ::: --- # `matplotlib.transforms` ::: {.inheritance-diagram parts="1"} matplotlib.transforms ::: ::: {.automodule members="TransformNode, BboxBase, Bbox, TransformedBbox, Transform, TransformWrapper, AffineBase, Affine2DBase, Affine2D, IdentityTransform, BlendedGenericTransform, BlendedAffine2D, blended_transform_factory, CompositeGenericTransform, CompositeAffine2D, composite_transform_factory, BboxTransform, BboxTransformTo, BboxTransformFrom, ScaledTranslation, TransformedPath, nonsingular, interval_contains, interval_contains_open :show-inheritance: :special-members: __add__, __sub__"} matplotlib.transforms ::: --- # `matplotlib.tri` Unstructured triangular grid functions. ::: {.autoclass members=""} matplotlib.tri.Triangulation ::: ::: {.autoclass show-inheritance=""} matplotlib.tri.TriContourSet ::: ::: autoclass matplotlib.tri.TriFinder ::: ::: {.autoclass members="__call__" show-inheritance=""} matplotlib.tri.TrapezoidMapTriFinder ::: ::: autoclass matplotlib.tri.TriInterpolator ::: ::: {.autoclass members="__call__, gradient" show-inheritance=""} matplotlib.tri.LinearTriInterpolator ::: ::: {.autoclass members="__call__, gradient" show-inheritance=""} matplotlib.tri.CubicTriInterpolator ::: ::: autoclass matplotlib.tri.TriRefiner ::: ::: {.autoclass show-inheritance="" members=""} matplotlib.tri.UniformTriRefiner ::: ::: {.autoclass members=""} matplotlib.tri.TriAnalyzer ::: --- # `matplotlib.typing` ::: {.automodule no-members="" no-undoc-members=""} matplotlib.typing ::: ## Color ::: autodata matplotlib.typing.ColorType ::: ::: autodata matplotlib.typing.RGBColorType ::: ::: autodata matplotlib.typing.RGBAColorType ::: ::: autodata matplotlib.typing.ColourType ::: ::: autodata matplotlib.typing.RGBColourType ::: ::: autodata matplotlib.typing.RGBAColourType ::: ## Styles ::: autodata matplotlib.typing.LineStyleType ::: ::: autodata matplotlib.typing.DrawStyleType ::: ::: autodata matplotlib.typing.MarkEveryType ::: ::: autodata matplotlib.typing.FillStyleType ::: ::: autodata matplotlib.typing.CapStyleType ::: ::: autodata matplotlib.typing.JoinStyleType ::: ## Other types ::: autodata matplotlib.typing.CoordsType ::: ::: autodata matplotlib.typing.RcStyleType ::: ::: autodata matplotlib.typing.HashableList ::: --- # `matplotlib.units` ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.units ::: --- # `matplotlib.widgets` ::: {.inheritance-diagram parts="1"} matplotlib.widgets ::: ::: {.automodule members="" undoc-members="" show-inheritance=""} matplotlib.widgets ::: --- # MEP8: PEP8 ::: {.contents local=""} ::: ## Status **Superseded** Current guidelines for style, including usage of pep8 are maintained in [our pull request guidelines](https://matplotlib.org/devdocs/devel/coding_guide.html). We are currently enforcing a sub-set of pep8 on new code contributions. ## Branches and Pull requests None so far. ## Abstract The matplotlib codebase predates PEP8, and therefore is less than consistent style-wise in some areas. Bringing the codebase into compliance with PEP8 would go a long way to improving its legibility. ## Detailed description Some files use four space indentation, some use three. Some use different levels in the same file. For the most part, class/function/variable naming follows PEP8, but it wouldn\'t hurt to fix where necessary. ## Implementation The implementation should be fairly mechanical: running the pep8 tool over the code and fixing where appropriate. This should be merged in after the 2.0 release, since the changes will likely make merging any pending pull requests more difficult. Additionally, and optionally, PEP8 compliance could be tracked by an automated build system. ## Backward compatibility Public names of classes and functions that require change (there shouldn\'t be many of these) should first be deprecated and then removed in the next release cycle. ## Alternatives PEP8 is a popular standard for Python code style, blessed by the Python core developers, making any alternatives less desirable. --- # MEP9: Global interaction manager ::: {.contents local=""} ::: Add a global manager for all user interactivity with artists; make any artist resizeable, moveable, highlightable, and selectable as desired by the user. ## Status **Discussion** ## Branches and Pull requests ## Abstract The goal is to be able to interact with matplotlib artists in a very similar way as drawing programs do. When appropriate, the user should be able to move, resize, or select an artist that is already on the canvas. Of course, the script writer is ultimately in control of whether an artist is able to be interacted with, or whether it is static. This code to do this has already been privately implemented and tested, and would need to be migrated from its current \"mixin\" implementation, to a bona-fide part of matplotlib. The end result would be to have four new keywords available to matplotlib.artist.Artist: \_[moveable](), \_[resizeable](), \_[selectable](), and \_[highlightable](). Setting any one of these keywords to True would activate interactivity for that artist. In effect, this MEP is a logical extension of event handling in matplotlib; matplotlib already supports \"low level\" interactions like left mouse presses, a key press, or similar. The MEP extends the support to the logical level, where callbacks are performed on the artists when certain interactive gestures from the user are detected. ## Detailed description This new functionality would be used to allow the end-user to better interact with the graph. Many times, a graph is almost what the user wants, but a small repositioning and/or resizing of components is necessary. Rather than force the user to go back to the script to trial-and-error the location, and simple drag and drop would be appropriate. Also, this would better support applications that use matplotlib; here, the end-user has no reasonable access or desire to edit the underlying source in order to fine-tune a plot. Here, if matplotlib offered the capability, one could move or resize artists on the canvas to suit their needs. Also, the user should be able to highlight (with a mouse over) an artist, and select it with a double-click, if the application supports that sort of thing. In this MEP, we also want to support the highlighting and selection natively; it is up to application to handle what happens when the artist is selected. A typical handling would be to display a dialog to edit the properties of the artist. In the future, as well (this is not part of this MEP), matplotlib could offer backend-specific property dialogs for each artist, which are raised on artist selection. This MEP would be a necessary stepping stone for that sort of capability. There are currently a few interactive capabilities in matplotlib (e.g. legend.draggable()), but they tend to be scattered and are not available for all artists. This MEP seeks to unify the interactive interface and make it work for all artists. The current MEP also includes grab handles for resizing artists, and appropriate boxes drawn when artists are moved or resized. ## Implementation - Add appropriate methods to the \"tree\" of artists so that the interactivity manager has a consistent interface for the interactivity manager to deal with. The proposed methods to add to the artists, if they are to support interactivity, are: - get_pixel_position_ll(self): get the pixel position of the lower left corner of the artist\'s bounding box - get_pixel_size(self): get the size of the artist\'s bounding box, in pixels - set_pixel_position_and_size(self,x,y,dx,dy): set the new size of the artist, such that it fits within the specified bounding box. - add capability to the backends to 1) provide cursors, since these are needed for visual indication of moving/resizing, and 2) provide a function that gets the current mouse position - Implement the manager. This has already been done privately (by dhyams) as a mixin, and has been tested quite a bit. The goal would be to move the functionality of the manager into the artists so that it is in matplotlib properly, and not as a \"monkey patch\" as I currently have it coded. ## Current summary of the mixin (Note that this mixin is for now just private code, but can be added to a branch obviously) InteractiveArtistMixin: Mixin class to make any generic object that is drawn on a matplotlib canvas moveable and possibly resizeable. The Powerpoint model is followed as closely as possible; not because I\'m enamoured with Powerpoint, but because that\'s what most people understand. An artist can also be selectable, which means that the artist will receive the on_activated() callback when double clicked. Finally, an artist can be highlightable, which means that a highlight is drawn on the artist whenever the mouse passes over. Typically, highlightable artists will also be selectable, but that is left up to the user. So, basically there are four attributes that can be set by the user on a per-artist basis: - highlightable - selectable - moveable - resizeable To be moveable (draggable) or resizeable, the object that is the target of the mixin must support the following protocols: - get_pixel_position_ll(self) - get_pixel_size(self) - set_pixel_position_and_size(self,x,y,sx,sy) Note that nonresizeable objects are free to ignore the sx and sy parameters. To be highlightable, the object that is the target of the mixin must also support the following protocol: - get_highlight(self) Which returns a list of artists that will be used to draw the highlight. If the object that is the target of the mixin is not an matplotlib artist, the following protocols must also be implemented. Doing so is usually fairly trivial, as there has to be an artist *somewhere* that is being drawn. Typically your object would just route these calls to that artist. - get_figure(self) - get_axes(self) - contains(self,event) - set_animated(self,flag) - draw(self,renderer) - get_visible(self) The following notifications are called on the artist, and the artist can optionally implement these. - on_select_begin(self) - on_select_end(self) - on_drag_begin(self) - on_drag_end(self) - on_activated(self) - on_highlight(self) - on_right_click(self,event) - on_left_click(self,event) - on_middle_click(self,event) - on_context_click(self,event) - on_key_up(self,event) - on_key_down(self,event) The following notifications are called on the canvas, if no interactive artist handles the event: - on_press(self,event) - on_left_click(self,event) - on_middle_click(self,event) - on_right_click(self,event) - on_context_click(self,event) - on_key_up(self,event) - on_key_down(self,event) The following functions, if present, can be used to modify the behavior of the interactive object: - press_filter(self,event) \# determines if the object wants to have the press event routed to it - handle_unpicked_cursor() \# can be used by the object to set a cursor as the cursor passes over the object when it is unpicked. Supports multiple canvases, maintaining a drag lock, motion notifier, and a global \"enabled\" flag per canvas. Supports fixed aspect ratio resizings by holding the shift key during the resize. Known problems: - Zorder is not obeyed during the selection/drag operations. Because of the blit technique used, I do not believe this can be fixed. The only way I can think of is to search for all artists that have a zorder greater then me, set them all to animated, and then redraw them all on top during each drag refresh. This might be very slow; need to try. - the mixin only works for wx backends because of two things: 1) the cursors are hardcoded, and 2) there is a call to wx.GetMousePosition() Both of these shortcomings are reasonably fixed by having each backend supply these things. ## Backward compatibility No problems with backward compatibility, although once this is in place, it would be appropriate to obsolete some of the existing interactive functions (like legend.draggable()) ## Alternatives None that I know of. --- # MEP10: Docstring consistency ::: {.contents local=""} ::: ## Status **Progress** This is still an on-going effort ## Branches and Pull requests ## Abstract matplotlib has a great deal of inconsistency between docstrings. This not only makes the docs harder to read, but it is harder on contributors, because they don\'t know which specifications to follow. There should be a clear docstring convention that is followed consistently. The organization of the API documentation is difficult to follow. Some pages, such as pyplot and axes, are enormous and hard to browse. There should instead be short summary tables that link to detailed documentation. In addition, some of the docstrings themselves are quite long and contain redundant information. Building the documentation takes a long time and uses a `make.py`{.interpreted-text role="file"} script rather than a Makefile. ## Detailed description There are number of new tools and conventions available since matplotlib started using Sphinx that make life easier. The following is a list of proposed changes to docstrings, most of which involve these new features. ### Numpy docstring format [Numpy docstring format](https://numpydoc.readthedocs.io/en/stable/format.html): This format divides the docstring into clear sections, each having different parsing rules that make the docstring easy to read both as raw text and as HTML. We could consider alternatives, or invent our own, but this is a strong choice, as it\'s well used and understood in the Numpy/Scipy community. ### Cross references Most of the docstrings in matplotlib use explicit \"roles\" when linking to other items, for example: `` :func:`myfunction ``[. As of Sphinx 0.4, there is a \"default_role\" that can be set to \"obj\", which will polymorphically link to a Python object of any type. This allows one to write ]{.title-ref}`myfunction`[ instead. This makes docstrings much easier to read and edit as raw text. Additionally, Sphinx allows for setting a current module, so links like ]{.title-ref}`~matplotlib.axes.Axes.set_xlim`[ could be written as ]{.title-ref}`~axes.Axes.set_xlim`\`. ### Overriding signatures Many methods in matplotlib use the `*args` and `**kwargs` syntax to dynamically handle the keyword arguments that are accepted by the function, or to delegate on to another function. This, however, is often not useful as a signature in the documentation. For this reason, many matplotlib methods include something like: def annotate(self, *args, **kwargs): """ Create an annotation: a piece of text referring to a data point. Call signature:: annotate(s, xy, xytext=None, xycoords='data', textcoords='data', arrowprops=None, **kwargs) """ This can\'t be parsed by Sphinx, and is rather verbose in raw text. As of Sphinx 1.1, if the `autodoc_docstring_signature` config value is set to True, Sphinx will extract a replacement signature from the first line of the docstring, allowing this: def annotate(self, *args, **kwargs): """ annotate(s, xy, xytext=None, xycoords='data', textcoords='data', arrowprops=None, **kwargs) Create an annotation: a piece of text referring to a data point. """ The explicit signature will replace the actual Python one in the generated documentation. ### Linking rather than duplicating Many of the docstrings include long lists of accepted keywords by interpolating things into the docstring at load time. This makes the docstrings very long. Also, since these tables are the same across many docstrings, it inserts a lot of redundant information in the docs \-- particularly a problem in the printed version. These tables should be moved to docstrings on functions whose only purpose is for help. The docstrings that refer to these tables should link to them, rather than including them verbatim. ### autosummary extension The Sphinx autosummary extension should be used to generate summary tables, that link to separate pages of documentation. Some classes that have many methods (e.g. [\~.axes.Axes]{.title-ref}) should be documented with one method per page, whereas smaller classes should have all of their methods together. ### Examples linking to relevant documentation The examples, while helpful at illustrating how to use a feature, do not link back to the relevant docstrings. This could be addressed by adding module-level docstrings to the examples, and then including that docstring in the parsed content on the example page. These docstrings could easily include references to any other part of the documentation. ### Documentation using help() vs. a browser Using Sphinx markup in the source allows for good-looking docs in your browser, but the markup also makes the raw text returned using help() look terrible. One of the aims of improving the docstrings should be to make both methods of accessing the docs look good. ## Implementation 1. The numpydoc extensions should be turned on for matplotlib. There is an important question as to whether these should be included in the matplotlib source tree, or used as a dependency. Installing Numpy is not sufficient to get the numpydoc extensions \-- it\'s a separate install procedure. In any case, to the extent that they require customization for our needs, we should endeavor to submit those changes upstream and not fork them. 2. Manually go through all of the docstrings and update them to the new format and conventions. Updating the cross references (from `` `:func:`myfunc ``[ to ]{.title-ref}`func`\`) may be able to be semi-automated. This is a lot of busy work, and perhaps this labor should be divided on a per-module basis so no single developer is over-burdened by it. 3. Reorganize the API docs using autosummary and `sphinx-autogen`. This should hopefully have minimal impact on the narrative documentation. 4. Modify the example page generator (`gen_rst.py`{.interpreted-text role="file"}) so that it extracts the module docstring from the example and includes it in a non-literal part of the example page. 5. Use `sphinx-quickstart` to generate a new-style Sphinx Makefile. The following features in the current `make.py`{.interpreted-text role="file"} will have to be addressed in some other way: - Copying of some static content - Specifying a \"small\" build (only low-resolution PNG files for examples) Steps 1, 2, and 3 are interdependent. 4 and 5 may be done independently, though 5 has some dependency on 3. ## Backward compatibility As this mainly involves docstrings, there should be minimal impact on backward compatibility. ## Alternatives None yet discussed. --- # MEP11: Third-party dependencies ::: {.contents local=""} ::: This MEP attempts to improve the way in which third-party dependencies in matplotlib are handled. ## Status **Completed** \-- needs to be merged ## Branches and Pull requests #1157: Use automatic dependency resolution #1290: Debundle pyparsing #1261: Update six to 1.2 ## Abstract One of the goals of matplotlib has been to keep it as easy to install as possible. To that end, some third-party dependencies are included in the source tree and, under certain circumstances, installed alongside matplotlib. This MEP aims to resolve some problems with that approach, bring some consistency, while continuing to make installation convenient. At the time that was initially done, [setuptools](https://pypi.org/project/setuptools/), [easy_install](https://setuptools.pypa.io/en/latest/deprecated/easy_install.html) and [PyPI](https://pypi.org) were not mature enough to be relied on. However, at present, we should be able to safely leverage the \"modern\" versions of those tools, [distribute](https://pypi.org/project/distribute/) and [pip](https://pypi.org/project/pip/). While matplotlib has dependencies on both Python libraries and C/C++ libraries, this MEP addresses only the Python libraries so as to not confuse the issue. C libraries represent a larger and mostly orthogonal set of problems. ## Detailed description matplotlib depends on the following third-party Python libraries: - Numpy - dateutil (pure Python) - pytz (pure Python) - six \-- required by dateutil (pure Python) - pyparsing (pure Python) - PIL (optional) - GUI frameworks: pygtk, gobject, tkinter, PySide, PyQt4, wx (all optional, but one is required for an interactive GUI) ### Current behavior When installing from source, a `git`{.interpreted-text role="program"} checkout or [pip](https://pypi.org/project/pip/): - `setup.py`{.interpreted-text role="file"} attempts to `import numpy`. If this fails, the installation fails. - For each of [dateutil](https://pypi.org/project/python-dateutil/), [pytz](https://pypi.org/project/pytz/) and [six](https://pypi.org/project/six/), `setup.py`{.interpreted-text role="file"} attempts to import them (from the top-level namespace). If that fails, matplotlib installs its local copy of the library into the top-level namespace. - [pyparsing](https://pypi.org/project/pyparsing/) is always installed inside of the matplotlib namespace. This behavior is most surprising when used with [pip](https://pypi.org/project/pip/), because no [pip](https://pypi.org/project/pip/) dependency resolution is performed, even though it is likely to work for all of these packages. The fact that [pyparsing](https://pypi.org/project/pyparsing/) is installed in the matplotlib namespace has reportedly (#1290) confused some users into thinking it is a matplotlib-related module and import it from there rather than the top-level. When installing using the Windows installer, [dateutil](https://pypi.org/project/python-dateutil/), [pytz](https://pypi.org/project/pytz/) and [six](https://pypi.org/project/six/) are installed at the top-level *always*, potentially overwriting already installed copies of those libraries. TODO: Describe behavior with the OS-X installer. When installing using a package manager (Debian, RedHat, MacPorts etc.), this behavior actually does the right thing, and there are no special patches in the matplotlib packages to deal with the fact that we handle [dateutil](https://pypi.org/project/python-dateutil/), [pytz](https://pypi.org/project/pytz/) and [six](https://pypi.org/project/six/) in this way. However, care should be taken that whatever approach we move to continues to work in that context. Maintaining these packages in the matplotlib tree and making sure they are up-to-date is a maintenance burden. Advanced new features that may require a third-party pure Python library have a higher barrier to inclusion because of this burden. ### Desired behavior Third-party dependencies are downloaded and installed from their canonical locations by leveraging [pip](https://pypi.org/project/pip/), [distribute](https://pypi.org/project/distribute/) and [PyPI](https://pypi.org). [dateutil](https://pypi.org/project/python-dateutil/), [pytz](https://pypi.org/project/pytz/), and [pyparsing](https://pypi.org/project/pyparsing/) should be made into optional dependencies \-- though obviously some features would fail if they aren\'t installed. This will allow the user to decide whether they want to bother installing a particular feature. ## Implementation For installing from source, and assuming the user has all of the C-level compilers and dependencies, this can be accomplished fairly easily using [distribute](https://pypi.org/project/distribute/) and following the instructions [here](https://pypi.org/project/distribute/). The only anticipated change to the matplotlib library code will be to import [pyparsing](https://pypi.org/project/pyparsing/) from the top-level namespace rather than from within matplotlib. Note that [distribute](https://pypi.org/project/distribute/) will also allow us to remove the direct dependency on [six](https://pypi.org/project/six/), since it is, strictly speaking, only a direct dependency of [dateutil](https://pypi.org/project/python-dateutil/). For binary installations, there are a number of alternatives (here ordered from best/hardest to worst/easiest): 1. The distutils wininst installer allows a post-install script to run. It might be possible to get this script to run [pip](https://pypi.org/project/pip/) to install the other dependencies. (See [this thread](https://mail.python.org/pipermail/distutils-sig/2010-September/016857.html) for someone who has trod that ground before). 2. Continue to ship [dateutil](https://pypi.org/project/python-dateutil/), [pytz](https://pypi.org/project/pytz/), [six](https://pypi.org/project/six/) and [pyparsing](https://pypi.org/project/pyparsing/) in our installer, but use the post-install-script to install them *only* if they cannot already be found. 3. Move all of these packages inside a (new) `matplotlib.extern` namespace so it is clear for outside users that these are external packages. Add some conditional imports in the core matplotlib codebase so [dateutil](https://pypi.org/project/python-dateutil/) (at the top-level) is tried first, and failing that `matplotlib.extern.dateutil` is used. 2 and 3 are undesirable as they still require maintaining copies of these packages in our tree \-- and this is exacerbated by the fact that they are used less \-- only in the binary installers. None of these 3 approaches address Numpy, which will still have to be manually installed using an installer. TODO: How does this relate to the Mac OS-X installer? ## Backward compatibility At present, matplotlib can be installed from source on a machine without the third party dependencies and without an internet connection. After this change, an internet connection (and a working PyPI) will be required to install matplotlib for the first time. (Subsequent matplotlib updates or development work will run without accessing the network). ## Alternatives Distributing binary eggs doesn\'t feel like a usable solution. That requires getting [easy_install](https://setuptools.pypa.io/en/latest/deprecated/easy_install.html) installed first, and Windows users generally prefer the well known `.exe` or `.msi` installer that works out of the box. --- # MEP12: Improve Gallery and Examples ::: {.contents local=""} ::: ## Status **Progress** Initial changes added in 1.3. Conversion of the gallery is on-going. 29 September 2015 - The last `pylab_examples` where `pylab` is imported has been converted over to use `matplotlib.pyplot`{.interpreted-text role="mod"} and [numpy]{.title-ref}. ## Branches and Pull requests #1623, #1924, #2181 PR [#2474](https://github.com/matplotlib/matplotlib/pull/2474) demonstrates a single example being cleaned up and moved to the appropriate section. ## Abstract Reorganizing the matplotlib plot gallery would greatly simplify navigation of the gallery. In addition, examples should be cleaned-up and simplified for clarity. ## Detailed description The matplotlib gallery was recently set up to split examples up into sections. As discussed in that PR[^1], the current example sections (`api`, `pylab_examples`) aren\'t terribly useful to users: New sections in the gallery would help users find relevant examples. These sections would also guide a cleanup of the examples: Initially, all the current examples would remain and be listed under their current directories. Over time, these examples could be cleaned up and moved into one of the new sections. This process allows users to easily identify examples that need to be cleaned up; i.e. anything in the `api` and `pylab_examples` directories. ## Implementation 1. Create new gallery sections. \[Done\] 2. Clean up examples and move them to the new gallery sections (over the course of many PRs and with the help of many users/developers). \[In progress\] ### Gallery sections The naming of sections is critical and will guide the clean-up effort. The current sections are: - Lines, bars, and markers (more-or-less 1D data) - Shapes and collections - Statistical plots - Images, contours, and fields - Pie and polar charts: Round things - Color - Text, labels, and annotations - Ticks and spines - Subplots, axes, and figures - Specialty plots (e.g., sankey, radar, tornado) - Showcase (plots with tweaks to make them publication-quality) - separate sections for toolboxes (already exists: \'mplot3d\', \'axes_grid\', \'units\', \'widgets\') These names are certainly up for debate. As these sections grow, we should reevaluate them and split them up as necessary. ### Clean up guidelines The current examples in the `api` and `pylab_examples` sections of the gallery would remain in those directories until they are cleaned up. After clean-up, they would be moved to one of the new gallery sections described above. \"Clean-up\" should involve: - [sphinx-gallery docstrings](https://sphinx-gallery.readthedocs.io/en/latest/): a title and a description of the example formatted as follows, at the top of the example: """ =============================== Colormaps alter your perception =============================== Here I plot the function .. math:: f(x, y) = \sin(x) + \cos(y) with different colormaps. Look at how colormaps alter your perception! """ - [PEP8](https://www.python.org/dev/peps/pep-0008/) clean-ups (running [flake8](https://pypi.org/project/flake8/), or a similar checker, is highly recommended) - Commented-out code should be removed. - Replace uses of [pylab]{.title-ref} interface with [.pyplot]{.title-ref} (+ [numpy]{.title-ref}, etc.). See [c25ef1e](https://github.com/tonysyu/matplotlib/commit/c25ef1e02b3a0ecb279492409dac0de9b3d2c0e2) - Remove shebang line, e.g.: #!/usr/bin/env python - Use consistent imports. In particular: import numpy as np import matplotlib.pyplot as plt Avoid importing specific functions from these modules (e.g. `from numpy import sin`) - Each example should focus on a specific feature (excluding `showcase` examples, which will show more \"polished\" plots). Tweaking unrelated to that feature should be removed. See [f7b2217](https://github.com/tonysyu/matplotlib/commit/f7b2217a1f92343e8aca0684d19c9915cc2e8674), [e57b5fc](https://github.com/tonysyu/matplotlib/commit/e57b5fc31fbad83ed9c43c77ef15368efdcb9ec1), and [1458aa8](https://github.com/tonysyu/matplotlib/commit/1458aa87c5eae9dd99e141956a6adf7a0f3c6707) Use of [pylab]{.title-ref} should be demonstrated/discussed on a dedicated help page instead of the gallery examples. **Note:** When moving an existing example, you should search for references to that example. For example, the API documentation for `axes.py`{.interpreted-text role="file"} and `pyplot.py`{.interpreted-text role="file"} may use these examples to generate plots. Use your favorite search tool (e.g., grep, ack, [grin](https://pypi.org/project/grin/), [pss](https://pypi.org/project/pss/)) to search the matplotlib package. See [2dc9a46](https://github.com/tonysyu/matplotlib/commit/2dc9a4651e5e566afc0866c603aa8d06aaf32b71) and [aa6b410](https://github.com/tonysyu/matplotlib/commit/aa6b410f9fa085ccf5f4f962a6f26af5beeae7af) #### Additional suggestions - Provide links (both ways) between examples and API docs for the methods/objects used. (issue [#2222](https://github.com/matplotlib/matplotlib/issues/2222)) - Use `plt.subplots` (note trailing \"s\") in preference over `plt.subplot`. - Rename the example to clarify it\'s purpose. For example, the most basic demo of `imshow` might be `imshow_demo.py`, and one demonstrating different interpolation settings would be `imshow_demo_interpolation.py` (*not* `imshow_demo2.py`). - Split up examples that try to do too much. See [5099675](https://github.com/tonysyu/matplotlib/commit/509967518ce5ce5ba31edf12486ffaa344e748f2) and [fc2ab07](https://github.com/tonysyu/matplotlib/commit/fc2ab07cc586abba4c024d8c0d841c4357a3936f) - Delete examples that don\'t show anything new. - Some examples exercise esoteric features for unit testing. These tweaks should be moved out of the gallery to an example in the `unit` directory located in the root directory of the package. - Add plot titles to clarify intent of the example. See [bd2b13c](https://github.com/tonysyu/matplotlib/commit/bd2b13c54bf4aa2058781b9a805d68f2feab5ba5) ## Backward compatibility The website for each Matplotlib version is readily accessible, so users who want to refer to old examples can still do so. ## Alternatives ### Tags Tagging examples will also help users search the example gallery. Although tags would be a big win for users with specific goals, the plot gallery will remain the entry point to these examples, and sections could really help users navigate the gallery. Thus, tags are complementary to this reorganization. [^1]: --- # MEP13: Use properties for Artists ::: {.contents local=""} ::: ## Status - **Discussion** ## Branches and Pull requests None ## Abstract Wrap all of the matplotlib getter and setter methods with python [properties](https://docs.python.org/3/library/functions.html#property), allowing them to be read and written like class attributes. ## Detailed description Currently matplotlib uses getter and setter functions (usually prefixed with get\_ and set\_, respectively) for reading and writing data related to classes. However, since 2.6 python supports properties, which allow such setter and getter functions to be accessed as though they were attributes. This proposal would implement all existing setter and getter methods as properties. ## Implementation 1. All existing getter and setter methods will need to have two aliases, one with the get\_ or set\_ prefix and one without. Getter methods that currently lack prefixes should be recording in a text file. 2. Classes should be reorganized so setter and getter methods are sequential in the code, with getter methods first. 3. Getter and setter methods that provide additional optional arguments should have those arguments accessible in another manner, either as additional getter or setter methods or attributes of other classes. If those classes are not accessible, getters for them should be added. 4. Property decorators will be added to the setter and getter methods without the prefix. Those with the prefix will be marked as deprecated. 5. Docstrings will need to be rewritten so the getter with the prefix has the current docstring and the getter without the prefix has a generic docstring appropriate for an attribute. 6. Automatic alias generation will need to be modified so it will also create aliases for the properties. 7. All instances of getter and setter method calls will need to be changed to attribute access. 8. All setter and getter aliases with prefixes will be removed The following steps can be done simultaneously: 1, 2, and 3; 4 and 5; 6 and 7. Only the following steps must be done in the same release: 4, 5, and 6. All other changes can be done in separate releases. 8 should be done several macro releases after everything else. ## Backward compatibility All existing getter methods that do not have a prefix (such as get\_) will need to be changed from function calls to attribute access. In most cases this will only require removing the parenthesis. setter and getter methods that have additional optional arguments will need to have those arguments implemented in another way, either as a separate property in the same class or as attributes or properties of another class. Cases where the setter returns a value will need to be changed to using the setter followed by the getter. Cases where there are set_ATTR_on() and set_ATTR_off() methods will be changed to ATTR_on properties. ## Examples ### axes.Axes.set_axis_off/set_axis_on Current implementation: : axes.Axes.set_axis_off() axes.Axes.set_axis_on() New implementation: : True = axes.Axes.axis_on False = axes.Axes.axis_on axes.Axes.axis_on = True axes.Axes.axis_on = False ### axes.Axes.get_xlim/set_xlim and get_autoscalex_on/set_autoscalex_on Current implementation: : [left, right] = axes.Axes.get_xlim() auto = axes.Axes.get_autoscalex_on() [left, right] = axes.Axes.set_xlim(left=left, right=right, emit=emit, auto=auto) [left, right] = axes.Axes.set_xlim(left=left, right=None, emit=emit, auto=auto) [left, right] = axes.Axes.set_xlim(left=None, right=right, emit=emit, auto=auto) [left, right] = axes.Axes.set_xlim(left=left, emit=emit, auto=auto) [left, right] = axes.Axes.set_xlim(right=right, emit=emit, auto=auto) axes.Axes.set_autoscalex_on(auto) New implementation: : [left, right] = axes.Axes.axes_xlim auto = axes.Axes.autoscalex_on axes.Axes.axes_xlim = [left, right] axes.Axes.axes_xlim = [left, None] axes.Axes.axes_xlim = [None, right] axes.Axes.axes_xlim[0] = left axes.Axes.axes_xlim[1] = right axes.Axes.autoscalex_on = auto axes.Axes.emit_xlim = emit ### axes.Axes.get_title/set_title Current implementation: : string = axes.Axes.get_title() axes.Axes.set_title(string, fontdict=fontdict, **kwargs) New implementation: : string = axes.Axes.title string = axes.Axes.title_text.text text.Text = axes.Axes.title_text text.Text. = attribute text.Text.fontdict = fontdict axes.Axes.title = string axes.Axes.title = text.Text axes.Axes.title_text = string axes.Axes.title_text = text.Text ### axes.Axes.get_xticklabels/set_xticklabels Current implementation: : [text.Text] = axes.Axes.get_xticklabels() [text.Text] = axes.Axes.get_xticklabels(minor=False) [text.Text] = axes.Axes.get_xticklabels(minor=True) [text.Text] = axes.Axes.([string], fontdict=None, **kwargs) [text.Text] = axes.Axes.([string], fontdict=None, minor=False, **kwargs) [text.Text] = axes.Axes.([string], fontdict=None, minor=True, **kwargs) New implementation: : [text.Text] = axes.Axes.xticklabels [text.Text] = axes.Axes.xminorticklabels axes.Axes.xticklabels = [string] axes.Axes.xminorticklabels = [string] axes.Axes.xticklabels = [text.Text] axes.Axes.xminorticklabels = [text.Text] ## Alternatives Instead of using decorators, it is also possible to use the property function. This would change the procedure so that all getter methods that lack a prefix will need to be renamed or removed. This makes handling docstrings more difficult and harder to read. It is not necessary to deprecate the setter and getter methods, but leaving them in will complicate the code. This could also serve as an opportunity to rewrite or even remove automatic alias generation. Another alternate proposal: Convert `set_xlim`, `set_xlabel`, `set_title`, etc. to `xlim`, `xlabel`, `title`,\... to make the transition from `plt` functions to `axes` methods significantly simpler. These would still be methods, not properties, but it\'s still a great usability enhancement while retaining the interface. --- # MEP14: Text handling ::: {.contents local=""} ::: ## Status - **Discussion** ## Branches and Pull requests Issue #253 demonstrates a bug where using the bounding box rather than the advance width of text results in misaligned text. This is a minor point in the grand scheme of things, but it should be addressed as part of this MEP. ## Abstract By reorganizing how text is handled, this MEP aims to: - improve support for Unicode and non-ltr languages - improve text layout (especially multi-line text) - allow support for more fonts, especially non-Apple-format TrueType fonts and OpenType fonts. - make the font configuration easier and more transparent ## Detailed description **Text layout** At present, matplotlib has two different ways to render text: \"built-in\" (based on FreeType and our own Python code), and \"usetex\" (based on calling out to a TeX installation). Adjunct to the \"built-in\" renderer there is also the Python-based \"mathtext\" system for rendering mathematical equations using a subset of the TeX language without having a TeX installation available. Support for these two engines in strewn about many source files, including every backend, where one finds clauses like : if rcParams['text.usetex']: # do one thing else: # do another Adding a third text rendering approach (more on that later) would require editing all of these places as well, and therefore doesn\'t scale. Instead, this MEP proposes adding a concept of \"text engines\", where the user could select one of many different approaches for rendering text. The implementations of each of these would be localized to their own set of modules, and not have little pieces around the whole source tree. Why add more text rendering engines? The \"built-in\" text rendering has a number of shortcomings. - It only handles right-to-left languages, and doesn\'t handle many special features of Unicode, such as combining diacriticals. - The multiline support is imperfect and only supports manual line-breaking \-- it cannot break up a paragraph into lines of a certain length. - It also does not handle inline formatting changes in order to support something like Markdown, reStructuredText or HTML. (Though rich-text formatting is contemplated in this MEP, since we want to make sure this design allows it, the specifics of a rich-text formatting implementation is outside of the scope of this MEP.) Supporting these things is difficult, and is the \"full-time job\" of a number of other projects: - [pango](https://github.com/GNOME/pango)/[harfbuzz](https://github.com/harfbuzz/harfbuzz) - [QtTextLayout](https://doc.qt.io/archives/qt-4.8/qtextlayout.html) - [Microsoft DirectWrite](https://docs.microsoft.com/en-ca/windows/win32/directwrite/introducing-directwrite) - [Apple Core Text](https://developer.apple.com/library/archive/documentation/StringsTextFonts/Conceptual/CoreText_Programming/Overview/Overview.html) Of the above options, it should be noted that [harfbuzz](https://github.com/harfbuzz/harfbuzz) is designed from the start as a cross platform option with minimal dependencies, so therefore is a good candidate for a single option to support. Additionally, for supporting rich text, we could consider using [WebKit](https://webkit.org/), and possibly whether than represents a good single cross-platform option. Again, however, rich text formatting is outside of the scope of this project. Rather than trying to reinvent the wheel and add these features to matplotlib\'s \"built-in\" text renderer, we should provide a way to leverage these projects to get more powerful text layout. The \"built-in\" renderer will still need to exist for reasons of ease of installation, but its feature set will be more limited compared to the others. \[TODO: This MEP should clearly decide what those limited features are, and fix any bugs to bring the implementation into a state of working correctly in all cases that we want it to work. I know \@leejjoon has some thoughts on this.\] **Font selection** Going from an abstract description of a font to a file on disk is the task of the font selection algorithm \-- it turns out to be much more complicated than it seems at first. The \"built-in\" and \"usetex\" renderers have very different ways of handling font selection, given their different technologies. TeX requires the installation of TeX-specific font packages, for example, and cannot use TrueType fonts directly. Unfortunately, despite the different semantics for font selection, the same set of font properties are used for each. This is true of both the [.FontProperties]{.title-ref} class and the font-related [.rcParams]{.title-ref} (which basically share the same code underneath). Instead, we should define a core set of font selection parameters that will work across all text engines, and have engine-specific configuration to allow the user to do engine-specific things when required. For example, it is possible to directly select a font by name in the \"built-in\" using `font.family`{.interpreted-text role="rc"}, but the same is not possible with \"usetex\". It may be possible to make it easier to use TrueType fonts by using XeTeX, but users will still want to use the traditional metafonts through TeX font packages. So the issue still stands that different text engines will need engine-specific configuration, and it should be more obvious to the user which configuration will work across text engines and which are engine-specific. Note that even excluding \"usetex\", there are different ways to find fonts. The default is to use the font list cache in `.font_manager`{.interpreted-text role="mod"} which matches fonts using our own algorithm based on the [CSS font matching algorithm](http://www.w3.org/TR/CSS2/fonts.html#algorithm). It doesn\'t always do the same thing as the native font selection algorithms on Linux ([fontconfig](https://www.freedesktop.org/wiki/Software/fontconfig/)), Mac and Windows, and it doesn\'t always find all of the fonts on the system that the OS would normally pick up. However, it is cross-platform, and always finds the fonts that ship with matplotlib. The Cairo and MacOSX backends (and presumably a future HTML5-based backend) currently bypass this mechanism and use the OS-native ones. The same is true when not embedding fonts in SVG, PS or PDF files and opening them in a third-party viewer. A downside there is that (at least with Cairo, need to confirm with MacOSX) they don\'t always find the fonts we ship with matplotlib. (It may be possible to add the fonts to their search path, though, or we may need to find a way to install our fonts to a location the OS expects to find them). There are also special modes in the PS and PDF to only use the core fonts that are always available to those formats. There, the font lookup mechanism must only match against those fonts. It is unclear whether the OS-native font lookup systems can handle this case. There is also experimental support for using [fontconfig](https://www.freedesktop.org/wiki/Software/fontconfig/) for font selection in matplotlib, turned off by default. fontconfig is the native font selection algorithm on Linux, but is also cross platform and works well on the other platforms (though obviously is an additional dependency there). Many of the text layout libraries proposed above (pango, QtTextLayout, DirectWrite and CoreText etc.) insist on using the font selection library from their own ecosystem. All of the above seems to suggest that we should move away from our self-written font selection algorithm and use the native APIs where possible. That\'s what Cairo and MacOSX backends already want to use, and it will be a requirement of any complex text layout library. On Linux, we already have the bones of a [fontconfig](https://www.freedesktop.org/wiki/Software/fontconfig/) implementation (which could also be accessed through pango). On Windows and Mac we may need to write custom wrappers. The nice thing is that the API for font lookup is relatively small, and essentially consist of \"given a dictionary of font properties, give me a matching font file\". **Font subsetting** Font subsetting is currently handled using ttconv. ttconv was a standalone commandline utility for converting TrueType fonts to subsetted Type 3 fonts (among other features) written in 1995, which matplotlib (well, I) forked in order to make it work as a library. It only handles Apple-style TrueType fonts, not ones with the Microsoft (or other vendor) encodings. It doesn\'t handle OpenType fonts at all. This means that even though the STIX fonts come as .otf files, we have to convert them to .ttf files to ship them with matplotlib. The Linux packagers hate this \-- they\'d rather just depend on the upstream STIX fonts. ttconv has also been shown to have a few bugs that have been difficult to fix over time. Instead, we should be able to use FreeType to get the font outlines and write our own code (probably in Python) to output subsetted fonts (Type 3 on PS and PDF and paths on SVG). Freetype, as a popular and well-maintained project, handles a wide variety of fonts in the wild. This would remove a lot of custom C code, and remove some code duplication between backends. Note that subsetting fonts this way, while the easiest route, does lose the hinting in the font, so we will need to continue, as we do now, provide a way to embed the entire font in the file where possible. Alternative font subsetting options include using the subsetting built-in to Cairo (not clear if it can be used without the rest of Cairo), or using [fontforge](https://fontforge.org) (which is a heavy and not terribly cross-platform dependency). **Freetype wrappers** Our FreeType wrapper could really use a reworking. It defines its own image buffer class (when a Numpy array would be easier). While FreeType can handle a huge diversity of font files, there are limitations to our wrapper that make it much harder to support non-Apple-vendor TrueType files, and certain features of OpenType files. (See #2088 for a terrible result of this, just to support the fonts that ship with Windows 7 and 8). I think a fresh rewrite of this wrapper would go a long way. **Text anchoring and alignment and rotation** The handling of baselines was changed in 1.3.0 such that the backends are now given the location of the baseline of the text, not the bottom of the text. This is probably the correct behavior, and the MEP refactoring should also follow this convention. In order to support alignment on multi-line text, it should be the responsibility of the (proposed) text engine to handle text alignment. For a given chunk of text, each engine calculates a bounding box for that text and the offset of the anchor point within that box. Therefore, if the va of a block was \"top\", the anchor point would be at the top of the box. Rotating of text should always be around the anchor point. I\'m not sure that lines up with current behavior in matplotlib, but it seems like the sanest/least surprising choice. \[This could be revisited once we have something working\]. Rotation of text should not be handled by the text engine \-- that should be handled by a layer between the text engine and the rendering backend so it can be handled in a uniform way. \[I don\'t see any advantage to rotation being handled by the text engines individually\...\] There are other problems with text alignment and anchoring that should be resolved as part of this work. \[TODO: enumerate these\]. **Other minor problems to fix** The mathtext code has backend-specific code \-- it should instead provide its output as just another text engine. However, it\'s still desirable to have mathtext layout inserted as part of a larger layout performed by another text engine, so it should be possible to do this. It\'s an open question whether embedding the text layout of an arbitrary text engine in another should be possible. The text mode is currently set by a global rcParam (\"text.usetex\") so it\'s either all on or all off. We should continue to have a global rcParam to choose the text engine (\"text.layout_engine\"), but it should under the hood be an overridable property on the [.Text]{.title-ref} object, so the same figure can combine the results of multiple text layout engines if necessary. ## Implementation A concept of a \"text engine\" will be introduced. Each text engine will implement a number of abstract classes. The `TextFont` interface will represent text for a given set of font properties. It isn\'t necessarily limited to a single font file \-- if the layout engine supports rich text, it may handle a number of font files in a family. Given a `TextFont` instance, the user can get a `TextLayout` instance, which represents the layout for a given string of text in a given font. From a `TextLayout`, an iterator over `TextSpan`s is returned so the engine can output raw editable text using as few spans as possible. If the engine would rather get individual characters, they can be obtained from the `TextSpan` instance: class TextFont(TextFontBase): def __init__(self, font_properties): """ Create a new object for rendering text using the given font properties. """ pass def get_layout(self, s, ha, va): """ Get the TextLayout for the given string in the given font and the horizontal (left, center, right) and verticalalignment (top, center, baseline, bottom) """ pass class TextLayout(TextLayoutBase): def get_metrics(self): """ Return the bounding box of the layout, anchored at (0, 0). """ pass def get_spans(self): """ Returns an iterator over the spans of different in the layout. This is useful for backends that want to editable raw text as individual lines. For rich text where the font may change, each span of different font type will have its own span. """ pass def get_image(self): """ Returns a rasterized image of the text. Useful for raster backends, like Agg. In all likelihood, this will be overridden in the backend, as it can be created from get_layout(), but certain backends may want to override it if their library provides it (as freetype does). """ pass def get_rectangles(self): """ Returns an iterator over the filled black rectangles in the layout. Used by TeX and mathtext for drawing, for example, fraction lines. """ pass def get_path(self): """ Returns a single Path object of the entire laid out text. [Not strictly necessary, but might be useful for textpath functionality] """ pass class TextSpan(TextSpanBase): x, y # Position of the span -- relative to the text layout as a whole # where (0, 0) is the anchor. y is the baseline of the span. fontfile # The font file to use for the span text # The text content of the span def get_path(self): pass # See TextLayout.get_path def get_chars(self): """ Returns an iterator over the characters in the span. """ pass class TextChar(TextCharBase): x, y # Position of the character -- relative to the text layout as # a whole, where (0, 0) is the anchor. y is in the baseline # of the character. codepoint # The unicode code point of the character -- only for informational # purposes, since the mapping of codepoint to glyph_id may have been # handled in a complex way by the layout engine. This is an int # to avoid problems on narrow Unicode builds. glyph_id # The index of the glyph within the font fontfile # The font file to use for the char def get_path(self): """ Get the path for the character. """ pass Graphic backends that want to output subset of fonts would likely build up a file-global dictionary of characters where the keys are (fontname, glyph_id) and the values are the paths so that only one copy of the path for each character will be stored in the file. Special casing: The \"usetex\" functionality currently is able to get Postscript directly from TeX to insert directly in a Postscript file, but for other backends, parses a DVI file and generates something more abstract. For a case like this, `TextLayout` would implement `get_spans` for most backends, but add `get_ps` for the Postscript backend, which would look for the presence of this method and use it if available, or fall back to `get_spans`. This kind of special casing may also be necessary, for example, when the graphics backend and text engine belong to the same ecosystem, e.g. Cairo and Pango, or MacOSX and CoreText. There are three main pieces to the implementation: 1) Rewriting the freetype wrapper, and removing ttconv. a) Once (1) is done, as a proof of concept, we can move to the upstream STIX .otf fonts b) Add support for web fonts loaded from a remote URL. (Enabled by using freetype for font subsetting). 2) Refactoring the existing \"builtin\" and \"usetex\" code into separate text engines and to follow the API outlined above. 3) Implementing support for advanced text layout libraries. \(1\) and (2) are fairly independent, though having (1) done first will allow (2) to be simpler. (3) is dependent on (1) and (2), but even if it doesn\'t get done (or is postponed), completing (1) and (2) will make it easier to move forward with improving the \"builtin\" text engine. ## Backward compatibility The layout of text with respect to its anchor and rotation will change in hopefully small, but improved, ways. The layout of multiline text will be much better, as it will respect horizontal alignment. The layout of bidirectional text or other advanced Unicode features will now work inherently, which may break some things if users are currently using their own workarounds. Fonts will be selected differently. Hacks that used to sort of work between the \"builtin\" and \"usetex\" text rendering engines may no longer work. Fonts found by the OS that weren\'t previously found by matplotlib may be selected. ## Alternatives TBD --- # MEP15: Fix axis autoscaling when limits are specified for one axis only ::: {.contents local=""} ::: ## Status **Discussion** ## Branches and Pull requests None so far. ## Abstract When one Axis of a 2-dimensional plot is overridden via [\~.Axes.set_xlim]{.title-ref} or [\~.Axes.set_ylim]{.title-ref}, automatic scaling of the remaining Axis should be based on the data that falls within the specified limits of the first Axis. ## Detailed description When axis limits for a 2-D plot are specified for one axis only (via [\~.Axes.set_xlim]{.title-ref} or [\~.Axes.set_ylim]{.title-ref}), matplotlib currently does not currently rescale the other axis. The result is that the displayed curves or symbols may be compressed into a tiny portion of the available area, so that the final plot conveys much less information than it would with appropriate axis scaling. The proposed change of behavior would make matplotlib choose the scale for the remaining axis using only the data that falls within the limits for the axis where limits were specified. ## Implementation I don\'t know enough about the internals of matplotlib to be able to suggest an implementation. ## Backward compatibility From the standpoint of software interfaces, there would be no break in backward compatibility. Some outputs would be different, but if the user truly desires the previous behavior, he/she can achieve this by overriding the axis scaling for both axes. ## Alternatives The only alternative that I can see is to maintain the status quo. --- # MEP19: Continuous Integration ## Status **Completed** ## Branches and Pull requests ## Abstract matplotlib could benefit from better and more reliable continuous integration, both for testing and building installers and documentation. ## Detailed description ### Current state-of-the-art **Testing** matplotlib currently uses Travis-CI for automated tests. While Travis-CI should be praised for how much it does as a free service, it has a number of shortcomings: - It often fails due to network timeouts when installing dependencies. - It often fails for inexplicable reasons. - build or test products can only be saved from build off of branches on the main repo, not pull requests, so it is often difficult to \"post mortem\" analyse what went wrong. This is particularly frustrating when the failure cannot be subsequently reproduced locally. - It is not extremely fast. matplotlib\'s cpu and memory requirements for testing are much higher than the average Python project. - It only tests on Ubuntu Linux, and we have only minimal control over the specifics of the platform. It can be upgraded at any time outside of our control, causing unexpected delays at times that may not be convenient in our release schedule. On the plus side, Travis-CI\'s integration with github \-- automatically testing all pending pull requests \-- is exceptional. **Builds** There is no centralized effort for automated binary builds for matplotlib. However, the following disparate things are being done \[If the authors mentioned here could fill in detail, that would be great!\]: - \@sandrotosi: builds Debian packages - \@takluyver: Has automated Ubuntu builds on Launchpad - \@cgohlke: Makes Windows builds (don\'t know how automated that is) - \@r-owen: Makes OS-X builds (don\'t know how automated that is) **Documentation** Documentation of main is now built by travis and uploaded to \@NelleV, I believe, generates the docs automatically and posts them on the web to chart MEP10 progress. ### Peculiarities of matplotlib matplotlib has complex requirements that make testing and building more taxing than many other Python projects. - The CPU time to run the tests is quite high. It puts us beyond the free accounts of many CI services (e.g. ShiningPanda) - It has a large number of dependencies, and testing the full matrix of all combinations is impractical. We need to be clever about what space we test and guarantee to support. ### Requirements This section outlines the requirements that we would like to have. 1. Testing all pull requests by hooking into the GitHub API, as Travis-CI does 2. Testing on all major platforms: Linux, Mac OS-X, MS Windows (in that order of priority, based on user survey) 3. Retain the last n days worth of build and test products, to aid in post-mortem debugging. 4. Automated nightly binary builds, so that users can test the bleeding edge without installing a complete compilation environment. 5. Automated benchmarking. It would be nice to have a standard benchmark suite (separate from the tests) whose performance could be tracked over time, in different backends and platforms. While this is separate from building and testing, ideally it would run on the same infrastructure. 6. Automated nightly building and publishing of documentation (or as part of testing, to ensure PRs don\'t introduce documentation bugs). (This would not replace the static documentation for stable releases as a default). 7. The test systems should be manageable by multiple developers, so that no single person becomes a bottleneck. (Travis-CI\'s design does this well \-- storing build configuration in the git repository, rather than elsewhere, is a very good design.) 8. Make it easy to test a large but sparse matrix of different versions of matplotlib\'s dependencies. The matplotlib user survey provides some good data as to where to focus our efforts: 9. Nice to have: A decentralized design so that those with more obscure platforms can publish build results to a central dashboard. ## Implementation This part is yet-to-be-written. However, ideally, the implementation would be a third-party service, to avoid adding system administration to our already stretched time. As we have some donated funds, this service may be a paid one if it offers significant time-saving advantages over free offerings. ## Backward compatibility Backward compatibility is not a major concern for this MEP. We will replace current tools and procedures with something better and throw out the old. ## Alternatives ## Hangout Notes ### CI Infrastructure - We like Travis and it will probably remain part of our arsenal in any event. The reliability issues are being looked into. - Enable Amazon S3 uploads of testing products on Travis. This will help with post-mortem of failures (@mdboom is looking into this now). - We want Mac coverage. The best bet is probably to push Travis to enable it for our project by paying them for a Pro account (since they don\'t otherwise allow testing on both Linux and Mac). - We want Windows coverage. Shining Panda is an option there. - Investigate finding or building a tool that would collect and synthesize test results from a number of sources and post it to GitHub using the GitHub API. This may be of general use to the Scipy community. - For both Windows and Mac, we should document (or better yet, script) the process of setting up the machine for a build, and how to build binaries and installers. This may require getting information from Russel Owen and Christoph Gohlke. This is a necessary step for doing automated builds, but would also be valuable for a number of other reasons. ### The test framework itself - We should investigate ways to make it take less time - Eliminating redundant tests, if possible - General performance improvements to matplotlib will help - We should be covering more things, particularly more backends - We should have more unit tests, fewer integration tests, if possible --- # MEP21: color and cm refactor ::: {.contents local=""} ::: ## Status - **Discussion**: This MEP has not commenced yet, but here are some ongoing ideas which may become a part of this MEP: ## Branches and Pull requests ## Abstract - color - tidy up the namespace - Define a \"Color\" class - make it easy to convert from one color type to another `` `hex -> RGB ``[, ]{.title-ref}`RGB -> hex`[, ]{.title-ref}`HSV -> RGB`\` etc. - improve the construction of a colormap - the dictionary approach is archaic and overly complex (though incredibly powerful) - make it possible to interpolate between two or more color types in different modes, especially useful for construction of colormaps in HSV space for instance - cm - rename the module to something more descriptive - mappables? Overall, there are a lot of improvements that can be made with matplotlib color handling - managing backwards compatibility will be difficult as there are some badly named variables/modules which really shouldn\'t exist - but a clear path and message for migration should be available, with a large amount of focus on this in the API changes documentation. ## Detailed description ## Implementation ## Backward compatibility ## Alternatives --- # MEP22: Toolbar rewrite ::: {.contents local=""} ::: ## Status **Progress** ## Branches and Pull requests Previous work: - - - Pull Requests: - Removing the NavigationToolbar classes **CLOSED** - Keeping the NavigationToolbar classes **CLOSED** - Navigation by events: ## Abstract The main goal of this MEP is to make it easier to modify (add, change, remove) the way the user interacts with the figures. The user interaction with the figure is deeply integrated within the Canvas and Toolbar. Making extremely difficult to do any modification. This MEP proposes the separation of this interaction into Toolbar, Navigation and Tools to provide independent access and reconfiguration. This approach will make easier to create and share tools among users. In the far future, we can even foresee a kind of Marketplace for `Tool`s where the most popular can be added into the main distribution. ## Detailed description The reconfiguration of the Toolbar is complex, most of the time it requires a custom backend. The creation of custom Tools sometimes interferes with the Toolbar, as example see also the shortcuts are hardcoded and again not easily modifiable The proposed solution is to take the actions out of the `Toolbar` and the shortcuts out of the `Canvas`. The actions and shortcuts will be in the form of `Tool`s. A new class `Navigation` will be the bridge between the events from the `Canvas` and `Toolbar` and redirect them to the appropriate `Tool`. At the end the user interaction will be divided into three classes: - NavigationBase: This class is instantiated for each FigureManager and connect the all user interactions with the Tools - ToolbarBase: This existing class is relegated only as a GUI access to Tools. - ToolBase: Is the basic definition of Tools. ## Implementation ### ToolBase(object) Tools can have a graphical representation as the `SubplotTool` or not even be present in the Toolbar as `Quit`. The [.ToolBase]{.title-ref} has the following class attributes for configuration at definition time - keymap = None: Key(s) to be used to trigger the tool - description = \'\': Small description of the tool - image = None: Image that is used in the toolbar The following instance attributes are set at instantiation: - name - navigation #### Methods - `trigger(self, event)`: This is the main method of the Tool, it is called when the Tool is triggered by: - Toolbar button click - keypress associated with the Tool Keymap - Call to navigation.trigger_tool(name) - `set_figure(self, figure)`: Set the figure and navigation attributes - `destroy(self, *args)`: Destroy the `Tool` graphical interface (if exists) #### Available Tools - ToolQuit - ToolEnableAllNavigation - ToolEnableNavigation - ToolToggleGrid - ToolToggleFullScreen - ToolToggleYScale - ToolToggleXScale - ToolHome - ToolBack - ToolForward - SaveFigureBase - ConfigureSubplotsBase ### ToolToggleBase(ToolBase) The [.ToolToggleBase]{.title-ref} has the following class attributes for configuration at definition time - radio_group = None: Attribute to group \'radio\' like tools (mutually exclusive) - cursor = None: Cursor to use when the tool is active The **Toggleable** Tools, can capture keypress, mouse moves, and mouse button press #### Methods - `enable(self, event)`: Called by [.ToolToggleBase.trigger]{.title-ref} method - `disable(self, event)`: Called when the tool is untoggled - `toggled`: **Property** True or False #### Available Tools - ToolZoom - ToolPan ### NavigationBase Defines the following attributes: - canvas: - keypresslock: Lock to know if the `canvas` `key_press_event` is available and process it - messagelock: Lock to know if the message is available to write #### Methods (intended for the end user) - `nav_connect(self, s, func)`: Connect to navigation for events - `nav_disconnect(self, cid)`: Disconnect from navigation event - `message_event(self, message, sender=None)`: Emit a tool_message_event event - `active_toggle(self)`: **Property** The currently toggled tools or None - `get_tool_keymap(self, name)`: Return a list of keys that are associated with the tool - `set_tool_keymap(self, name,`\*keys`)`: Set the keys for the given tool - `remove_tool(self, name)`: Removes tool from the navigation control. - `add_tools(self, tools)`: Add multiple tools to `Navigation` - `add_tool(self, name, tool, group=None, position=None)`: Add a tool to the `Navigation` - `tool_trigger_event(self, name, sender=None, canvasevent=None, data=None)`: Trigger a tool and fire the event - `tools`: **Property** A dict with available tools with corresponding keymaps, descriptions and objects - `get_tool(self, name)`: Return the tool object ### ToolbarBase #### Methods (for backend implementation) - `add_toolitem(self, name, group, position, image, description, toggle)`: Add a toolitem to the toolbar. This method is a callback from `tool_added_event` (emitted by navigation) - `set_message(self, s)`: Display a message on toolbar or in status bar - `toggle_toolitem(self, name)`: Toggle the toolitem without firing event. - `remove_toolitem(self, name)`: Remove a toolitem from the `Toolbar` ## Backward compatibility For backward compatibility added \'navigation\' to the list of values supported by `toolbar`{.interpreted-text role="rc"}, that is used for `Navigation` classes instantiation instead of the NavigationToolbar classes With this parameter, it makes it transparent to anyone using the existing backends. \[@pelson comment: This also gives us an opportunity to avoid needing to implement all of this in the same PR - some backends can potentially exist without the new functionality for a short while (but it must be done at some point).\] --- # MEP23: Multiple Figures per GUI window ::: {.contents local=""} ::: ## Status **Discussion** ## Branches and Pull requests **Previous work** - **To-delete** ## Abstract Add the possibility to have multiple figures grouped under the same [\~.backend_template.FigureManager]{.title-ref} ## Detailed description Under the current structure, every canvas has its own window. This is and may continue to be the desired method of operation for most use cases. Sometimes when there are too many figures open at the same time, it is desirable to be able to group these under the same window. See `2194`{.interpreted-text role="ghpull"}. The proposed solution modifies [.FigureManagerBase]{.title-ref} to contain and manage more than one `Canvas`. The `backend.multifigure` rcParam controls when the **MultiFigure** behaviour is desired. **Note** It is important to note, that the proposed solution, assumes that the [MEP22](https://github.com/matplotlib/matplotlib/wiki/Mep22). is already in place. This is simply because the actual implementation of the `Toolbar` makes it pretty hard to switch between canvases. ## Implementation The first implementation will be done in GTK3 using a Notebook as canvas container. ### `FigureManagerBase` will add the following new methods - `add_canvas`: To add a canvas to an existing [\~.backend_template.FigureManager]{.title-ref} object - `remove_canvas`: To remove a canvas from a [\~.backend_template.FigureManager]{.title-ref} object, if it is the last one, it will be destroyed - `move_canvas`: To move a canvas from one [\~.backend_template.FigureManager]{.title-ref} to another. - `set_canvas_title`: To change the title associated with a specific canvas container - `get_canvas_title`: To get the title associated with a specific canvas container - `get_active_canvas`: To get the canvas that is in the foreground and is subject to the gui events. There is no `set_active_canvas` because the active canvas, is defined when `show` is called on a `Canvas` object. ### `new_figure_manager` To control which [\~.backend_template.FigureManager]{.title-ref} will contain the new figures, an extra optional parameter *figuremanager* will be added, this parameter value will be passed to `new_figure_manager_given_figure`. ### `new_figure_manager_given_figure` - If *figuremanager* parameter is given, this [\~.backend_template.FigureManager]{.title-ref} object will be used instead of creating a new one. - If `rcParams['backend.multifigure']` is True: The last [\~.backend_template.FigureManager]{.title-ref} object will be used instead of creating a new one. ### `NavigationBase` Modifies the `NavigationBase` to keep a list of canvases, directing the actions to the active one. ## Backward compatibility For the **MultiFigure** properties to be visible, the user has to activate them directly setting `rcParams['backend.multifigure'] = True` It should be backwards compatible for backends that adhere to the current [.FigureManagerBase]{.title-ref} structure even if they have not implemented the **MultiFigure** magic yet. ## Alternatives Instead of modifying the [.FigureManagerBase]{.title-ref} it could be possible to add a parallel class, that handles the cases where `rcParams['backend.multifigure'] = True`. This will warranty that there won\'t be any problems with custom made backends, but also makes bigger the code, and more things to maintain. --- # MEP24: Negative radius in polar plots ::: {.contents local=""} ::: ## Status *Discussion* ## Branches and Pull requests None ## Abstract It is clear that polar plots need to be able to gracefully handle negative r values (not by clipping or reflection). ## Detailed description One obvious application that we should support is bB plots (see ), but this seems more generally useful (for example growth rate as a function of angle). The assumption in the current code (as I understand it) is that the center of the graph is `r==0`, however it would be good to be able to set the center to be at any `r` (with any value less than the offset clipped). ## Implementation ## Related Issues #1730, #1603, #2203, #2133 ## Backward compatibility ## Alternatives --- # MEP25: Serialization ::: {.contents local=""} ::: ## Status **Rejected** This work is important, but this particular effort has stalled. ## Branches and Pull requests - development branches: - related pull requests: ## Abstract This MEP aims at adding a serializable `Controller` objects to act as an `Artist` managers. Users would then communicate changes to an `Artist` via a `Controller`. In this way, functionality of the `Controller` objects may be added incrementally since each `Artist` is still responsible for drawing everything. The goal is to create an API that is usable both by graphing libraries requiring high-level descriptions of figures and libraries requiring low-level interpretations. ## Detailed description Matplotlib is a core plotting engine with an API that many users already understand. It\'s difficult/impossible for other graphing libraries to (1) get a complete figure description, (2) output raw data from the figure object as the user has provided it, (3) understand the semantics of the figure objects without heuristics, and (4) give matplotlib a complete figure description to visualize. In addition, because an `Artist` has no conception of its own semantics within the figure, it\'s difficult to interact with them in a natural way. In this sense, matplotlib will adopt a standard Model-View-Controller (MVC) framework. The *Model* will be the user defined data, style, and semantics. The *Views* are the ensemble of each individual `Artist`, which are responsible for producing the final image based on the *model*. The *Controller* will be the `Controller` object managing its set of `Artist` objects. The `Controller` must be able to export the information that it\'s carrying about the figure on command, perhaps via a `to_json` method or similar. Because it would be extremely extraneous to duplicate all of the information in the model with the controller, only user-specified information (data + style) are explicitly kept. If a user wants more information (defaults) from the view/model, it should be able to query for it. - This might be annoying to do, non-specified kwargs are pulled from the rcParams object which is in turn created from reading a user specified file and can be dynamically changed at run time. I suppose we could keep a dict of default defaults and compare against that. Not clear how this will interact with the style sheet \[\[MEP26\]\] - \@tacaswell Additional Notes: - The \"raw data\" does not necessarily need to be a `list`, `ndarray`, etc. Rather, it can more abstractly just have a method to yield data when needed. - Because the `Controller` will contain extra information that users may not want to keep around, it should *not* be created by default. You should be able to both (a) instantiate a `Controller` with a figure and (b) build a figure with a `Controller`. Use Cases: - Export all necessary informat - Serializing a matplotlib figure, saving it, and being able to rerun later. - Any other source sending an appropriately formatted representation to matplotlib to open ## Examples Here are some examples of what the controllers should be able to do. 1. Instantiate a matplotlib figure from a serialized representation (e.g., JSON): : import json from matplotlib.controllers import Controller with open('my_figure') as f: o = json.load(f) c = Controller(o) fig = c.figure 2. Manage artists from the controller (e.g., Line2D): : # not really sure how this should look c.axes[0].lines[0].color = 'b' # ? 3. Export serializable figure representation: : o = c.to_json() # or... we should be able to throw a figure object in there too o = Controller.to_json(mpl_fig) ## Implementation 1. Create base `Controller` objects that are able to manage `Artist` objects (e.g., `Hist`) Comments: - initialization should happen via unpacking `**`, so we need a copy of call signature parameter for the `Artist` we\'re ultimately trying to control. Unfortunate hard-coded repetition\... - should the additional `**kwargs` accepted by each `Artist` be tracked at the `Controller` - how does a `Controller` know which artist belongs where? E.g., do we need to pass `axes` references? Progress: - A simple NB demonstrating some functionality for `Line2DController` objects: 2. Write in protocols for the `Controller` to *update* the model. Comments: - how should containers be dealt with? E.g., what happens to old patches when we re-bin a histogram? - in the link from (1), the old line is completely destroyed and redrawn, what if something is referencing it? 3. Create method by which a json object can be assembled from the `Controllers` 4. Deal with serializing the unserializable aspects of a figure (e.g., non-affine transforms?) 5. Be able to instantiate from a serialized representation 6. Reimplement the existing pyplot and Axes method, e.g. `pyplot.hist` and `Axes.hist` in terms of the new controller class. \> \@theengineer: in #2 above, what do you mean by *get updates* from each `Artist`? \^ Yup. The `Controller` *shouldn\'t* need to get updated. This just happens in #3. Delete comments when you see this. ## Backward compatibility - pickling will change - non-affine transformations will require a defined pickling method ## Alternatives PR #3150 suggested adding semantics by parasitically attaching extra containers to axes objects. This is a more complete solution with what should be a more developed/flexible/powerful framework. --- # MEP26: Artist styling ::: {.contents local=""} ::: ## Status **Rejected** ## Branches and Pull requests ## Abstract This MEP proposes a new stylesheet implementation to allow more comprehensive and dynamic styling of artists. The current version of matplotlib (1.4.0) allows stylesheets based on the rcParams syntax to be applied before creation of a plot. The methodology below proposes a new syntax, based on CSS, which would allow styling of individual artists and properties, which can be applied dynamically to existing objects. This is related to (and makes steps toward) the overall goal of moving to a DOM/tree-like architecture. ## Detailed description Currently, the look and appearance of existing artist objects (figure, axes, Line2D, etc.) can only be updated via `set_` and `get_` methods on the artist object, which is quite laborious, especially if no reference to the artist(s) has been stored. The new style sheets introduced in 1.4 allow styling before a plot is created, but do not offer any means to dynamically update plots or distinguish between artists of the same type (i.e. to specify the `line color` and `line style` separately for differing [.Line2D]{.title-ref} objects). The initial development should concentrate on allowing styling of artist primitives (those [.Artist]{.title-ref}s that do not contain other [.Artist]{.title-ref}s), and further development could expand the CSS syntax rules and parser to allow more complex styling. See the appendix for a list of primitives. The new methodology would require development of a number of steps: - A new stylesheet syntax (likely based on CSS) to allow selection of artists by type, class, id, etc. - A mechanism by which to parse a stylesheet into a tree - A mechanism by which to translate the parse-tree into something which can be used to update the properties of relevant artists. Ideally this would implement a method by which to traverse the artists in a tree-like structure. - A mechanism by which to generate a stylesheet from existing artist properties. This would be useful to allow a user to export a stylesheet from an existing figure (where the appearance may have been set using the matplotlib API)\... ## Implementation It will be easiest to allow a \'3rd party\' to modify/set the style of an artist if the \'style\' is created as a separate class and store against the artist as a property. The [.GraphicsContextBase]{.title-ref} class already provides a the basis of a `Style` class and an artist\'s [\~.Artist.draw]{.title-ref} method can be refactored to use the `Style` class rather than setting up its own [.GraphicsContextBase]{.title-ref} and transferring its style-related properties to it. A minimal example of how this could be implemented is shown here: IMO, this will also make the API and code base much neater as individual get/set methods for artist style properties are now redundant\... Indirectly related would be a general drive to replace get/set methods with properties. Implementing the style class with properties would be a big stride toward this\... For initial development, I suggest developing a syntax based on a much (much much) simplified version of CSS. I am in favour of dubbing this Artist Style Sheets :+1: : ### BNF Grammar I propose a very simple syntax to implement initially (like a proof of concept), which can be expanded upon in the future. The BNF form of the syntax is given below and then explained : RuleSet ::= SelectorSequence "{"Declaration"}" SelectorSequence :: = Selector {"," Selector} Declaration ::= propName":" propValue";" Selector ::= ArtistIdent{"#"Ident} propName ::= Ident propValue ::= Ident | Number | Colour | "None" `ArtistIdent`, `Ident`, `Number` and `Colour` are tokens (the basic building blocks of the expression) which are defined by regular expressions. ### Syntax A CSS stylesheet consists of a series of **rule sets** in hierarchical order (rules are applied from top to bottom). Each rule follows the syntax : selector {attribute: value;} Each rule can have any number of `attribute: value` pairs, and a stylesheet can have any number of rules. The initial syntax is designed only for [.Artist]{.title-ref} primitives. It does not address the question of how to set properties on [.Container]{.title-ref} types (whose properties may themselves be [.Artist]{.title-ref}s with settable properties), however, a future solution to this could simply be nested `RuleSet`s #### Selectors Selectors define the object to which the attribute updates should be applied. As a starting point, I propose just 2 selectors to use in initial development: Artist Type Selector Select an [.Artist]{.title-ref} by it\'s type. E.g [.Line2D]{.title-ref} or \`.Text\`: Line2D {attribute: value} The regex for matching the artist type selector (`ArtistIdent` in the BNF grammar) would be: ArtistIdent = r'(?P\bLine2D\b|\bText\b|\bAxesImage\b|\bFigureImage\b|\bPatch\b)' #### GID selector Select an [.Artist]{.title-ref} by its `gid`: Line2D#myGID {attribute: value} A `gid` can be any string, so the regex could be as follows: Ident = r'(?P[a-zA-Z_][a-zA-Z_0-9]*)' The above selectors roughly correspond to their CSS counterparts () #### Attributes and values - `Attributes` are any valid (settable) property for the [.Artist]{.title-ref} in question. - `Values` are any valid value for the property (Usually a string, or number). ### Parsing Parsing would consist of breaking the stylesheet into tokens (the python cookbook gives a nice tokenizing recipe on page 66), applying the syntax rules and constructing a `Tree`. This requires defining the grammar of the stylesheet (again, we can borrow from CSS) and writing a parser. Happily, there is a recipe for this in the python cookbook as well. ### Visitor pattern for matplotlib figure In order to apply the stylesheet rules to the relevant artists, we need to \'visit\' each artist in a figure and apply the relevant rule. Here is a visitor class (again, thanks to python cookbook), where each `node` would be an artist in the figure. A `visit_` method would need to be implemented for each mpl artist, to handle the different properties for each : class Visitor: def visit(self, node): name = 'visit_' + type(node).__name__ meth = getattr(self, name, None) if meth is None: raise NotImplementedError return meth(node) An `evaluator` class would then take the stylesheet rules and implement the visitor on each one of them. ## Backward compatibility Implementing a separate `Style` class would break backward compatibility as many get/set methods on an artist would become redundant. While it would be possible to alter these methods to hook into the `Style` class (stored as a property against the artist), I would be in favor of simply removing them to both neaten/simplify the codebase and to provide a simple, uncluttered API\... ## Alternatives No alternatives, but some of the ground covered here overlaps with MEP25, which may assist in this development ## Appendix ### Matplotlib primitives This will form the initial selectors which stylesheets can use. - Line2D - Text - AxesImage - FigureImage - Patch --- # MEP27: Decouple pyplot from backends ::: {.contents local=""} ::: ## Status **Progress** ## Branches and Pull requests Main PR (including GTK3): - Backend specific branch diffs: - \...OceanWolf:backend-refactor-tkagg - \...OceanWolf:backend-refactor-qt - \...backend-refactor-wx ## Abstract This MEP refactors the backends to give a more structured and consistent API, removing generic code and consolidate existing code. To do this we propose splitting: 1. `FigureManagerBase` and its derived classes into the core functionality class `FigureManager` and a backend specific class `WindowBase` and 2. `ShowBase` and its derived classes into `Gcf.show_all` and `MainLoopBase`. ## Detailed description This MEP aims to consolidate the backends API into one single uniform API, removing generic code out of the backend (which includes `_pylab_helpers` and `Gcf`), and push code to a more appropriate level in matplotlib. With this we automatically remove inconsistencies that appear in the backends, such as `FigureManagerBase.resize(w, h)` which sometimes sets the canvas, and other times set the entire window to the dimensions given, depending on the backend. Two main places for generic code appear in the classes derived from `FigureManagerBase` and `ShowBase`. 1. `FigureManagerBase` has **three** jobs at the moment: 1. The documentation describes it as a *Helper class for pyplot mode, wraps everything up into a neat bundle* 2. But it doesn\'t just wrap the canvas and toolbar, it also does all of the windowing tasks itself. The conflation of these two tasks gets seen the best in the following line: `self.set_window_title("Figure %d" % num)` This combines backend specific code `self.set_window_title(title)` with matplotlib generic code `title = "Figure %d" % num`. 3. Currently the backend specific subclass of `FigureManager` decides when to end the mainloop. This also seems very wrong as the figure should have no control over the other figures. 2. `ShowBase` has two jobs: 1. It has the job of going through all figure managers registered in `_pylab_helpers.Gcf` and telling them to show themselves. 2. And secondly it has the job of performing the backend specific `mainloop` to block the main programme and thus keep the figures from dying. ## Implementation The description of this MEP gives us most of the solution: 1. To remove the windowing aspect out of `FigureManagerBase` letting it simply wrap this new class along with the other backend classes. Create a new `WindowBase` class that can handle this functionality, with pass-through methods (:arrow_right:) to `WindowBase`. Classes that subclass `WindowBase` should also subclass the GUI specific window class to ensure backward compatibility (`manager.window == manager.window`). 2. Refactor the mainloop of `ShowBase` into `MainLoopBase`, which encapsulates the end of the loop as well. We give an instance of `MainLoop` to `FigureManager` as a key unlock the exit method (requiring all keys returned before the loop can die). Note this opens the possibility for multiple backends to run concurrently. 3. Now that `FigureManagerBase` has no backend specifics in it, to rename it to `FigureManager`, and move to a new file `backend_managers.py` noting that: 1. This allows us to break up the conversion of backends into separate PRs as we can keep the existing `FigureManagerBase` class and its dependencies intact. 2. And this also anticipates MEP22 where the new `NavigationBase` has morphed into a backend independent `ToolManager`. ----------------------------------------------------------------------------------------------- FigureManagerBase(canvas, FigureManager(figure, `WindowBase(title)` Notes num) num) --------------------------- ----------------------- ----------------------- ------------------- show show destroy calls destroy on all destroy components full_screen_toggle handles logic set_fullscreen resize resize key_press key_press get_window_title get_window_title set_window_title set_window_title \_get_toolbar A common method to all subclasses of FigureManagerBase set_default_size add_element_to_window ----------------------------------------------------------------------------------------------- --------------------------------------------- ShowBase MainLoopBase Notes -------------- -------------- --------------- mainloop begin end Gets called automagically when no more instances of the subclass exist \_\_call\_\_ Method moved to Gcf.show_all --------------------------------------------- ## Future compatibility As eluded to above when discussing MEP 22, this refactor makes it easy to add in new generic features. At the moment, MEP 22 has to make ugly hacks to each class extending from `FigureManagerBase`. With this code, this only needs to get made in the single `FigureManager` class. This also makes the later deprecation of `NavigationToolbar2` very straightforward, only needing to touch the single `FigureManager` class MEP 23 makes for another use case where this refactored code will come in very handy. ## Backward compatibility As we leave all backend code intact, only adding missing methods to existing classes, this should work seamlessly for all use cases. The only difference will lie for backends that used `FigureManager.resize` to resize the canvas and not the window, due to the standardisation of the API. I would envision that the classes made obsolete by this refactor get deprecated and removed on the same timetable as `NavigationToolbar2`, also note that the change in call signature to the `FigureCanvasWx` constructor, while backward compatible, I think the old (imho ugly style) signature should get deprecated and removed in the same manner as everything else. ----------------------------------------------------------------------- backend manager.resize(w,h) Extra ----------------------- ----------------------- ----------------------- gtk3 window Tk canvas Qt window Wx canvas FigureManagerWx had `frame` as an alias to window, so this also breaks BC. ----------------------------------------------------------------------- ## Alternatives If there were any alternative solutions to solving the same problem, they should be discussed here, along with a justification for the chosen approach. ## Questions Mdehoon: Can you elaborate on how to run multiple backends concurrently? OceanWolf: \@mdehoon, as I say, not for this MEP, but I see this MEP opens it up as a future possibility. Basically the `MainLoopBase` class acts a per backend Gcf, in this MEP it tracks the number of figures open per backend, and manages the mainloops for those backends. It closes the backend specific mainloop when it detects that no figures remain open for that backend. Because of this I imagine that with only a small amount of tweaking that we can do full-multi-backend matplotlib. No idea yet why one would want to, but I leave the possibility there in MainLoopBase. With all the backend-code specifics refactored out of `FigureManager` also aids in this, one manager to rule them (the backends) all. Mdehoon: \@OceanWolf, OK, thanks for the explanation. Having a uniform API for the backends is very important for the maintainability of matplotlib. I think this MEP is a step in the right direction. --- # MEP28: Remove Complexity from Axes.boxplot ::: {.contents local=""} ::: ## Status **Discussion** ## Branches and Pull requests The following lists any open PRs or branches related to this MEP: 1. Deprecate redundant statistical kwargs in `Axes.boxplot`: 2. Deprecate redundant style options in `Axes.boxplot`: 3. Deprecate passings 2D NumPy arrays as input: None 4. Add pre- & post-processing options to `cbook.boxplot_stats`: 5. Exposing `cbook.boxplot_stats` through `Axes.boxplot` kwargs: None 6. Remove redundant statistical kwargs in `Axes.boxplot`: None 7. Remove redundant style options in `Axes.boxplot`: None 8. Remaining items that arise through discussion: None ## Abstract Over the past few releases, the `Axes.boxplot` method has grown in complexity to support fully customizable artist styling and statistical computation. This lead to `Axes.boxplot` being split off into multiple parts. The statistics needed to draw a boxplot are computed in `cbook.boxplot_stats`, while the actual artists are drawn by `Axes.bxp`. The original method, `Axes.boxplot` remains as the most public API that handles passing the user-supplied data to `cbook.boxplot_stats`, feeding the results to `Axes.bxp`, and pre-processing style information for each facet of the boxplot plots. This MEP will outline a path forward to rollback the added complexity and simplify the API while maintaining reasonable backwards compatibility. ## Detailed description Currently, the `Axes.boxplot` method accepts parameters that allow the users to specify medians and confidence intervals for each box that will be drawn in the plot. These were provided so that advanced users could provide statistics computed in a different fashion that the simple method provided by matplotlib. However, handling this input requires complex logic to make sure that the forms of the data structure match what needs to be drawn. At the moment, that logic contains 9 separate if/else statements nested up to 5 levels deep with a for loop, and may raise up to 2 errors. These parameters were added prior to the creation of the `Axes.bxp` method, which draws boxplots from a list of dictionaries containing the relevant statistics. Matplotlib also provides a function that computes these statistics via `cbook.boxplot_stats`. Note that advanced users can now either a) write their own function to compute the stats required by `Axes.bxp`, or b) modify the output returned by `cbook.boxplots_stats` to fully customize the position of the artists of the plots. With this flexibility, the parameters to manually specify only the medians and their confidences intervals remain for backwards compatibility. Around the same time that the two roles of `Axes.boxplot` were split into `cbook.boxplot_stats` for computation and `Axes.bxp` for drawing, both `Axes.boxplot` and `Axes.bxp` were written to accept parameters that individually toggle the drawing of all components of the boxplots, and parameters that individually configure the style of those artists. However, to maintain backwards compatibility, the `sym` parameter (previously used to specify the symbol of the fliers) was retained. This parameter itself requires fairly complex logic to reconcile the `sym` parameters with the newer `flierprops` parameter at the default style specified by `matplotlibrc`. This MEP seeks to dramatically simplify the creation of boxplots for novice and advanced users alike. Importantly, the changes proposed here will also be available to downstream packages like seaborn, as seaborn smartly allows users to pass arbitrary dictionaries of parameters through the seaborn API to the underlying matplotlib functions. This will be achieved in the following way: 1. `cbook.boxplot_stats` will be modified to allow pre- and post-computation transformation functions to be passed in (e.g., `np.log` and `np.exp` for lognormally distributed data) 2. `Axes.boxplot` will be modified to also accept and naïvely pass them to `cbook.boxplots_stats` (Alt: pass the stat function and a dict of its optional parameters). 3. Outdated parameters from `Axes.boxplot` will be deprecated and later removed. ### Importance Since the limits of the whiskers are computed arithmetically, there is an implicit assumption of normality in box and whisker plots. This primarily affects which data points are classified as outliers. Allowing transformations to the data and the results used to draw boxplots will allow users to opt-out of that assumption if the data are known to not fit a normal distribution. Below is an example of how `Axes.boxplot` classifies outliers of lognormal data differently depending one these types of transforms. ::: {.plot include-source="true"} import numpy as np import matplotlib.pyplot as plt from matplotlib import cbook np.random.seed(0) fig, ax = plt.subplots(figsize=(4, 6)) ax.set_yscale(\'log\') data = np.random.lognormal(-1.75, 2.75, size=37) stats = cbook.boxplot_stats(data, labels=\[\'arithmetic\'\]) logstats = cbook.boxplot_stats(np.log(data), labels=\[\'log-transformed\'\]) for lsdict in logstats: : for key, value in lsdict.items(): : if key != \'label\': : lsdict\[key\] = np.exp(value) stats.extend(logstats) ax.bxp(stats) fig.show() ::: ## Implementation ### Passing transform functions to `cbook.boxplots_stats` This MEP proposes that two parameters (e.g., `transform_in` and `transform_out` be added to the cookbook function that computes the statistics for the boxplot function. These will be optional keyword-only arguments and can easily be set to `lambda x: x` as a no-op when omitted by the user. The `transform_in` function will be applied to the data as the `boxplot_stats` function loops through each subset of the data passed to it. After the list of statistics dictionaries are computed the `transform_out` function is applied to each value in the dictionaries. These transformations can then be added to the call signature of `Axes.boxplot` with little impact to that method\'s complexity. This is because they can be directly passed to `cbook.boxplot_stats`. Alternatively, `Axes.boxplot` could be modified to accept an optional statistical function kwarg and a dictionary of parameters to be directly passed to it. At this point in the implementation users and external libraries like seaborn would have complete control via the `Axes.boxplot` method. More importantly, at the very least, seaborn would require no changes to its API to allow users to take advantage of these new options. ### Simplifications to the `Axes.boxplot` API and other functions Simplifying the boxplot method consists primarily of deprecating and then removing the redundant parameters. Optionally, a next step would include rectifying minor terminological inconsistencies between `Axes.boxplot` and `Axes.bxp`. The parameters to be deprecated and removed include: 1. `usermedians` - processed by 10 SLOC, 3 `if` blocks, a `for` loop 2. `conf_intervals` - handled by 15 SLOC, 6 `if` blocks, a `for` loop 3. `sym` - processed by 12 SLOC, 4 `if` blocks Removing the `sym` option allows all code in handling the remaining styling parameters to be moved to `Axes.bxp`. This doesn\'t remove any complexity, but does reinforce the single responsibility principle among `Axes.bxp`, `cbook.boxplot_stats`, and `Axes.boxplot`. Additionally, the `notch` parameter could be renamed `shownotches` to be consistent with `Axes.bxp`. This kind of cleanup could be taken a step further and the `whis`, `bootstrap`, `autorange` could be rolled into the kwargs passed to the new `statfxn` parameter. ## Backward compatibility Implementation of this MEP would eventually result in the backwards incompatible deprecation and then removal of the keyword parameters `usermedians`, `conf_intervals`, and `sym`. Cursory searches on GitHub indicated that `usermedians`, `conf_intervals` are used by few users, who all seem to have a very strong knowledge of matplotlib. A robust deprecation cycle should provide sufficient time for these users to migrate to a new API. Deprecation of `sym` however, may have a much broader reach into the matplotlib userbase. ### Schedule An accelerated timeline could look like the following: 1. v2.0.1 add transforms to `cbook.boxplots_stats`, expose in `Axes.boxplot` 2. v2.1.0 Initial Deprecations , and using 2D NumPy arrays as input a. Using 2D NumPy arrays as input. The semantics around 2D arrays are generally confusing. b. `usermedians`, `conf_intervals`, `sym` parameters 3. v2.2.0 a. remove `usermedians`, `conf_intervals`, `sym` parameters b. deprecate `notch` in favor of `shownotches` to be consistent with other parameters and `Axes.bxp` 4. v2.3.0 a. remove `notch` parameter b. move all style and artist toggling logic to `Axes.bxp` such `Axes.boxplot` is little more than a broker between `Axes.bxp` and `cbook.boxplots_stats` ### Anticipated Impacts to Users As described above deprecating `usermedians` and `conf_intervals` will likely impact few users. Those who will be impacted are almost certainly advanced users who will be able to adapt to the change. Deprecating the `sym` option may import more users and effort should be taken to collect community feedback on this. ### Anticipated Impacts to Downstream Libraries The source code (GitHub master as of 2016-10-17) was inspected for seaborn and python-ggplot to see if these changes would impact their use. None of the parameters nominated for removal in this MEP are used by seaborn. The seaborn APIs that use matplotlib\'s boxplot function allow user\'s to pass arbitrary `**kwargs` through to matplotlib\'s API. Thus seaborn users with modern matplotlib installations will be able to take full advantage of any new features added as a result of this MEP. Python-ggplot has implemented its own function to draw boxplots. Therefore, no impact can come to it as a result of implementing this MEP. ## Alternatives ### Variations on the theme This MEP can be divided into a few loosely coupled components: 1. Allowing pre- and post-computation transformation function in `cbook.boxplot_stats` 2. Exposing that transformation in the `Axes.boxplot` API 3. Removing redundant statistical options in `Axes.boxplot` 4. Shifting all styling parameter processing from `Axes.boxplot` to `Axes.bxp`. With this approach, #2 depends and #1, and #4 depends on #3. There are two possible approaches to #2. The first and most direct would be to mirror the new `transform_in` and `transform_out` parameters of `cbook.boxplot_stats` in `Axes.boxplot` and pass them directly. The second approach would be to add `statfxn` and `statfxn_args` parameters to `Axes.boxplot`. Under this implementation, the default value of `statfxn` would be `cbook.boxplot_stats`, but users could pass their own function. Then `transform_in` and `transform_out` would then be passed as elements of the `statfxn_args` parameter. ``` python def boxplot_stats(data, ..., transform_in=None, transform_out=None): if transform_in is None: transform_in = lambda x: x if transform_out is None: transform_out = lambda x: x output = [] for _d in data: d = transform_in(_d) stat_dict = do_stats(d) for key, value in stat_dict.item(): if key != 'label': stat_dict[key] = transform_out(value) output.append(d) return output class Axes(...): def boxplot_option1(data, ..., transform_in=None, transform_out=None): stats = cbook.boxplot_stats(data, ..., transform_in=transform_in, transform_out=transform_out) return self.bxp(stats, ...) def boxplot_option2(data, ..., statfxn=None, **statopts): if statfxn is None: statfxn = boxplot_stats stats = statfxn(data, **statopts) return self.bxp(stats, ...) ``` Both cases would allow users to do the following: ``` python fig, ax1 = plt.subplots() artists1 = ax1.boxplot_optionX(data, transform_in=np.log, transform_out=np.exp) ``` But Option Two lets a user write a completely custom stat function (e.g., `my_box_stats`) with fancy BCA confidence intervals and the whiskers set differently depending on some attribute of the data. This is available under the current API: ``` python fig, ax1 = plt.subplots() my_stats = my_box_stats(data, bootstrap_method='BCA', whisker_method='dynamic') ax1.bxp(my_stats) ``` And would be more concise with Option Two ``` python fig, ax = plt.subplots() statopts = dict(transform_in=np.log, transform_out=np.exp) ax.boxplot(data, ..., **statopts) ``` Users could also pass their own function to compute the stats: ``` python fig, ax1 = plt.subplots() ax1.boxplot(data, statfxn=my_box_stats, bootstrap_method='BCA', whisker_method='dynamic') ``` From the examples above, Option Two seems to have only marginal benefit, but in the context of downstream libraries like seaborn, its advantage is more apparent as the following would be possible without any patches to seaborn: ``` python import seaborn tips = seaborn.load_data('tips') g = seaborn.factorplot(x="day", y="total_bill", hue="sex", data=tips, kind='box', palette="PRGn", shownotches=True, statfxn=my_box_stats, bootstrap_method='BCA', whisker_method='dynamic') ``` This type of flexibility was the intention behind splitting the overall boxplot API in the current three functions. In practice however, downstream libraries like seaborn support versions of matplotlib dating back well before the split. Thus, adding just a bit more flexibility to the `Axes.boxplot` could expose all the functionality to users of the downstream libraries with modern matplotlib installation without intervention from the downstream library maintainers. ### Doing less Another obvious alternative would be to omit the added pre- and post-computation transform functionality in `cbook.boxplot_stats` and `Axes.boxplot`, and simply remove the redundant statistical and style parameters as described above. ### Doing nothing As with many things in life, doing nothing is an option here. This means we simply advocate for users and downstream libraries to take advantage of the split between `cbook.boxplot_stats` and `Axes.bxp` and let them decide how to provide an interface to that. --- # MEP29: Text light markup ::: {.contents local=""} ::: ## Status Discussion ## Branches and Pull requests None at the moment, proof of concept only. ## Abstract This MEP proposes to add lightweight markup to the text artist. ## Detailed description Using different size/color/family in a text annotation is difficult because the [\~.Axes.text]{.title-ref} method accepts argument for size/color/family/weight/etc. that are used for the whole text. But, if one wants, for example, to have different colors, one has to look at the gallery where one such example is provided: `/gallery/text_labels_and_annotations/rainbow_text`{.interpreted-text role="doc"} This example takes a list of strings as well as a list of colors which makes it cumbersome to use. An alternative would be to use a restricted set of [pango](https://docs.gtk.org/Pango/pango_markup.html#pango-markup)-like markup and to interpret this markup. Some markup examples: Hello world!` Hello world! ## Implementation A proof of concept is provided in [markup_example.py](https://github.com/rougier/matplotlib/blob/markup/examples/text_labels_and_annotations/markup.py) but it currently only handles the horizontal direction. ### Improvements - This proof of concept uses regex to parse the text but it may be better to use the html.parser from the standard library. - Computation of text fragment positions could benefit from the OffsetFrom class. See for example item 5 in [Using Complex Coordinates with Annotations](https://matplotlib.org/devdocs/users/explain/text/annotations.html#using-complex-coordinates-with-annotations) ### Problems - One serious problem is how to deal with text having both LaTeX and HTML-like tags. For example, consider the following: $Bold$ Recommendation would be to have mutual exclusion. ## Backward compatibility None at the moment since it is only a proof of concept ## Alternatives As proposed by \@anntzer, this could be also implemented as improvements to mathtext. For example: r"$\text{Hello \textbf{world}}$" r"$\text{Hello \textcolor{blue}{world}}$" r"$\text{Hello \textsf{\small world}}$" --- ::: {#MEP-index} orphan : # Matplotlib Enhancement Proposals Matplotlib Enhancement Proposals (MEP), inspired by cpython\'s [PEP\'s](https://www.python.org/dev/peps/) but less formal, are design documents for large or controversial changes to Matplotilb. These documents should provide a discussion of both why and how the changes should be made. To create a new MEP open a pull request (PR) adding a file based on `the template `{.interpreted-text role="ref"} to this the MEP directory. For the initial PR only a rough description is required and it should be merged quickly. Further detailed discussion can happen in follow on PRs. ::: ::: only html Release : Date : ::: ::: {.toctree maxdepth="1"} template ::: ::: {.toctree glob="" maxdepth="1"} MEP\* ::: --- # MEP Template {#MEP-template} ::: {.contents local=""} ::: This MEP template is a guideline of the sections that a MEP should contain. Extra sections may be added if appropriate, and unnecessary sections may be noted as such. ## Status MEPs go through a number of phases in their lifetime: - **Discussion**: The MEP is being actively discussed on the mailing list and it is being improved by its author. The mailing list discussion of the MEP should include the MEP number (MEPxxx) in the subject line so they can be easily related to the MEP. - **Progress**: Consensus was reached and implementation work has begun. - **Completed**: The implementation has been merged into main. - **Superseded**: This MEP has been abandoned in favor of another approach. - **Rejected**: There are currently no plans to implement the proposal. ## Branches and Pull requests All development branches containing work on this MEP should be linked to from here. All pull requests submitted relating to this MEP should be linked to from here. (A MEP does not need to be implemented in a single pull request if it makes sense to implement it in discrete phases). ## Abstract The abstract should be a short description of what the MEP will achieve. ## Detailed description This section describes the need for the MEP. It should describe the existing problem that it is trying to solve and why this MEP makes the situation better. It should include examples of how the new functionality would be used and perhaps some use cases. ## Implementation This section lists the major steps required to implement the MEP. Where possible, it should be noted where one step is dependent on another, and which steps may be optionally omitted. Where it makes sense, each step should include a link related pull requests as the implementation progresses. ## Backward compatibility This section describes the ways in which the MEP breaks backward incompatibility. ## Alternatives If there were any alternative solutions to solving the same problem, they should be discussed here, along with a justification for the chosen approach. --- # API guidelines {#api_changes} API consistency and stability are of great value; Therefore, API changes (e.g. signature changes, behavior changes, removals) will only be conducted if the added benefit is worth the effort of adapting existing code. Because we are a visualization library, our primary output is the final visualization the user sees; therefore, the appearance of the figure is part of the API and any changes, either semantic or aesthetic, are backwards-incompatible API changes. ## Add new API Every new function, parameter and attribute that is not explicitly marked as private (i.e., starts with an underscore) becomes part of Matplotlib\'s public API. As discussed above, changing the existing API is cumbersome. Therefore, take particular care when adding new API: - Mark helper functions and internal attributes as private by prefixing them with an underscore. - Carefully think about good names for your functions and variables. - Try to adopt patterns and naming conventions from existing parts of the Matplotlib API. - Consider making as many arguments keyword-only as possible. See also [API Evolution the Right Way \-- Add Parameters Compatibly]{.title-ref}\_\_. \_\_ ## Add or change colormaps, color sequences, and styles Visual changes are considered an API break. Therefore, we generally do not modify existing colormaps, color sequences, or styles. We put a high bar on adding new colormaps and styles to prevent excessively growing them. While the decision is case-by-case, evaluation criteria include: - novelty: Does it support a new use case? e.g. slight variations of existing maps, sequences and styles are likely not accepted. - usability and accessibility: Are colors of sequences sufficiently distinct? Has colorblindness been considered? - evidence of wide spread usage: for example academic papers, industry blogs and whitepapers, or inclusion in other visualization libraries or domain specific tools - open license: colormaps, sequences, and styles must have a BSD compatible license (see `license-discussion`{.interpreted-text role="ref"}) ## Deprecate API {#deprecation-guidelines} When deciding to deprecate API we carefully consider the balance between the advantages (clearer interfaces, better usability, less maintenance) and the disadvantages (users have to learn new API and have to modify existing code). ::: tip ::: title Tip ::: A rough estimate on the current usage of an API can be obtained by a GitHub code search. A good search pattern is typically `[expression] language:Python NOT is:fork`. `[expression]` may be a simple string, but often regular expressions are helpful to exclude incorrect matches. You can start simple and look at the search results, if there are too many incorrect matches, gradually refine your search criteria. It can also be helpful to add `NOT path:**/matplotlib/** NOT path:**/site-packages/**` to exclude matches where the matplotlib codebase is checked into another repo, either as direct sources or as part of an environment. *Example*: Calls of the method `Figure.draw()` could be matched using `/\bfig(ure)?\.draw\(/`. This expression employs a number of patterns: - Add the opening bracket `(` after the method name to only find method calls. - Include a common object name if there are otherwise too many false positives. There are many `draw()` functions out there, but the ones we are looking for are likely called via `fig.draw()` or `figure.draw()`. - Use the word boundary marker `\b` to make sure your expression is not a matching as part of a longer word. [Link to the resulting GitHub search](https://github.com/search?q=%2F%5Cbfig%28ure%29%3F%5C.draw%5C%28%2F+language%3APython+NOT+is%3Afork&type=code) ::: API changes in Matplotlib have to be performed following the deprecation process below, except in very rare circumstances as deemed necessary by the development team. Generally API deprecation happens in two stages: - **introduce:** warn users that the API *will* change - **expire:** API *is* changed as described in the introduction period This ensures that users are notified before the change will take effect and thus prevents unexpected breaking of code. Occasionally deprecations are marked as **pending**, which means that the deprecation will be introduced in a future release. ### Rules - Deprecations are targeted at the next `meso release `{.interpreted-text role="ref"} (e.g. 3.Y) - Deprecated API is generally removed (expired) two point-releases after introduction of the deprecation. Longer deprecations can be imposed by core developers on a case-by-case basis to give more time for the transition - The old API must remain fully functional during the deprecation period - If alternatives to the deprecated API exist, they should be available during the deprecation period - If in doubt, decisions about API changes are finally made by the [API consistency lead](https://matplotlib.org/governance/people.html) developer. ### Introduce deprecation {#intro-deprecation} Deprecations are introduced to warn users that the API will change. The deprecation notice describes how the API will change. When alternatives to the deprecated API exist, they are also listed in the notice and decorators. 1. Create a `deprecation notice `{.interpreted-text role="ref"} 2. If possible, issue a [\~matplotlib.MatplotlibDeprecationWarning]{.title-ref} when the deprecated API is used. There are a number of helper tools for this: - Use `_api.warn_deprecated()` for general deprecation warnings - Use the decorator `@_api.deprecated` to deprecate classes, functions, methods, or properties - Use `@_api.deprecate_privatize_attribute` to annotate deprecation of attributes while keeping the internal private version. - To warn on changes of the function signature, use the decorators `@_api.delete_parameter`, `@_api.rename_parameter`, and `@_api.make_keyword_only` All these helpers take a first parameter *since*, which should be set to the next point release, e.g. \"3.x\". You can use standard rst cross references in *alternative*. 3. Make appropriate changes to the type hints in the associated `.pyi` file. The general guideline is to match runtime reported behavior. - Items marked with `@_api.deprecated` or `@_api.deprecate_privatize_attribute` are generally kept during the expiry period, and thus no changes are needed on introduction. - Items decorated with `@_api.rename_parameter` or `@_api.make_keyword_only` report the *new* (post deprecation) signature at runtime, and thus *should* be updated on introduction. - Items decorated with `@_api.delete_parameter` should include a default value hint for the deleted parameter, even if it did not previously have one (e.g. `param: = ...`). ### Expire deprecation The API changes described in the introduction notice are only implemented after the introduction period has expired. 1. Create a `deprecation announcement `{.interpreted-text role="ref"}. For the content, you can usually copy the deprecation notice and adapt it slightly. 2. Change the code functionality and remove any related deprecation warnings. 3. Make appropriate changes to the type hints in the associated `.pyi` file. - Items marked with `@_api.deprecated` or `@_api.deprecate_privatize_attribute` are to be removed on expiry. - Items decorated with `@_api.rename_parameter` or `@_api.make_keyword_only` will have been updated at introduction, and require no change now. - Items decorated with `@_api.delete_parameter` will need to be updated to the final signature, in the same way as the `.py` file signature is updated. - Any entries in `ci/mypy-stubtest-allowlist.txt`{.interpreted-text role="file"} which indicate a deprecation version should be double checked. In most cases this is not needed, though some items were never type hinted in the first place and were added to this file instead. For removed items that were not in the stub file, only deleting from the allowlist is required. ### Pending deprecation A pending deprecation is an announcement that a deprecation will be introduced in the future. By default, pending deprecations do not raise a warning to the user; however, pending deprecations are rendered in the documentation and listed in the release notes. Pending notices are primarily intended to give downstream library and tool developers time to adapt their code so that it does not raise a deprecation warning. This is because their users cannot act on warnings triggered by how the tools and libraries use Matplotlib. It\'s also possible to run Python in dev mode to raise [PendingDeprecationWarning]{.title-ref}. To mark a deprecation as pending, set the following parameters on the appropriate deprecation decorator: \* the *pending* parameter is set to `True` \* the *removal* parameter is left blank When converting a pending deprecation to an introduced deprecation, update the decorator such that: \* *pending* is set to `False` \* *since* is set to the next meso release (3.Y+1) \* *removal* is set to at least 2 meso releases after (3.Y+3) introduction. Pending deprecations are documented in the `API change notes `{.interpreted-text role="ref"} in the same manner as introduced and expired deprecations. The notice should include *pending deprecation* in the title. ::: redirect-from /devel/coding_guide#new-features-and-api-changes ::: ## Announce new and deprecated API {#api_whats_new} When adding or changing the API in a backward in-compatible way, please add the appropriate `versioning directive `{.interpreted-text role="ref"} and document it in the `release notes `{.interpreted-text role="ref"} by adding an entry to the appropriate folder: +-------------+---------------------+---------------------------------+ | | > versioning | > announcement folder | | | > directive | | +=============+=====================+=================================+ | new feature | `.. | `doc/release/nex | | | versionadded:: 3.N` | t_whats_new/`{.interpreted-text | | | | role="file"} | +-------------+---------------------+---------------------------------+ | API change | `.. ve | `doc/api/next_api_ch | | | rsionchanged:: 3.N` | anges/[kind]`{.interpreted-text | | | | role="file"} | +-------------+---------------------+---------------------------------+ When deprecating API, please add a notice as described in the `deprecation guidelines `{.interpreted-text role="ref"} and summarized here: +-------+---------------------------+---------------------------------+ | > | | > announcement folder | | stage | | | +=======+===========================+=================================+ | ` | | `doc/api/next_api_changes | | intro | | /deprecation`{.interpreted-text | | duce | | role="file"} | | depre | | | | catio | | | | n `{.i | | | | nterp | | | | reted | | | | -text | | | | r | | | | ole=" | | | | ref"} | | | +-------+---------------------------+---------------------------------+ | `exp | | `doc/api/next_api_ch | | ire d | | anges/[kind]`{.interpreted-text | | eprec | | role="file"} | | ation | | | | `{.i | | | | nterp | | | | reted | | | | -text | | | | r | | | | ole=" | | | | ref"} | | | +-------+---------------------------+---------------------------------+ Generally the introduction notices can be repurposed for the expiration notice as they are expected to be describing the same API changes and removals. ### Versioning directives When making a backward incompatible change, please add a versioning directive in the docstring. The directives should be placed at the end of a description block. For example: class Foo: """ This is the summary. Followed by a longer description block. Consisting of multiple lines and paragraphs. .. versionadded:: 3.5 Parameters ---------- a : int The first parameter. b: bool, default: False This was added later. .. versionadded:: 3.6 """ def set_b(b): """ Set b. .. versionadded:: 3.6 Parameters ---------- b: bool For classes and functions, the directive should be placed before the *Parameters* section. For parameters, the directive should be placed at the end of the parameter description. The micro release version is omitted and the directive should not be added to entire modules. ### Release notes For both change notes and what\'s new, please avoid using cross-references in section titles as it causes links to be confusing in the table of contents. Instead, ensure that a cross-reference is included in the descriptive text. #### API change notes API change notes for future releases are collected in `doc/api/next_api_changes/`{.interpreted-text role="file"}. They are divided into four subdirectories: - **Deprecations**: Announcements of future changes. Typically, these will raise a deprecation warning and users of this API should change their code to stay compatible with future releases of Matplotlib. If possible, state what should be used instead. - **Removals**: Parts of the API that got removed. If possible, state what should be used instead. - **Behaviour changes**: API that stays valid but will yield a different result. - **Development changes**: Changes to the build process, dependencies, etc. Please place new entries in these directories with a new file named `99999-ABC.rst`, where `99999` would be the PR number, and `ABC` the author\'s initials. Typically, each change will get its own file, but you may also amend existing files when suitable. The overall goal is a comprehensible documentation of the changes. A typical entry could look like this: Locators ~~~~~~~~ The unused `Locator.autoscale()` method is deprecated (pass the axis limits to `Locator.view_limits()` instead). Please avoid using references in section titles, as it causes links to be confusing in the table of contents. Instead, ensure that a reference is included in the descriptive text. Use inline literals (double backticks) to denote code objects in the title. #### What\'s new notes Each new feature (e.g. function, parameter, config value, behavior, \...) must be described through a \"What\'s new\" entry. Each entry is written into a separate file in the `doc/release/next_whats_new/`{.interpreted-text role="file"} directory. They are sorted and merged into `whats_new.rst`{.interpreted-text role="file"} during the release process. When adding an entry please look at the currently existing files to see if you can extend any of them. If you create a file, name it something like `cool_new_feature.rst`{.interpreted-text role="file"} if you have added a brand new feature or something like `updated_feature.rst`{.interpreted-text role="file"} for extensions of existing features. Include contents of the form: Section title for feature ------------------------- A description of the feature from the user perspective. This should include what the feature allows users to do and how the feature is used. Technical details should be left out when they do not impact usage, for example implementation details. The description may include a a short instructive example, if it helps to understand the feature. Please avoid using references in section titles, as it causes links to be confusing in the table of contents. Instead, ensure that a reference is included in the descriptive text. Use inline literals (double backticks) to denote code objects in the title. ## Discourage API We have API that we do not recommend anymore for new code, but that cannot be deprecated because its removal would be breaking backward-compatibility and too disruptive. In such a case we can formally discourage API. This can cover specific parameters, call patterns, whole methods etc. To do so, add a note to the docstring : .. admonition:: Discouraged [description and suggested alternative] You find several examples for good descriptions if you search the codebase for `.. admonition:: Discouraged`. Additionally, if a whole function is discouraged, prefix the summary line with `[*Discouraged*]` so that it renders in the API overview like this > \[*Discouraged*\] Return the XAxis instance. --- # Source: codespaces.md # Contributing to Matplotlib using GitHub codespaces * For a general overview of contributing to Matplotlib, see https://matplotlib.org/devdocs/devel/index.html * For instructions on how to submit Pull Requests using GitHub codespaces, see https://matplotlib.org/devdocs/devel/contribute.html#contributing-code * For instructions on running tests to verify your changes, see https://matplotlib.org/devdocs/devel/testing.html * For instructions on building the Matplotlib documentation, see https://matplotlib.org/devdocs/devel/document.html#documenting-matplotlib --- # Coding guidelines {#coding_guidelines} We appreciate these guidelines being followed because it improves the readability, consistency, and maintainability of the code base. ::: {.admonition .seealso} API guidelines If adding new features, changing behavior or function signatures, or removing public interfaces, please consult the `api_changes`{.interpreted-text role="ref"}. ::: ## PEP8, as enforced by ruff {#code-style} Formatting should follow the recommendations of [PEP8](https://www.python.org/dev/peps/pep-0008/), as enforced by [ruff](https://docs.astral.sh/ruff/). Matplotlib modifies PEP8 to extend the maximum line length to 88 characters. You can check PEP8 compliance from the command line with : python -m pip install ruff ruff check /path/to/module.py or your editor may provide integration with it. To check all files, and fix any errors in-place (where possible) run : ruff check --fix Matplotlib intentionally does not use the [black](https://black.readthedocs.io/) auto-formatter ([1](https://github.com/matplotlib/matplotlib/issues/18796)), in particular due to its inability to understand the semantics of mathematical expressions ([2](https://github.com/psf/black/issues/148), [3](https://github.com/psf/black/issues/1984)). ## Package imports Import the following modules using the standard scipy conventions: import numpy as np import numpy.ma as ma import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cbook as cbook import matplotlib.patches as mpatches In general, Matplotlib modules should **not** import [.rcParams]{.title-ref} using `from matplotlib import rcParams`, but rather access it as `mpl.rcParams`. This is because some modules are imported very early, before the [.rcParams]{.title-ref} singleton is constructed. ## Variable names When feasible, please use our internal variable naming convention for objects of a given class and objects of any child class: +--------------------------+----------+------------------------------+ | > base class | variable | > multiples | +==========================+==========+==============================+ | [\~matplotlib.figure | `fig` | | | .FigureBase]{.title-ref} | | | +--------------------------+----------+------------------------------+ | [\~matplotli | `ax` | | | b.axes.Axes]{.title-ref} | | | +--------------------------+----------+------------------------------+ | [\~matplotlib.transform | `trans` | `trans__` | | s.Transform]{.title-ref} | | | | | | `trans_` when target | | | | is screen | +--------------------------+----------+------------------------------+ | | | | +--------------------------+----------+------------------------------+ Generally, denote more than one instance of the same class by adding suffixes to the variable names. If a format isn\'t specified in the table, use numbers or letters as appropriate. ## Type hints If you add new public API or change public API, update or add the corresponding [mypy](https://mypy.readthedocs.io/en/latest/) type hints. We generally use [stub files](https://typing.readthedocs.io/en/latest/source/stubs.html#type-stubs) (`*.pyi`) to store the type information; for example `colors.pyi` contains the type information for `colors.py`. A notable exception is `pyplot.py`, which is type hinted inline. Type hints can be validated by the [stubtest](https://mypy.readthedocs.io/en/stable/stubtest.html) tool, which can be run locally using `tox -e stubtest` and is a part of the `automated-tests`{.interpreted-text role="ref"} suite. Type hints for existing functions are also checked by the mypy `pre-commit hook `{.interpreted-text role="ref"}. ## New modules and files: installation - If you have added new files or directories, or reorganized existing ones, make sure the new files are included in the `meson.build`{.interpreted-text role="file"} in the corresponding directories. - New modules *may* be typed inline or using parallel stub file like existing modules. ## C/C++ extensions - Extensions may be written in C or C++. - Code style should conform to PEP7 (understanding that PEP7 doesn\'t address C++, but most of its admonitions still apply). - Python/C interface code should be kept separate from the core C/C++ code. The interface code should be named `FOO_wrap.cpp`{.interpreted-text role="file"} or `FOO_wrapper.cpp`{.interpreted-text role="file"}. - Header file documentation (aka docstrings) should be in Numpydoc format. We don\'t plan on using automated tools for these docstrings, and the Numpydoc format is well understood in the scientific Python community. - C/C++ code in the `extern/`{.interpreted-text role="file"} directory is vendored, and should be kept close to upstream whenever possible. It can be modified to fix bugs or implement new features only if the required changes cannot be made elsewhere in the codebase. In particular, avoid making style fixes to it. ## Keyword argument processing Matplotlib makes extensive use of `**kwargs` for pass-through customizations from one function to another. A typical example is [\~matplotlib.axes.Axes.text]{.title-ref}. The definition of [matplotlib.pyplot.text]{.title-ref} is a simple pass-through to \`matplotlib.axes.Axes.text\`: # in pyplot.py def text(x, y, s, fontdict=None, **kwargs): return gca().text(x, y, s, fontdict=fontdict, **kwargs) [matplotlib.axes.Axes.text]{.title-ref} (simplified for illustration) just passes all `args` and `kwargs` on to `matplotlib.text.Text.__init__`: # in axes/_axes.py def text(self, x, y, s, fontdict=None, **kwargs): t = Text(x=x, y=y, text=s, **kwargs) and `matplotlib.text.Text.__init__` (again, simplified) just passes them on to the [matplotlib.artist.Artist.update]{.title-ref} method: # in text.py def __init__(self, x=0, y=0, text='', **kwargs): super().__init__() self.update(kwargs) `update` does the work looking for methods named like `set_property` if `property` is a keyword argument. i.e., no one looks at the keywords, they just get passed through the API to the artist constructor which looks for suitably named methods and calls them with the value. As a general rule, the use of `**kwargs` should be reserved for pass-through keyword arguments, as in the example above. If all the keyword args are to be used in the function, and not passed on, use the key/value keyword args in the function definition rather than the `**kwargs` idiom. In some cases, you may want to consume some keys in the local function, and let others pass through. Instead of popping arguments to use off `**kwargs`, specify them as keyword-only arguments to the local function. This makes it obvious at a glance which arguments will be consumed in the function. For example, in `~matplotlib.axes.Axes.plot`{.interpreted-text role="meth"}, `scalex` and `scaley` are local arguments and the rest are passed on as `~matplotlib.lines.Line2D`{.interpreted-text role="meth"} keyword arguments: # in axes/_axes.py def plot(self, *args, scalex=True, scaley=True, **kwargs): lines = [] for line in self._get_lines(*args, **kwargs): self.add_line(line) lines.append(line) ## Using logging for debug messages {#using_logging} Matplotlib uses the standard Python [logging]{.title-ref} library to write verbose warnings, information, and debug messages. Please use it! In all those places you write [print]{.title-ref} calls to do your debugging, try using [logging.debug]{.title-ref} instead! To include [logging]{.title-ref} in your module, at the top of the module, you need to `import logging`. Then calls in your code like: _log = logging.getLogger(__name__) # right after the imports # code # more code _log.info('Here is some information') _log.debug('Here is some more detailed information') will log to a logger named `matplotlib.yourmodulename`. If an end-user of Matplotlib sets up [logging]{.title-ref} to display at levels more verbose than `logging.WARNING` in their code with the Matplotlib-provided helper: plt.set_loglevel("DEBUG") or manually with : import logging logging.basicConfig(level=logging.DEBUG) import matplotlib.pyplot as plt Then they will receive messages like ``` none DEBUG:matplotlib.backends:backend MacOSX version unknown DEBUG:matplotlib.yourmodulename:Here is some information DEBUG:matplotlib.yourmodulename:Here is some more detailed information ``` Avoid using pre-computed strings (`f-strings`, `str.format`,etc.) for logging because of security and performance issues, and because they interfere with style handlers. For example, use `_log.error('hello %s', 'world')` rather than `_log.error('hello {}'.format('world'))` or `_log.error(f'hello {s}')`. ### Which logging level to use? There are five levels at which you can emit messages. - [logging.critical]{.title-ref} and [logging.error]{.title-ref} are really only there for errors that will end the use of the library but not kill the interpreter. - [logging.warning]{.title-ref} and [.\_api.warn_external]{.title-ref} are used to warn the user, see below. - [logging.info]{.title-ref} is for information that the user may want to know if the program behaves oddly. They are not displayed by default. For instance, if an object isn\'t drawn because its position is `NaN`, that can usually be ignored, but a mystified user could call `logging.basicConfig(level=logging.INFO)` and get an error message that says why. - [logging.debug]{.title-ref} is the least likely to be displayed, and hence can be the most verbose. \"Expected\" code paths (e.g., reporting normal intermediate steps of layouting or rendering) should only log at this level. By default, [logging]{.title-ref} displays all log messages at levels higher than `logging.WARNING` to [sys.stderr]{.title-ref}. The [logging tutorial](https://docs.python.org/3/howto/logging.html#logging-basic-tutorial) suggests that the difference between [logging.warning]{.title-ref} and [.\_api.warn_external]{.title-ref} (which uses [warnings.warn]{.title-ref}) is that [.\_api.warn_external]{.title-ref} should be used for things the user must change to stop the warning (typically in the source), whereas [logging.warning]{.title-ref} can be more persistent. Moreover, note that [.\_api.warn_external]{.title-ref} will by default only emit a given warning *once* for each line of user code, whereas [logging.warning]{.title-ref} will display the message every time it is called. By default, [warnings.warn]{.title-ref} displays the line of code that has the `warn` call. This usually isn\'t more informative than the warning message itself. Therefore, Matplotlib uses [.\_api.warn_external]{.title-ref} which uses [warnings.warn]{.title-ref}, but goes up the stack and displays the first line of code outside of Matplotlib. For example, for the module: # in my_matplotlib_module.py import warnings def set_range(bottom, top): if bottom == top: warnings.warn('Attempting to set identical bottom==top') running the script: from matplotlib import my_matplotlib_module my_matplotlib_module.set_range(0, 0) # set range will display ``` none UserWarning: Attempting to set identical bottom==top warnings.warn('Attempting to set identical bottom==top') ``` Modifying the module to use \`.\_api.warn_external\`: from matplotlib import _api def set_range(bottom, top): if bottom == top: _api.warn_external('Attempting to set identical bottom==top') and running the same script will display ``` none UserWarning: Attempting to set identical bottom==top my_matplotlib_module.set_range(0, 0) # set range ``` ::: {#licence-coding-guide} Licenses for contributed code ============================= Matplotlib only uses BSD compatible code. If you bring in code from another project make sure it has a PSF, BSD, MIT or compatible license (see the Open Source Initiative [licenses page](https://opensource.org/licenses) for details on individual licenses). If it doesn\'t, you may consider contacting the author and asking them to relicense it. GPL and LGPL code are not acceptable in the main code base, though we are considering an alternative way of distributing L/GPL code through an separate channel, possibly a toolkit. If you include code, make sure you include a copy of that code\'s license in the license directory if the code\'s license requires you to distribute the license with it. Non-BSD compatible licenses are acceptable in Matplotlib toolkits (e.g., basemap), but make sure you clearly state the licenses you are using. ### Why BSD compatible? The two dominant license variants in the wild are GPL-style and BSD-style. There are countless other licenses that place specific restrictions on code reuse, but there is an important difference to be considered in the GPL and BSD variants. The best known and perhaps most widely used license is the GPL, which in addition to granting you full rights to the source code including redistribution, carries with it an extra obligation. If you use GPL code in your own code, or link with it, your product must be released under a GPL compatible license. i.e., you are required to give the source code to other people and give them the right to redistribute it as well. Many of the most famous and widely used open source projects are released under the GPL, including linux, gcc, emacs and sage. The second major class are the BSD-style licenses (which includes MIT and the python PSF license). These basically allow you to do whatever you want with the code: ignore it, include it in your own open source project, include it in your proprietary product, sell it, whatever. python itself is released under a BSD compatible license, in the sense that, quoting from the PSF license page: There is no GPL-like "copyleft" restriction. Distributing binary-only versions of Python, modified or not, is allowed. There is no requirement to release any of your source code. You can also write extension modules for Python and provide them only in binary form. Famous projects released under a BSD-style license in the permissive sense of the last paragraph are the BSD operating system, python and TeX. There are several reasons why early Matplotlib developers selected a BSD compatible license. Matplotlib is a python extension, and we choose a license that was based on the python license (BSD compatible). Also, we wanted to attract as many users and developers as possible, and many software companies will not use GPL code in software they plan to distribute, even those that are highly committed to open source development, such as [enthought](https://www.enthought.com), out of legitimate concern that use of the GPL will \"infect\" their code base by its viral nature. In effect, they want to retain the right to release some proprietary code. Companies and institutions who use Matplotlib often make significant contributions, because they have the resources to get a job done, even a boring one. Two of the Matplotlib backends (FLTK and WX) were contributed by private companies. The final reason behind the licensing choice is compatibility with the other python extensions for scientific computing: ipython, numpy, scipy, the enthought tool suite and python itself are all distributed under BSD compatible licenses. ::: ::: {.toctree hidden=""} license.rst ::: --- # Community management guide {#communications-guidelines} These guidelines are applicable when **acting as a representative** of Matplotlib, for example at sprints or when giving official talks or tutorials, and in any community venue managed by Matplotlib. Our approach to community engagement is foremost guided by our `mission-statement`{.interpreted-text role="ref"}: - We demonstrate that we care about visualization as a practice. - We deepen our practice and the community's capacity to support users, facilitate exploration, produce high quality visualizations, and be understandable and extensible. - We showcase advanced use of the library without adding maintenance burden to the documentation and recognize contributions that happen outside of the github workflow. - We use communications platforms to maintain relationships with contributors who may no longer be active on GitHub, build relationships with potential contributors, and connect with other projects and communities who use Matplotlib. - In prioritizing understandability and extensibility, we recognize that people using Matplotlib, in whatever capacity, are part of our community. Doing so empowers our community members to build community with each other, for example by creating educational resources, building third party tools, and building informal mentoring networks. ## Official communication channels {#communication-channels} The Scientific Python community uses various communications platforms to stay updated on new features and projects, to contribute by telling us what is on their mind and suggest issues and bugs, and to showcase their use cases and the tools they have built. The following venues are managed by Matplotlib maintainers and contributors: - library and docs: - forum: - chat: [https://matrix.to/#/#matplotlib:matrix.org](https://matrix.to/#/#matplotlib:matrix.org) - blog: ### Social media #### Active social media - - - - #### Official accounts - - ### Mailing lists - [matplotlib-announce@python.org](https://mail.python.org/mailman/listinfo/matplotlib-announce) - [matplotlib-users@python.org](https://mail.python.org/mailman/listinfo/matplotlib-users) - [matplotlib-devel@python.org](https://mail.python.org/mailman/listinfo/matplotlib-devel) ### Social media coordination - Team mailing list: - Public chat room: [https://matrix.to/#/#matplotlib_community:gitter.im](https://matrix.to/#/#matplotlib_community:gitter.im) ### Maintenance If you are interested in moderating the chat or forum or accessing the social media accounts: - Matplotlib maintainers should reach out to the [community-manager](https://matplotlib.org/governance/people.html#deputy-project-leads). - Everyone else should send an email to : - Introduce yourself - GitHub handle and participation in the community. - Describe the reason for wanting to moderate or contribute to social. ## Content guidelines Communication on official channels, such as the Matplotlib homepage or on Matplotlib social accounts, should conform to the following standards. If you are unsure if content that you would like to post or share meets these guidelines, ask on the `social-media-coordination`{.interpreted-text role="ref"} channels before posting. ### General guidelines - Do not share information that violates Matplotlib\'s `code of conduct `{.interpreted-text role="ref"} or does not align with Matplotlib\'s `mission-statement`{.interpreted-text role="ref"}. - Focus on Matplotlib, 3rd party packages, and visualizations made with Matplotlib. - These are also acceptable topics: - Visualization best practices and libraries. - Projects and initiatives by NumFOCUS and Scientific Python. - How to contribute to open source projects. - Projects, such as scientific papers, that use Matplotlib. - No gratuitous disparaging of other visualization libraries and tools, but criticism is acceptable so long as it serves a constructive purpose. - Follow communication best practices: - Do not share non-expert visualizations when it could cause harm, e.g.: - Could the information affect someone\'s decisions in a way that impacts their personal health or safety? - Could the information be used as part of a politicised debate? - Clearly state when the visualization data/conclusions cannot be verified. - Do not rely on machine translations for sensitive visualization. - Verify sourcing of content (especially on Instagram & blog): - Instagram/blog: ensure mpl has right to repost/share content - Make sure content is clearly cited: - e.g. a tutorial reworking an example must credit the original example - Limited self/corporate promotion is acceptable. - Should be no more than about a quarter of the content. ### Visual media guidelines Visual media, such as images and videos, must not violate the `code of conduct `{.interpreted-text role="ref"}, nor any platform\'s rules. Specifically: - Visual media must conform to the guidelines of all sites it may be posted on: - - - Emphasize the visualization techniques demonstrated by the visual media. - Clearly state that sharing is not an endorsement of the content. - e.g. bitcoin related visualizations #### Accessibility Visual media in communications should be made as accessible as possible: - Add alt text to images and videos when the platform allows: - [alt text for data viz](https://medium.com/nightingale/writing-alt-text-for-data-visualization-2a218ef43f81) - [general alt text guide](https://webaim.org/techniques/alttext/) - Warn on bright, strobing, images & turn off autoplay if possible. - For images and videos made by the social media team: - Make graphic perceivable to people who cannot perceive color well due to color-blindness, low vision, or any other reason. - Do not make bright, strobing images. - More guidelines at . ## Social media {#social-media-brand} Matplotlib aims for a single voice across all social media platforms to build and maintain a consistent brand identity for Matplotlib as an organization. This depersonalization is the norm on social media platforms because it enables constructive and productive conversations; People generally feel more comfortable giving negative and constructive feedback to a brand than to specific contributors. The current Matplotlib voice and persona aims to be kind, patient, supportive and educational. This is so that it can de-escalate tensions and facilitate constructive conversations; being perceived as negative or argumentative can escalate very fast into long-lasting brand damage, being perceived as personal leads to aggression and accusations faster than an impersonal account, and being perceived as friendly and approachable leads to higher engagement. Instead of speaking with a directive authority, which can be intimidating and lead to negative engagement, it speaks as a peer or educator to empower participation. The current voice encourages more input from folks we engage with, and also makes it possible for folks who are not in the core team to participate in managing the account. While the `brand identity `{.interpreted-text role="ref"} is casual, the showcased content is high quality, peer-led resource building. Please follow these guidelines to maintain a consistent brand identity across platforms. ### Persona On social media, Matplotlib: - Acts as a sentient visualization library, so talks about itself as a we, us, our, and it. Avoids talking about itself in the 3rd person. Never uses 1st person. - Is very earnest, eager to please, and aims to be patient & painfully oblivious to snark and sarcasm. - Gets over-excited over shiny visualizations - lots of emojis and the like -and encourages folks to share their work. - Highlights various parts of the library, especially the more obscure bits and bobbles. - Acknowledges that it is a sometimes frustrating tangle of bits & bobbles that can confuse even the folks who work on it & signal boosts their confuzzlement. ### Behavior When acting as a representative of the library, keep responses polite and assume user statements are in good faith unless they violate the `code of conduct `{.interpreted-text role="ref"}. ### Social graph Only follow **organizations and projects**, do not follow individual accounts for any reason, even maintainers/project leads/famous Python people! Following these types of accounts is encouraged: - NumFocus and Scientific Python projects - 3rd party packages - Visualization related projects and organizations - Open Source community projects - Sponsors ### Recurring campaigns Typically the social media accounts will promote the following: - Matplotlib releases: - Highlight new features & major deprecations - Link to download/install instructions - Ask folks to try it out. - [third party packages](https://matplotlib.org/mpl-third-party/) - NumFocus/Scientific Python/open source visualization project releases - GSOC/GSOD recruiting and progress #### Retired campaigns - John Hunter Excellence in Plotting, submission and winners ## Changing the guidelines As the person tasked with implementing these guidelines, the [community-manager](https://matplotlib.org/governance/people.html#deputy-project-leads) should be alerted to proposed changes. Similarly, specific platform guidelines (e.g. X, Instagram) should be reviewed by the person responsible for that platform, when different from the community manager. If there is no consensus, decisions about guidelines revert to the community manager. --- ::: redirect-from /devel/contributing ::: # Contributing guide {#contributing} You\'ve discovered a bug or something else you want to change in Matplotlib --- excellent! You\'ve worked out a way to fix it --- even better! You want to tell us about it --- best of all! Below, you can find a number of ways to contribute, and how to connect with the Matplotlib community. ## Ways to contribute ::: {.dropdown open="" icon="person-fill"} Do I really have something to contribute to Matplotlib? 100% yes! There are so many ways to contribute to our community. Take a look at the following sections to learn more. There are a few typical new contributor profiles: - **You are a Matplotlib user, and you see a bug, a potential improvement, or something that annoys you, and you can fix it.** You can search our [issue tracker](https://github.com/matplotlib/matplotlib/issues) for an existing issue that describes your problem or open a new issue to inform us of the problem you observed and discuss the best approach to fix it. If your contributions would not be captured on GitHub (social media, communication, educational content), you can also reach out to us on [gitter](https://gitter.im/matplotlib/matplotlib), [Discourse](https://discourse.matplotlib.org/) or attend any of our [community meetings](https://scientific-python.org/calendars). - **You are not a regular Matplotlib user but a domain expert: you know about visualization, 3D plotting, design, technical writing, statistics, or some other field where Matplotlib could be improved.** Awesome --- you have a focus on a specific application and domain and can start there. In this case, maintainers can help you figure out the best implementation; [open an issue](https://github.com/matplotlib/matplotlib/issues/new/choose) in our issue tracker, and we\'ll be happy to discuss technical approaches. If you can implement the solution yourself, even better! Consider contributing the change as a `pull request `{.interpreted-text role="ref"} right away. - **You are new to Matplotlib, both as a user and contributor, and want to start contributing but have yet to develop a particular interest.** Having some previous experience or relationship with the library can be very helpful when making open-source contributions. It helps you understand why things are the way they are and how they *should* be. Having first-hand experience and context is valuable both for what you can bring to the conversation (and given the breadth of Matplotlib\'s usage, there is a good chance it is a unique context in any given conversation) and make it easier to understand where other people are coming from. Understanding the entire codebase is a long-term project, and nobody expects you to do this right away. If you are determined to get started with Matplotlib and want to learn, going through the basic functionality, choosing something to focus on (3d, testing, documentation, animations, etc.) and gaining context on this area by reading the issues and pull requests touching these subjects is a reasonable approach. ::: ### Code {#contribute_code} You want to implement a feature or fix a bug or help with maintenance - much appreciated! Our library source code is found in: - Python library code: `lib/`{.interpreted-text role="file"} - C-extension code: `src/`{.interpreted-text role="file"} - Tests: `lib/matplotlib/tests/`{.interpreted-text role="file"} Because many people use and work on Matplotlib, we have guidelines for keeping our code consistent and mitigating the impact of changes. - `coding_guidelines`{.interpreted-text role="ref"} - `api_changes`{.interpreted-text role="ref"} - `pr-guidelines`{.interpreted-text role="ref"} Code is contributed through pull requests, so we recommend that you start at `how-to-pull-request`{.interpreted-text role="ref"} If you get stuck, please reach out on the `contributor_incubator`{.interpreted-text role="ref"} ### Documentation {#contribute_documentation} You, as an end-user of Matplotlib can make a valuable contribution because you can more clearly see the potential for improvement than a core developer. For example, you can: - Fix a typo - Clarify a docstring - Write or update an `example plot `{.interpreted-text role="ref"} - Write or update a comprehensive `tutorial `{.interpreted-text role="ref"} Our code is documented inline in the source code files in `matplotlib/lib`{.interpreted-text role="file"}. Our website structure mirrors our folder structure, meaning that a narrative document\'s URL roughly corresponds to its location in our folder structure: ::: grid 1 1 2 2 ::: grid-item using the library - `galleries/plot_types/`{.interpreted-text role="file"} - `users/getting_started/`{.interpreted-text role="file"} - `galleries/user_explain/`{.interpreted-text role="file"} - `galleries/tutorials/`{.interpreted-text role="file"} - `galleries/examples/`{.interpreted-text role="file"} - `doc/api/`{.interpreted-text role="file"} ::: ::: grid-item information about the library - `doc/install/`{.interpreted-text role="file"} - `doc/project/`{.interpreted-text role="file"} - `doc/devel/`{.interpreted-text role="file"} - `doc/users/resources/index.rst`{.interpreted-text role="file"} - `doc/users/faq.rst`{.interpreted-text role="file"} ::: ::: Other documentation is generated from the following external sources: - matplotlib.org homepage: - cheat sheets: - third party packages: Instructions and guidelines for contributing documentation are found in: - `document`{.interpreted-text role="doc"} - `style_guide`{.interpreted-text role="doc"} - `tag_guidelines`{.interpreted-text role="doc"} Documentation is contributed through pull requests, so we recommend that you start at `how-to-pull-request`{.interpreted-text role="ref"}. If that feels intimidating, we encourage you to [open an issue](https://github.com/matplotlib/matplotlib/issues/new?assignees=&labels=Documentation&projects=&template=documentation.yml&title=%5BDoc%5D%3A+) describing what improvements you would make. If you get stuck, please reach out on the `contributor_incubator`{.interpreted-text role="ref"} ### Triage {#contribute_triage} We appreciate your help keeping the [issue tracker](https://github.com/matplotlib/matplotlib/issues) organized because it is our centralized location for feature requests, bug reports, tracking major projects, and discussing priorities. Some examples of what we mean by triage are: - labeling issues and pull requests - verifying bug reports - debugging and resolving issues - linking to related issues, discussion, and external work Our triage process is discussed in detail in `bug_triaging`{.interpreted-text role="ref"}. If you have any questions about the process, please reach out on the `contributor_incubator`{.interpreted-text role="ref"} ### Community {#other_ways_to_contribute} Matplotlib\'s community is built by its members, if you would like to help out see our `communications-guidelines`{.interpreted-text role="ref"}. It helps us if you spread the word: reference the project from your blog and articles or link to it from your website! If Matplotlib contributes to a project that leads to a scientific publication, please cite us following the `/project/citing`{.interpreted-text role="doc"} guidelines. If you have developed an extension to Matplotlib, please consider adding it to our [third party package](https://github.com/matplotlib/mpl-third-party) list. ## Restrictions on Generative AI Usage {#generative_ai} We expect authentic engagement in our community. - Do not post output from Large Language Models or similar generative AI as comments on GitHub or our discourse server, as such comments tend to be formulaic and low content. - If you use generative AI tools as an aid in developing code or documentation changes, ensure that you fully understand the proposed changes and can explain why they are the correct approach. Make sure you have added value based on your personal competency to your contributions. Just taking some input, feeding it to an AI and posting the result is not of value to the project. To preserve precious core developer capacity, we reserve the right to rigorously reject seemingly AI generated low-value contributions. ## New contributors {#new_contributors} Everyone comes to the project from a different place --- in terms of experience and interest --- so there is no one-size-fits-all path to getting involved. We recommend looking at existing issue or pull request discussions, and following the conversations during pull request reviews to get context. Or you can deep-dive into a subset of the code-base to understand what is going on. ### New contributors meeting {#new_contributors_meeting} Once a month, we host a meeting to discuss topics that interest new contributors. Anyone can attend, present, or sit in and listen to the call. Among our attendees are fellow new contributors, as well as maintainers, and veteran contributors, who are keen to support onboarding of new folks and share their experience. You can find our community calendar link at the [Scientific Python website](https://scientific-python.org/calendars/), and you can browse previous meeting notes on [GitHub](https://github.com/matplotlib/ProjectManagement/tree/master/new_contributor_meeting). We recommend joining the meeting to clarify any doubts, or lingering questions you might have, and to get to know a few of the people behind the GitHub handles 😉. You can reach out to us on [gitter](https://gitter.im/matplotlib/matplotlib) for any clarifications or suggestions. We ❤ feedback! ### Contributor incubator {#contributor_incubator} The incubator is our non-public communication channel for new contributors. It is a private [gitter](https://gitter.im/matplotlib/matplotlib) (chat) room moderated by core Matplotlib developers where you can get guidance and support for your first few PRs. It\'s a place where you can ask questions about anything: how to use git, GitHub, how our PR review process works, technical questions about the code, what makes for good documentation or a blog post, how to get involved in community work, or get a \"pre-review\" on your PR. To join, please go to our public [community gitter](https://gitter.im/matplotlib/community) channel, and ask to be added to `#incubator`. One of our core developers will see your message and will add you. ### Good first issues {#good_first_issues} While any contributions are welcome, we have marked some issues as particularly suited for new contributors by the label [good first issue](https://github.com/matplotlib/matplotlib/labels/good%20first%20issue). These are well documented issues, that do not require a deep understanding of the internals of Matplotlib. The issues may additionally be tagged with a difficulty. `Difficulty: Easy` is suited for people with little Python experience. `Difficulty: Medium` and `Difficulty: Hard` require more programming experience. This could be for a variety of reasons, among them, though not necessarily all at the same time: - The issue is in areas of the code base which have more interdependencies, or legacy code. - It has less clearly defined tasks, which require some independent exploration, making suggestions, or follow-up discussions to clarify a good path to resolve the issue. - It involves Python features such as decorators and context managers, which have subtleties due to our implementation decisions. ### First contributions {#first_contribution} If this is your first open source contribution, or your first time contributing to Matplotlib, and you need help or guidance finding a good first issue, look no further. This section will guide you through each step: 1. Navigate to the [issues page](https://github.com/matplotlib/matplotlib/issues/). 2. Filter labels with [\"Difficulty: Easy\"](https://github.com/matplotlib/matplotlib/labels/Difficulty%3A%20Easy) & [\"Good first Issue\"](https://github.com/matplotlib/matplotlib/labels/good%20first%20issue) (optional). 3. Click on an issue you would like to work on, and check to see if the issue has a pull request opened to resolve it. - A good way to judge if you chose a suitable issue is by asking yourself, \"Can I independently submit a PR in 1-2 weeks?\" 4. Check existing pull requests (e.g., `28476`{.interpreted-text role="ghpull"}) and filter by the issue number to make sure the issue is not in progress: - If the issue has a pull request (is in progress), tag the user working on the issue, and ask to collaborate (optional). - If there is no pull request, `create a new pull request `{.interpreted-text role="ref"}. 5. Please familiarize yourself with the pull request template (see below), and ensure you understand/are able to complete the template when you open your pull request. Additional information can be found in the [pull request guidelines](https://matplotlib.org/devdocs/devel/pr_guide.html). ::: {.dropdown open=""} [Pull request template](https://github.com/matplotlib/matplotlib/blob/main/.github/PULL_REQUEST_TEMPLATE.md) ::: {.literalinclude language="markdown"} ../../.github/PULL_REQUEST_TEMPLATE.md ::: ::: ## Get connected {#get_connected} When in doubt, we recommend going together! Get connected with our community of active contributors, many of whom felt just like you when they started out and are happy to welcome you and support you as you get to know how we work, and where things are. You can reach out on any of our `communication-channels`{.interpreted-text role="ref"}. For development questions we recommend reaching out on our development [gitter](https://gitter.im/matplotlib/matplotlib) chat room and for community questions reach out at [community gitter](https://gitter.im/matplotlib/community). ## Choose an issue {#managing_issues_prs} In general, the Matplotlib project does not assign issues. Issues are \"assigned\" or \"claimed\" by opening a PR; there is no other assignment mechanism. If you have opened such a PR, please comment on the issue thread to avoid duplication of work. Please check if there is an existing PR for the issue you are addressing. If there is, try to work with the author by submitting reviews of their code or commenting on the PR rather than opening a new PR; duplicate PRs are subject to being closed. However, if the existing PR is an outline, unlikely to work, or stalled, and the original author is unresponsive, feel free to open a new PR referencing the old one. ## Start a pull request {#how-to-pull-request} The preferred way to contribute to Matplotlib is to fork the [main repository](https://github.com/matplotlib/matplotlib/) on GitHub, then submit a \"pull request\" (PR). To work on a a pull request: 1. **First** set up a development environment, either by cloning a copy of the Matplotlib repository to your own computer or by using Github codespaces, by following the instructions in `installing_for_devs`{.interpreted-text role="ref"} 2. **Then** start solving the issue, following the guidance in `development workflow `{.interpreted-text role="ref"} 3. **As part of verifying your changes** check that your contribution meets the `pull request guidelines `{.interpreted-text role="ref"} and then `open a pull request `{.interpreted-text role="ref"}. 4. **Finally** follow up with maintainers on the PR if waiting more than a few days for feedback. `Update the pull request `{.interpreted-text role="ref"} as needed. If you have questions of any sort, reach out on the `contributor_incubator`{.interpreted-text role="ref"} and join the `new_contributors_meeting`{.interpreted-text role="ref"}. --- ::: redirect-from /devel/gitwash/configure_git ::: ::: redirect-from /devel/gitwash/dot2_dot3 ::: ::: redirect-from /devel/gitwash/following_latest ::: ::: redirect-from /devel/gitwash/forking_hell ::: ::: redirect-from /devel/gitwash/git_development ::: ::: redirect-from /devel/gitwash/git_install ::: ::: redirect-from /devel/gitwash/git_intro ::: ::: redirect-from /devel/gitwash/git_resources ::: ::: redirect-from /devel/gitwash/patching ::: ::: redirect-from /devel/gitwash/set_up_fork ::: ::: redirect-from /devel/gitwash/index ::: # Setting up Matplotlib for development {#installing_for_devs} To set up Matplotlib for development follow these steps: ::: {.contents local=""} ::: ## Fork the Matplotlib repository Matplotlib is hosted at . If you plan on solving issues or submitting pull requests to the main Matplotlib repository, you should first fork this repository by *clicking* the `repo-forked`{.interpreted-text role="octicon"} **Fork** button near the top of the [project repository](https://github.com/matplotlib/matplotlib) page. This creates a copy of the code under your account on the GitHub server. See [the GitHub documentation](https://docs.github.com/get-started/quickstart/fork-a-repo) for more details. ## Set up development environment You can either work locally on your machine, or online in [GitHub Codespaces](https://docs.github.com/codespaces), a cloud-based in-browser development environment. local : If you are making extensive or frequent contributions to Matplotlib then it is probably worth taking the time to set up on your local machine: As well as having the convenience of your local familiar tools, you will not need to worry about Codespace\'s monthly usage limits. codespaces : If you are making a one-off, relatively simple, change then working in GitHub Codespaces can be a good option because most of the setting up is done for you and you can skip the next few sections. If you want to use Codespaces, skip to `development-codespaces`{.interpreted-text role="ref"}, otherwise, continue with the next section. ### Create local environment #### Get most recent code Now that your fork of the repository lives under your GitHub username, you can retrieve the most recent version of the source code with one of the following commands (replace `` with your GitHub username): ::: tab-set ::: tab-item https ``` bash git clone https://github.com//matplotlib.git ``` ::: ::: tab-item ssh ``` bash git clone git@github.com:/matplotlib.git ``` This requires you to setup an [SSH key]() in advance, but saves you from typing your password at every connection. ::: ::: This will place the sources in a directory `matplotlib`{.interpreted-text role="file"} below your current working directory and set the remote name `origin` to point to your fork. Change into this directory before continuing: ``` bash cd matplotlib ``` Now set the remote name `upstream` to point to the Matplotlib main repository: ::: tab-set ::: tab-item https ``` bash git remote add upstream https://github.com/matplotlib/matplotlib.git ``` ::: ::: tab-item ssh ``` bash git remote add upstream git@github.com:matplotlib/matplotlib.git ``` ::: ::: You can now use `upstream` to retrieve the most current snapshot of the source code, as described in `development-workflow`{.interpreted-text role="ref"}. ::: {.dropdown color="info" open=""} Additional `git` and `GitHub` resources For more information on `git` and `GitHub`, see: - [Git documentation](https://git-scm.com/doc) - [GitHub-Contributing to a Project](https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project) - [GitHub Skills](https://skills.github.com/) - `using-git`{.interpreted-text role="external+scipy:ref"} - `git-resources`{.interpreted-text role="external+scipy:ref"} - [Installing git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - [Managing remote repositories](https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories) - - ::: #### Create a dedicated environment {#dev-environment} You should set up a dedicated environment to decouple your Matplotlib development from other Python and Matplotlib installations on your system. We recommend using one of the following options for a dedicated development environment because these options are configured to install the Python dependencies as part of their setup. ::: tab-set ::: tab-item venv environment Create a new [venv](https://docs.python.org/3/library/venv.html) environment with : ``` bash python -m venv ``` and activate it with one of the following : ::: tab-set ::: tab-item Linux and macOS ``` bash source /bin/activate # Linux/macOS ``` ::: ::: tab-item Windows cmd.exe ``` bat \Scripts\activate.bat ``` ::: ::: tab-item Windows PowerShell ``` ps1con \Scripts\Activate.ps1 ``` ::: ::: On some systems, you may need to type `python3` instead of `python`. For a discussion of the technical reasons, see [PEP-394](https://peps.python.org/pep-0394). Install the Python dependencies with : ``` bash pip install -r requirements/dev/dev-requirements.txt ``` Remember to activate the environment whenever you start working on Matplotlib! ::: ::: tab-item conda environment Create a new [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) environment and install the Python dependencies with : ``` bash conda env create -f environment.yml ``` You can use `mamba` instead of `conda` in the above command if you have [mamba]() installed. Activate the environment using : ``` bash conda activate mpl-dev ``` Remember to activate the environment whenever you start working on Matplotlib! ::: ::: #### Install external dependencies Python dependencies were installed as part of `setting up the environment `{.interpreted-text role="ref"}. Additionally, the following non-Python dependencies must also be installed locally: ::: rst-class checklist ::: - `compile-build-dependencies`{.interpreted-text role="ref"} - `external tools used by the documentation build `{.interpreted-text role="ref"} For a full list of dependencies, see `dependencies`{.interpreted-text role="ref"}. External dependencies do not need to be installed when working in codespaces. ### Create GitHub Codespace `codespaces`{.interpreted-text role="octicon"} {#development-codespaces} [GitHub Codespaces](https://docs.github.com/codespaces) is a cloud-based in-browser development environment that comes with the appropriate setup to contribute to Matplotlib. 1. Open codespaces on your fork by clicking on the green `code`{.interpreted-text role="octicon"} `Code` button on the GitHub web interface and selecting the `Codespaces` tab. 2. Next, click on \"Open codespaces on \\". You will be able to change branches later, so you can select the default `main` branch. 3. After the codespace is created, you will be taken to a new browser tab where you can use the terminal to activate a pre-defined conda environment called `mpl-dev`: ``` bash conda activate mpl-dev ``` Remember to activate the *mpl-dev* environment whenever you start working on Matplotlib. If you need to open a GUI window with Matplotlib output on Codespaces, our configuration includes a [light-weight Fluxbox-based desktop](https://github.com/devcontainers/features/tree/main/src/desktop-lite). You can use it by connecting to this desktop via your web browser. To do this: 1. Press `F1` or `Ctrl/Cmd+Shift+P` and select `Ports: Focus on Ports View` in the VSCode session to bring it into focus. Open the ports view in your tool, select the `noVNC` port, and click the Globe icon. 2. In the browser that appears, click the Connect button and enter the desktop password (`vscode` by default). Check the [GitHub instructions](https://github.com/devcontainers/features/tree/main/src/desktop-lite#connecting-to-the-desktop) for more details on connecting to the desktop. If you also built the documentation pages, you can view them using Codespaces. Use the \"Extensions\" icon in the activity bar to install the \"Live Server\" extension. Locate the `doc/build/html` folder in the Explorer, right click the file you want to open and select \"Open with Live Server.\" ## Install Matplotlib in editable mode {#development-install} Install Matplotlib in editable mode from the `matplotlib`{.interpreted-text role="file"} directory using the command : ``` bash python -m pip install --verbose --no-build-isolation --editable ".[dev]" ``` The \'editable/develop mode\' builds everything and places links in your Python environment so that Python will be able to import Matplotlib from your development source directory. This allows you to import your modified version of Matplotlib without having to re-install after changing a `.py` or compiled extension file. When working on a branch that does not have Meson enabled, meaning it does not have `26621`{.interpreted-text role="ghpull"} in its history (log), you will have to reinstall from source each time you change any compiled extension code. If the installation is not working, please consult the `troubleshooting guide `{.interpreted-text role="ref"}. If the guide does not offer a solution, please reach out via [chat](https://gitter.im/matplotlib/matplotlib) or `open an issue `{.interpreted-text role="ref"}. ### Build options If you are working heavily with files that need to be compiled, you may want to inspect the compilation log. This can be enabled by setting the environment variable `MESONPY_EDITABLE_VERBOSE`{.interpreted-text role="envvar"} or by setting the `editable-verbose` config during installation : ``` bash python -m pip install --no-build-isolation --config-settings=editable-verbose=true --editable . ``` For more information on installation and other configuration options, see the Meson Python `editable installs guide `{.interpreted-text role="external+meson-python:ref"}. For a list of the other environment variables you can set before install, see `environment-variables`{.interpreted-text role="ref"}. ## Verify the Installation Run the following command to make sure you have correctly installed Matplotlib in editable mode. The command should be run when the virtual environment is activated: ``` bash python -c "import matplotlib; print(matplotlib.__file__)" ``` This command should return : `\lib\matplotlib\__init__.py` We encourage you to run tests and build docs to verify that the code installed correctly and that the docs build cleanly, so that when you make code or document related changes you are aware of the existing issues beforehand. - Run test cases to verify installation `testing`{.interpreted-text role="ref"} - Verify documentation build `documenting-matplotlib`{.interpreted-text role="ref"} ## Install pre-commit hooks {#pre-commit-hooks} [pre-commit](https://pre-commit.com/) hooks save time in the review process by identifying issues with the code before a pull request is formally opened. Most hooks can also aide in fixing the errors, and the checks should have corresponding `development workflow `{.interpreted-text role="ref"} and `pull request `{.interpreted-text role="ref"} guidelines. Hooks are configured in [.pre-commit-config.yaml](https://github.com/matplotlib/matplotlib/blob/main/.pre-commit-config.yaml?) and include checks for spelling and formatting, flake 8 conformity, accidentally committed files, import order, and incorrect branching. Install pre-commit hooks : ``` bash python -m pip install pre-commit pre-commit install ``` Hooks are run automatically after the `git commit` stage of the `editing workflow`{.interpreted-text role="ref"}. When a hook has found and fixed an error in a file, that file must be *staged and committed* again. Hooks can also be run manually. All the hooks can be run, in order as listed in `.pre-commit-config.yaml`, against the full codebase with : ``` bash pre-commit run --all-files ``` To run a particular hook manually, run `pre-commit run` with the hook id : ``` bash pre-commit run --all-files ``` Please note that the `mypy` pre-commit hook cannot check the `type-hints`{.interpreted-text role="ref"} for new functions; instead the stubs for new functions are checked using the `stubtest` `CI check `{.interpreted-text role="ref"} and can be checked locally using `tox -e stubtest`. --- ::: redirect-from /devel/gitwash/development_workflow ::: ::: redirect-from /devel/gitwash/maintainer_workflow ::: # Development workflow ## Workflow summary To keep your work well organized, with readable history, and in turn make it easier for project maintainers (that might be you) to see what you\'ve done, and why you did it, we recommend the following: - Don\'t make changes in your local `main` branch! - Before starting a new set of changes, fetch all changes from `upstream/main`, and start a new *feature branch* from that. - Make a new branch for each feature or bug fix --- \"one task, one branch\". - Name your branch for the purpose of the changes - e.g. `bugfix-for-issue-14` or `refactor-database-code`. - If you get stuck, reach out on Gitter or [discourse](https://discourse.matplotlib.org). - When you\'re ready or need feedback on your code, open a pull request so that the Matplotlib developers can give feedback and eventually include your suggested code into the `main` branch. ### Overview After `setting up a development environment `{.interpreted-text role="ref"}, the typical workflow is: 1. Fetch all changes from `upstream/main`: ``` bash git fetch upstream ``` 2. Start a new *feature branch* from `upstream/main`: ``` bash git checkout -b my-feature upstream/main ``` 3. When you\'re done editing, e.g., `lib/matplotlib/collections.py`, record your changes in Git: ``` bash git add lib/matplotlib/collections.py git commit -m 'a commit message' ``` 4. Push the changes to your GitHub fork: ``` bash git push -u origin my-feature ``` ## Update the `main` branch {#update-mirror-main} First make sure you have followed `installing_for_devs`{.interpreted-text role="ref"}. From time to time you should fetch the upstream changes from GitHub: ``` bash git fetch upstream ``` This will pull down any commits you don\'t have, and set the remote branches to point to the right commit. ## Make a new feature branch {#make-feature-branch} When you are ready to make some changes to the code, you should start a new branch. Branches that are for a collection of related edits are often called \'feature branches\'. Making a new branch for each set of related changes will make it easier for someone reviewing your branch to see what you are doing. Choose an informative name for the branch to remind yourself and the rest of us what the changes in the branch are for. For example `add-ability-to-fly`, or `bugfix-for-issue-42`. The process for creating a new feature branch is: ``` bash # Update the main branch git fetch upstream # Make new feature branch starting at current main git branch my-new-feature upstream/main git checkout my-new-feature ``` If you started making changes on your local `main` branch, you can convert the branch to a feature branch by renaming it: ``` bash git branch -m ``` Generally, you will want to keep your feature branches on your public GitHub fork of Matplotlib. To do this, you `git push` this new branch up to your GitHub repo. Generally, if you followed the instructions in these pages, and by default, git will have a link to your fork of the GitHub repo, called `origin`. You push up to your own fork with: ``` bash git push origin my-new-feature ``` ## The editing workflow {#edit-flow} 1. Make some changes 2. Save the changes 3. See which files have changed with `git status`. You\'ll see a listing like this one: ``` none # On branch ny-new-feature # Changed but not updated: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # # modified: README # # Untracked files: # (use "git add ..." to include in what will be committed) # # INSTALL no changes added to commit (use "git add" and/or "git commit -a") ``` 4. Check what the actual changes are with `git diff`. 5. Add any new files to version control `git add new_file_name`. 6. To commit **all** modified files into the local copy of your repo, type: ``` bash git commit -am 'A commit message' ``` Note the `-am` options to `commit`. The `m` flag signals that you are going to type a message on the command line. The `a` flag stages every file that has been modified, except files listed in `.gitignore`. For more information, see the [git commit](https://git-scm.com/docs/git-commit) manual page. 7. To push the changes up to your forked repo on GitHub, do a `git push`. ## Verify your changes Check that your change does what you intend. For code changes: - If the issue you are working on provided a code example, run that example against your branch and check that you now get the desired result. Note that adapting the issue example is often a good way to create a new test. - Run the tests to check that your change has not had unintended consequences on existing functionality. See `run_tests`{.interpreted-text role="ref"}. For documentation changes, build the documentation locally to check that it renders how you intended and that any new links work correctly. See `build_docs`{.interpreted-text role="ref"}. This is also a good time to look through the `pr-author-guidelines`{.interpreted-text role="ref"} and address as many of the relevant points as you can. ## Open a pull request {#open-pull-request} When you are ready to ask for someone to review your code and consider a merge, [submit your Pull Request (PR)](https://docs.github.com/pull-requests). Go to the web page of *your fork* of the Matplotlib repo, and click `Compare & pull request` to send your changes to the maintainers for review. The base repository is `matplotlib/matplotlib` and the base branch is generally `main`. Enter a title for the set of changes with some explanation of what you\'ve done. Mention anything you\'d like particular attention for - such as a complicated change or some code you are not happy with. If you don\'t think your request is ready to be merged, make a `draft pull request `{.interpreted-text role="ref"} and state what aspects you want to have feedback on. This is a good way of getting some preliminary code review. For more guidance on the mechanics of making a pull request, see GitHub\'s [pull request tutorial](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork). ## Update a pull request {#update-pull-request} When updating your pull request after making revisions, instead of adding new commits, please consider amending your initial commit(s) to keep the commit history clean. You can achieve this by using ``` bash git commit -a --amend --no-edit git push [your-remote-repo] [your-branch] --force-with-lease ``` ::: tip ::: title Tip ::: Instead of typing your branch name every time, you only need to type the following once to link the remote branch to the local branch: git push \--set-upstream origin my-new-feature From now on git will know that `my-new-feature` is related to the `my-new-feature` branch in the GitHub repo. After this, you will be able to push your changes with: git push ::: ## Manage commit history ### Explore your repository To see a graphical representation of the repository branches and commits: ``` bash gitk --all ``` To see a linear list of commits for this branch: ``` bash git log ``` ### Recover from mistakes {#recovering-from-mess-up} Sometimes, you mess up merges or rebases. Luckily, in git it is relatively straightforward to recover from such mistakes. If you mess up during a rebase: ``` bash git rebase --abort ``` If you notice you messed up after the rebase: ``` bash # reset branch back to the saved point git reset --hard tmp ``` If you forgot to make a backup branch: ``` bash # look at the reflog of the branch git reflog show cool-feature 8630830 cool-feature@{0}: commit: BUG: io: close file handles immediately 278dd2a cool-feature@{1}: rebase finished: refs/heads/my-feature-branch onto 11ee694744f2552d 26aa21a cool-feature@{2}: commit: BUG: lib: make seek_gzip_factory not leak gzip obj ... # reset the branch to where it was before the botched rebase git reset --hard cool-feature@{2} ``` ### Rewrite commit history {#rewriting-commit-history} ::: note ::: title Note ::: Do this only for your own feature branches. ::: Is there an embarrassing typo in a commit you made? Or perhaps you made several false starts you don\'t want posterity to see. This can be done via *interactive rebasing*. Suppose that the commit history looks like this: ``` bash git log --oneline eadc391 Fix some remaining bugs a815645 Modify it so that it works 2dec1ac Fix a few bugs + disable 13d7934 First implementation 6ad92e5 * masked is now an instance of a new object, MaskedConstant 29001ed Add pre-nep for a copule of structured_array_extensions. ... ``` and `6ad92e5` is the last commit in the `cool-feature` branch. Suppose we want to make the following changes: - Rewrite the commit message for `13d7934` to something more sensible. - Combine the commits `2dec1ac`, `a815645`, `eadc391` into a single one. We do as follows: ``` bash # make a backup of the current state git branch tmp HEAD # interactive rebase git rebase -i 6ad92e5 ``` This will open an editor with the following text in it: ``` bash pick 13d7934 First implementation pick 2dec1ac Fix a few bugs + disable pick a815645 Modify it so that it works pick eadc391 Fix some remaining bugs # Rebase 6ad92e5..eadc391 onto 6ad92e5 # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ``` To achieve what we want, we will make the following changes to it: ``` bash r 13d7934 First implementation pick 2dec1ac Fix a few bugs + disable f a815645 Modify it so that it works f eadc391 Fix some remaining bugs ``` This means that (i) we want to edit the commit message for `13d7934`, and (ii) collapse the last three commits into one. Now we save and quit the editor. Git will then immediately bring up an editor for editing the commit message. After revising it, we get the output: ``` bash [detached HEAD 721fc64] FOO: First implementation 2 files changed, 199 insertions(+), 66 deletions(-) [detached HEAD 0f22701] Fix a few bugs + disable 1 files changed, 79 insertions(+), 61 deletions(-) Successfully rebased and updated refs/heads/my-feature-branch. ``` and now, the history looks like this: ``` bash 0f22701 Fix a few bugs + disable 721fc64 ENH: Sophisticated feature 6ad92e5 * masked is now an instance of a new object, MaskedConstant ``` If it went wrong, recovery is again possible as explained `above `{.interpreted-text role="ref"}. If you have not yet pushed this branch to github, you can carry on as normal, however if you *have* already pushed this commit see `force-push`{.interpreted-text role="ref"} for how to replace your already published commits with the new ones. ### Rebase onto `upstream/main` {#rebase-on-main} Let\'s say you thought of some work you\'d like to do. You `update-mirror-main`{.interpreted-text role="ref"} and `make-feature-branch`{.interpreted-text role="ref"} called `cool-feature`. At this stage, `main` is at some commit, let\'s call it E. Now you make some new commits on your `cool-feature` branch, let\'s call them A, B, C. Maybe your changes take a while, or you come back to them after a while. In the meantime, `main` has progressed from commit E to commit (say) G: ``` none A---B---C cool-feature / D---E---F---G main ``` At this stage you consider merging `main` into your feature branch, and you remember that this page sternly advises you not to do that, because the history will get messy. Most of the time, you can just ask for a review without worrying about whether `main` has got a little ahead; however sometimes, the changes in `main` might affect your changes, and you need to harmonize them. In this situation you may prefer to do a rebase. `rebase` takes your changes (A, B, C) and replays them as if they had been made to the current state of `main`. In other words, in this case, it takes the changes represented by A, B, C and replays them on top of G. After the rebase, your history will look like this: ``` none A'--B'--C' cool-feature / D---E---F---G main ``` See [rebase without tears](https://matthew-brett.github.io/pydagogue/rebase_without_tears.html) for more detail. To do a rebase on `upstream/main`: ``` bash # Fetch changes from upstream/main git fetch upstream # go to the feature branch git checkout cool-feature # make a backup in case you mess up git branch tmp cool-feature # rebase cool-feature onto main git rebase --onto upstream/main upstream/main cool-feature ``` In this situation, where you are already on branch `cool-feature`, the last command can be written more succinctly as: ``` bash git rebase upstream/main ``` When all looks good, you can delete your backup branch: ``` bash git branch -D tmp ``` If it doesn\'t look good you may need to have a look at `recovering-from-mess-up`{.interpreted-text role="ref"}. If you have made changes to files that have also changed in `main`, this may generate merge conflicts that you need to resolve - see the [git rebase](https://git-scm.com/docs/git-rebase) man page for some instructions at the end of the \"Description\" section. There is some related help on merging in the git user manual - see [resolving a merge](https://schacon.github.io/git/user-manual.html#resolving-a-merge). If you have not yet pushed this branch to github, you can carry on as normal, however if you *have* already pushed this commit see `force-push`{.interpreted-text role="ref"} for how to replace your already published commits with the new ones. ### Push with force {#force-push} If you have in some way re-written already pushed history (e.g. via `rewriting-commit-history`{.interpreted-text role="ref"} or `rebase-on-main`{.interpreted-text role="ref"}) leaving you with a git history that looks something like ``` none A'--E cool-feature / D---A---B---C origin/cool-feature ``` where you have pushed the commits `A,B,C` to your fork on GitHub (under the remote name *origin*) but now have the commits `A'` and `E` on your local branch *cool-feature*. If you try to push the new commits to GitHub, it will fail and show an error that looks like : ``` bash $ git push Pushing to github.com:origin/matplotlib.git To github.com:origin/matplotlib.git ! [rejected] cool_feature -> cool_feature (non-fast-forward) error: failed to push some refs to 'github.com:origin/matplotlib.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. ``` If this push had succeeded, the commits `A`, `B`, and `C` would no longer be referenced by any branch and they would be discarded: ``` none D---A'---E cool-feature, origin/cool-feature ``` By default `git push` helpfully tries to protect you from accidentally discarding commits by rejecting the push to the remote. When this happens, GitHub also adds the helpful suggestion to pull the remote changes and then try pushing again. In some cases, such as if you and a colleague are both committing and pushing to the same branch, this is a correct course of action. However, in the case of having intentionally re-written history, we *want* to discard the commits on the remote and replace them with the new-and-improved versions from our local branch. In this case, what we want to do is : ``` bash $ git push --force-with-lease ``` which tells git you are aware of the risks and want to do the push anyway. We recommend using `--force-with-lease` over the `--force` flag. The `--force` will do the push no matter what, whereas `--force-with-lease` will only do the push if the remote branch is where the local `git` client thought it was. Be judicious with force-pushing. It is effectively re-writing published history, and if anyone has fetched the old commits, it will have a different view of history which can cause confusion. ## Automated tests Whenever a pull request is created or updated, various automated test tools will run on all supported platforms and versions of Python. - [tox]() is not used in the automated testing. It is supported for testing locally. - Codecov and CodeQL are currently for information only. Their failure is not necessarily a blocker. Make sure the Linting, GitHub Actions, AppVeyor, CircleCI, and Azure pipelines are passing before merging. All checks are listed at the bottom of the GitHub page of your pull request. +-------------+-------------+------------------------------------------+ | Name | Check | Tips for finding cause of failure | +=============+=============+==========================================+ | Linting | `code styl | Errors are displayed as annotations on | | | e `{.inter | | | | preted-text | | | | role="ref"} | | +-------------+-------------+------------------------------------------+ | | Mypy | `stati | Errors are displayed as annotations on | | | Stubtest | c type hint | the pull request diff. | | | s `{.inter | | | | preted-text | | | | role="ref"} | | +-------------+-------------+------------------------------------------+ | CircleCI | `docu | Search the CircleCI log for `WARNING`. | | | mentation b | | | | uild `{.inter | | | | preted-text | | | | role="ref"} | | +-------------+-------------+------------------------------------------+ | | GitHub | `t | | Search the log for `FAILURES`. | | Actions | ests `{.inter | information on failed tests. | | | Azure | preted-text | | | | pipelines | role="ref"} | | On Azure, find the images as | | | | *artifacts* of the Azure job: | | | | | 1. Click *Details* on the check on the | | | | GitHub PR page. | | | | | 2. Click *View more details on Azure | | | | Pipelines* to go to Azure. | | | | | 3. On the overview page *artifacts* | | | | are listed in the section *Related*. | +-------------+-------------+------------------------------------------+ ### Skip CI checks If you know only a subset of CI checks need to be run, you can skip unneeded CI checks on individual commits by including the following strings in the commit message: +-----------------+-------------+--------------------------------------+ | String | Effect | Notes | +=================+=============+======================================+ | `[ci doc]` | Only run | | For when you have only changed | | | do | documentation. | | | cumentation | | `[ci doc]` is applied | | | checks. | automatically when the changes are | | | | only to files in `doc/**/` or | | | | `galleries/**/` | +-----------------+-------------+--------------------------------------+ | `[skip doc]` | Skip | For when you didn\'t change | | | do | documentation. | | | cumentation | | | | checks. | | +-----------------+-------------+--------------------------------------+ | `[ | Skip | Substring must be in first line of | | skip appveyor]` | AppVeyor | commit message. | | | run. | | +-----------------+-------------+--------------------------------------+ | `[skip azp]` | Skip Azure | | | | Pipelines. | | +-----------------+-------------+--------------------------------------+ | ` | Skip GitHub | | | [skip actions]` | Actions. | | +-----------------+-------------+--------------------------------------+ | `[skip ci]` | Skip all CI | Use only for changes where | | | checks. | documentation checks and unit tests | | | | do not apply. | +-----------------+-------------+--------------------------------------+ `[skip actions]` and `[skip ci]` only skip Github Actions CI workflows that are triggered on `on: push` and `on: pull_request` events. For more information, see [Skipping workflow runs](https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs). --- ::: redirect-from /devel/documenting_mpl ::: # Write documentation {#documenting-matplotlib} ## Getting started ### General file structure All documentation is built from the `doc/`{.interpreted-text role="file"}. The `doc/`{.interpreted-text role="file"} directory contains configuration files for Sphinx and reStructuredText ([ReST](https://docutils.sourceforge.io/rst.html); `.rst`) files that are rendered to documentation pages. Documentation is created in three ways. First, API documentation (`doc/api`{.interpreted-text role="file"}) is created by [Sphinx](http://www.sphinx-doc.org) from the docstrings of the classes in the Matplotlib library. Except for `doc/api/api_changes/`{.interpreted-text role="file"}, `.rst` files in `doc/api`{.interpreted-text role="file"} are created when the documentation is built. See `writing-docstrings`{.interpreted-text role="ref"} below. Second, our example pages, tutorials, and some of the narrative documentation are created by [Sphinx Gallery](https://sphinx-gallery.readthedocs.io/en/latest/). Sphinx Gallery converts example Python files to `*.rst` files with the result of Matplotlib plot calls as embedded images. See `writing-examples-and-tutorials`{.interpreted-text role="ref"} below. Third, Matplotlib has narrative docs written in [ReST](https://docutils.sourceforge.io/rst.html) in subdirectories of `doc/users/`{.interpreted-text role="file"}. If you would like to add new documentation that is suited to an `.rst` file rather than a gallery or tutorial example, choose an appropriate subdirectory to put it in, and add the file to the table of contents of `index.rst`{.interpreted-text role="file"} of the subdirectory. See `writing-rest-pages`{.interpreted-text role="ref"} below. ::: note ::: title Note ::: Don\'t directly edit the `.rst` files in `doc/plot_types`{.interpreted-text role="file"}, `doc/gallery`{.interpreted-text role="file"}, `doc/tutorials`{.interpreted-text role="file"}, and `doc/api`{.interpreted-text role="file"} (excepting `doc/api/api_changes/`{.interpreted-text role="file"}). [Sphinx](http://www.sphinx-doc.org) regenerates files in these directories when building documentation. ::: ### Set up the build The documentation for Matplotlib is generated from reStructuredText ([ReST](https://docutils.sourceforge.io/rst.html)) using the [Sphinx](http://www.sphinx-doc.org) documentation generation tool. To build the documentation you will need to `set up Matplotlib for development `{.interpreted-text role="ref"}. Note in particular the `additional dependencies `{.interpreted-text role="ref"} required to build the documentation. ### Build the docs {#build_docs} The documentation sources are found in the `doc/`{.interpreted-text role="file"} directory. The configuration file for Sphinx is `doc/conf.py`{.interpreted-text role="file"}. It controls which directories Sphinx parses, how the docs are built, and how the extensions are used. To build the documentation in html format, cd into `doc/`{.interpreted-text role="file"} and run: ``` sh make html ``` ::: note ::: title Note ::: Since the documentation is very large, the first build may take 10-20 minutes, depending on your machine. Subsequent builds will be faster. ::: Other useful invocations include ``` sh # Build the html documentation, but skip generation of the gallery images to # save time. make html-noplot # Build the html documentation, but skip specific subdirectories. If a gallery # directory is skipped, the gallery images are not generated. The first # time this is run, it creates ``.mpl_skip_subdirs.yaml`` which can be edited # to add or remove subdirectories make html-skip-subdirs # Delete built files. May help if you get errors about missing paths or # broken links. make clean # Build pdf docs. make latexpdf ``` The `SPHINXOPTS` variable is set to `-W --keep-going` by default to build the complete docs but exit with exit status 1 if there are warnings. To unset it, use ``` sh make SPHINXOPTS= html ``` You can use the `O` variable to set additional options: - `make O=-j4 html` runs a parallel build with 4 processes. - `make O=-Dplot_formats=png:100 html` saves figures in low resolution. Multiple options can be combined, e.g. `make O='-j4 -Dplot_formats=png:100' html`. On Windows, set the options as environment variables, e.g.: ``` bat set SPHINXOPTS= & set O=-j4 -Dplot_formats=png:100 & make html ``` ### Show locally built docs The built docs are available in the folder `build/html`{.interpreted-text role="file"}. A shortcut for opening them in your default browser is: ``` sh make show ``` ## Write ReST pages {#writing-rest-pages} Most documentation is either in the docstrings of individual classes and methods, in explicit `.rst` files, or in examples and tutorials. All of these use the [ReST](https://docutils.sourceforge.io/rst.html) syntax and are processed by [Sphinx](http://www.sphinx-doc.org). The [Sphinx reStructuredText Primer](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) is a good introduction into using ReST. More complete information is available in the [reStructuredText reference documentation](https://docutils.sourceforge.io/rst.html#reference-documentation). This section contains additional information and conventions how ReST is used in the Matplotlib documentation. ### Formatting and style conventions It is useful to strive for consistency in the Matplotlib documentation. Here are some formatting and style conventions that are used. #### Section formatting Use [sentence case](https://apastyle.apa.org/style-grammar-guidelines/capitalization/sentence-case) `Upper lower` for section titles, e.g., `Possible hangups` rather than `Possible Hangups`. We aim to follow the recommendations from the [Python documentation](https://devguide.python.org/documenting/#sections) and the [Sphinx reStructuredText documentation](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#sections) for section markup characters, i.e.: - `#` with overline, for parts. This is reserved for the main title in `index.rst`. All other pages should start with \"chapter\" or lower. - `*` with overline, for chapters - `=`, for sections - `-`, for subsections - `^`, for subsubsections - `"`, for paragraphs This may not yet be applied consistently in existing docs. #### Table formatting Given the size of the table and length of each entry, use: ------------- ---------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------- small table large table short entry [simple or grid [grid table](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#tables) table](https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#grid-tables) long entry [list table](https://docutils.sourceforge.io/docs/ref/rst/directives.html#list-table) [csv table](https://docutils.sourceforge.io/docs/ref/rst/directives.html#csv-table-1) ------------- ---------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------- For more information, see [rst tables](https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#tables). #### Function arguments Function arguments and keywords within docstrings should be referred to using the `*emphasis*` role. This will keep Matplotlib\'s documentation consistent with Python\'s documentation: ``` rst Here is a description of *argument* ``` Do not use the `` `default role ``\`: ``` rst Do not describe `argument` like this. As per the next section, this syntax will (unsuccessfully) attempt to resolve the argument as a link to a class or method in the library. ``` nor the ``literal`` role: ``` rst Do not describe ``argument`` like this. ``` ### Refer to other documents and sections {#internal-section-refs} [Sphinx](http://www.sphinx-doc.org) supports internal [references](https://www.sphinx-doc.org/en/stable/usage/restructuredtext/roles.html): Role Links target Representation in rendered HTML ----------- ----------------- --------------------------------------------- `:doc:`\_ document link to a page `:ref:`\_ reference label link to an anchor associated with a heading Examples: ``` rst See the :doc:`/install/index` See the tutorial :ref:`quick_start` See the example :doc:`/gallery/lines_bars_and_markers/simple_plot` ``` will render as: > See the `/install/index`{.interpreted-text role="doc"} > > See the tutorial `quick_start`{.interpreted-text role="ref"} > > See the example > `/gallery/lines_bars_and_markers/simple_plot`{.interpreted-text > role="doc"} Sections can also be given reference labels. For instance from the `/install/index`{.interpreted-text role="doc"} link: ``` rst .. _clean-install: How to completely remove Matplotlib =================================== Occasionally, problems with Matplotlib can be solved with a clean... ``` and refer to it using the standard reference syntax: ``` rst See :ref:`clean-install` ``` will give the following link: `clean-install`{.interpreted-text role="ref"} To maximize internal consistency in section labeling and references, use hyphen separated, descriptive labels for section references. Keep in mind that contents may be reorganized later, so avoid top level names in references like `user` or `devel` or `faq` unless necessary, because for example the FAQ \"what is a backend?\" could later become part of the users guide, so the label: ``` rst .. _what-is-a-backend: ``` is better than: ``` rst .. _faq-backend: ``` In addition, since underscores are widely used by Sphinx itself, use hyphens to separate words. ### Refer to other code {#referring-to-other-code} To link to other methods, classes, or modules in Matplotlib you can use back ticks, for example: ``` rst `matplotlib.collections.LineCollection` ``` generates a link like this: [matplotlib.collections.LineCollection]{.title-ref}. *Note:* We use the sphinx setting `default_role = 'obj'` so that you don\'t have to use qualifiers like `:class:`, `:func:`, `:meth:` and the likes. Often, you don\'t want to show the full package and module name. As long as the target is unambiguous you can simply leave them out: ``` rst `.LineCollection` ``` and the link still works: [.LineCollection]{.title-ref}. Note that you should typically include the leading dot. It tells Sphinx to look for the given name in the whole project. See also the explanation at [Sphinx: Cross-referencing Python objects](https://www.sphinx-doc.org/en/master/usage/domains/python.html#cross-referencing-python-objects). If there are multiple code elements with the same name (e.g. `plot()` is a method in multiple classes), you\'ll have to extend the definition: ``` rst `.pyplot.plot` or `.Axes.plot` ``` These will show up as [.pyplot.plot]{.title-ref} or [.Axes.plot]{.title-ref}. To still show only the last segment you can add a tilde as prefix: ``` rst `~.pyplot.plot` or `~.Axes.plot` ``` will render as [\~.pyplot.plot]{.title-ref} or [\~.Axes.plot]{.title-ref}. Other packages can also be linked via [intersphinx](http://www.sphinx-doc.org/en/master/ext/intersphinx.html): ``` rst `numpy.mean` ``` will return this link: [numpy.mean]{.title-ref}. This works for Python, Numpy, Scipy, and Pandas (full list is in `doc/conf.py`{.interpreted-text role="file"}). If external linking fails, you can check the full list of referenceable objects with the following commands: python -m sphinx.ext.intersphinx 'https://docs.python.org/3/objects.inv' python -m sphinx.ext.intersphinx 'https://numpy.org/doc/stable/objects.inv' python -m sphinx.ext.intersphinx 'https://docs.scipy.org/doc/scipy/objects.inv' python -m sphinx.ext.intersphinx 'https://pandas.pydata.org/pandas-docs/stable/objects.inv' ### Include figures and files {#rst-figures-and-includes} Image files can directly included in pages with the `image::` directive. e.g., `tutorials/intermediate/constrainedlayout_guide.py`{.interpreted-text role="file"} displays a couple of static images: # .. image:: /_static/constrained_layout_1b.png # :align: center Files can be included verbatim. For instance the `LICENSE` file is included at `license-agreement`{.interpreted-text role="ref"} using : .. literalinclude:: ../../LICENSE/LICENSE The examples directory is copied to `doc/gallery`{.interpreted-text role="file"} by sphinx-gallery, so plots from the examples directory can be included using ``` rst .. plot:: gallery/lines_bars_and_markers/simple_plot.py ``` Note that the python script that generates the plot is referred to, rather than any plot that is created. Sphinx-gallery will provide the correct reference when the documentation is built. ### Tools for writing mathematical expressions In most cases, you will likely want to use one of [Sphinx\'s builtin Math extensions](https://www.sphinx-doc.org/en/master/usage/extensions/math.html). In rare cases we want the rendering of the mathematical text in the documentation html to exactly match with the rendering of the mathematical expression in the Matplotlib figure. In these cases, you can use the [matplotlib.sphinxext.mathmpl]{.title-ref} Sphinx extension (See also the `../users/explain/text/mathtext`{.interpreted-text role="doc"} tutorial.) ## Write API documentation {#writing-docstrings} The API reference documentation describes the library interfaces, e.g. inputs, outputs, and expected behavior. Most of the API documentation is written in docstrings. These are comment blocks in source code that explain how the code works. All docstrings should conform to the [numpydoc docstring guide](https://numpydoc.readthedocs.io/en/latest/format.html). Much of the [ReST](https://docutils.sourceforge.io/rst.html) syntax discussed above (`writing-rest-pages`{.interpreted-text role="ref"}) can be used for links and references. ::: note ::: title Note ::: Some parts of the documentation do not yet conform to the current documentation style. If in doubt, follow the rules given here and not what you may see in the source code. Pull requests updating docstrings to the current style are very welcome. ::: The pages in `doc/api`{.interpreted-text role="file"} are purely technical definitions of layout; therefore new API reference documentation should be added to the module docstrings. This placement keeps all API reference documentation about a module in the same file. These module docstrings eventually populate the `doc/api`{.interpreted-text role="file"} directory and form the reference documentation for the library. ### Example docstring An example docstring looks like: ``` python def hlines(self, y, xmin, xmax, colors=None, linestyles='solid', label='', **kwargs): """ Plot horizontal lines at each *y* from *xmin* to *xmax*. Parameters ---------- y : float or array-like y-indexes where to plot the lines. xmin, xmax : float or array-like Respective beginning and end of each line. If scalars are provided, all lines will have the same length. colors : list of colors, default: :rc:`lines.color` linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, optional label : str, default: '' Returns ------- `~matplotlib.collections.LineCollection` Other Parameters ---------------- data : indexable object, optional DATA_PARAMETER_PLACEHOLDER **kwargs : `~matplotlib.collections.LineCollection` properties. See Also -------- vlines : vertical lines axhline : horizontal line across the Axes """ ``` See the [\~.Axes.hlines]{.title-ref} documentation for how this renders. The [Sphinx](http://www.sphinx-doc.org) website also contains plenty of [documentation](https://www.sphinx-doc.org/en/master/contents.html) concerning ReST markup and working with Sphinx in general. ### Formatting conventions The basic docstring conventions are covered in the [numpydoc docstring guide](https://numpydoc.readthedocs.io/en/latest/format.html) and the [Sphinx](http://www.sphinx-doc.org) documentation. Some Matplotlib-specific formatting conventions to keep in mind: #### Quote positions The quotes for single line docstrings are on the same line (pydocstyle D200): def get_linewidth(self): """Return the line width in points.""" The quotes for multi-line docstrings are on separate lines (pydocstyle D213): def set_linestyle(self, ls): """ Set the linestyle of the line. [...] """ #### Function arguments Function arguments and keywords within docstrings should be referred to using the `*emphasis*` role. This will keep Matplotlib\'s documentation consistent with Python\'s documentation: ``` rst If *linestyles* is *None*, the default is 'solid'. ``` Do not use the `` `default role ``[ or the ]{.title-ref}`` `literal ```` role: .. code-block:: rst Neither `argument` nor ``argument`should be used. Quotes for strings ^^^^^^^^^^^^^^^^^^ Matplotlib does not have a convention whether to use single-quotes or double-quotes. There is a mixture of both in the current code. Use simple single or double quotes when giving string values, e.g. .. code-block:: rst If 'tight', try to figure out the tight bbox of the figure. No`\'extra\'`literal quotes. The use of extra literal quotes around the text is discouraged. While they slightly improve the rendered docs, they are cumbersome to type and difficult to read in plain-text docs. Parameter type descriptions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ The main goal for parameter type descriptions is to be readable and understandable by humans. If the possible types are too complex use a simplification for the type description and explain the type more precisely in the text. We do not use formal type annotation syntax for type descriptions in docstrings; e.g. we use`list of str`rather than`list\[str\]`; we use`int or str`rather than`int \| str`or`Union\[int, str\]`` . Generally, the `numpydoc docstring guide`_ conventions apply. The following rules expand on them where the numpydoc conventions are not specific. Use ``float`for a type that can be any number. Use`(float, float)`to describe a 2D position. The parentheses should be included to make the tuple-ness more obvious. Use`array-like`for homogeneous numeric sequences, which could typically be a numpy.array. Dimensionality may be specified using`2D`,`3D`,`n-dimensional`. If you need to have variables denoting the sizes of the dimensions, use capital letters in brackets (`(M, N) array-like`). When referring to them in the text they are easier read and no special formatting is needed. Use`array`instead of`array-like`for return types if the returned object is indeed a numpy array.`float`is the implicit default dtype for array-likes. For other dtypes use`array-like of int`` . Some possible uses:: 2D array-like (N,) array-like (M, N) array-like (M, N, 3) array-like array-like of int Non-numeric homogeneous sequences are described as lists, e.g.:: list of str list of `.Artist` Reference types ^^^^^^^^^^^^^^^ Generally, the rules from referring-to-other-code_ apply. More specifically: Use full references ``[\~matplotlib.colors.Normalize]{.title-ref}`with an abbreviation tilde in parameter types. While the full name helps the reader of plain text docstrings, the HTML does not need to show the full name as it links to it. Hence, the`\~`-shortening keeps it more readable. Use abbreviated links`[.Normalize]{.title-ref}`` in the text. .. code-block:: rst norm : `~matplotlib.colors.Normalize`, optional A `.Normalize` instance is used to scale luminance data to 0, 1. Default values ^^^^^^^^^^^^^^ As opposed to the numpydoc guide, parameters need not be marked as *optional* if they have a simple default: - use ``{name} : {type}, default: {val}`when possible. - use`{name} : {type}, optional`` and describe the default in the text if it cannot be explained sufficiently in the recommended manner. The default value should provide semantic information targeted at a human reader. In simple cases, it restates the value in the function signature. If applicable, units should be added. .. code-block:: rst Prefer: interval : int, default: 1000ms over: interval : int, default: 1000 If *None* is only used as a sentinel value for "parameter not specified", do not document it as the default. Depending on the context, give the actual default, or mark the parameter as optional if not specifying has no particular effect. .. code-block:: rst Prefer: dpi : float, default: :rc:`figure.dpi` over: dpi : float, default: None Prefer: textprops : dict, optional Dictionary of keyword parameters to be passed to the `~matplotlib.text.Text` instance contained inside TextArea. over: textprops : dict, default: None Dictionary of keyword parameters to be passed to the `~matplotlib.text.Text` instance contained inside TextArea. ``See also`sections ^^^^^^^^^^^^^^^^^^^^^ Sphinx automatically links code elements in the definition blocks of`See also`sections. No need to use backticks there:: See Also -------- vlines : vertical lines axhline : horizontal line across the Axes Wrap parameter lists ^^^^^^^^^^^^^^^^^^^^ Long parameter lists should be wrapped using a`\`\` for continuation and starting on the new line without any indent (no indent because pydoc will parse the docstring and strip the line continuation so that indent would result in a lot of whitespace within the line): ``` python def add_axes(self, *args, **kwargs): """ ... Parameters ---------- projection : {'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', \ 'rectilinear'}, optional The projection type of the axes. ... """ ``` Alternatively, you can describe the valid parameter values in a dedicated section of the docstring. #### rcParams rcParams can be referenced with the custom `:rc:` role: `` :rc:\`foo\` `` yields `rcParams["foo"] = 'default'`, which is a link to the `matplotlibrc`{.interpreted-text role="file"} file description. ### Setters and getters Artist properties are implemented using setter and getter methods (because Matplotlib predates the Python [property]{.title-ref} decorator). By convention, these setters and getters are named `set_PROPERTYNAME` and `get_PROPERTYNAME`; the list of properties thusly defined on an artist and their values can be listed by the [\~.pyplot.setp]{.title-ref} and [\~.pyplot.getp]{.title-ref} functions. The Parameters block of property setter methods is parsed to document the accepted values, e.g. the docstring of [.Line2D.set_linestyle]{.title-ref} starts with ``` python def set_linestyle(self, ls): """ Set the linestyle of the line. Parameters ---------- ls : {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} etc. """ ``` which results in the following line in the output of `plt.setp(line)` or `plt.setp(line, "linestyle")`: linestyle or ls: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} In some rare cases (mostly, setters which accept both a single tuple and an unpacked tuple), the accepted values cannot be documented in such a fashion; in that case, they can be documented as an `.. ACCEPTS:` block, e.g. for \`.axes.Axes.set_xlim\`: ``` python def set_xlim(self, left=None, right=None): """ Set the x-axis view limits. Parameters ---------- left : float, optional The left xlim in data coordinates. Passing *None* leaves the limit unchanged. The left and right xlims may also be passed as the tuple (*left*, *right*) as the first positional argument (or as the *left* keyword argument). .. ACCEPTS: (bottom: float, top: float) right : float, optional etc. """ ``` Note that the leading `..` makes the `.. ACCEPTS:` block a reST comment, hiding it from the rendered docs. ### Keyword arguments ::: note ::: title Note ::: The information in this section is being actively discussed by the development team, so use the docstring interpolation only if necessary. This section has been left in place for now because this interpolation is part of the existing documentation. ::: Since Matplotlib uses a lot of pass-through `kwargs`, e.g., in every function that creates a line ([\~.pyplot.plot]{.title-ref}, [\~.pyplot.semilogx]{.title-ref}, [\~.pyplot.semilogy]{.title-ref}, etc.), it can be difficult for the new user to know which `kwargs` are supported. Matplotlib uses a docstring interpolation scheme to support documentation of every function that takes a `**kwargs`. The requirements are: 1. single point of configuration so changes to the properties don\'t require multiple docstring edits. 2. as automated as possible so that as properties change, the docs are updated automatically. The `@_docstring.interpd` decorator implements this. Any function accepting [.Line2D]{.title-ref} pass-through `kwargs`, e.g., [matplotlib.axes.Axes.plot]{.title-ref}, can list a summary of the [.Line2D]{.title-ref} properties, as follows: ``` python # in axes.py @_docstring.interpd def plot(self, *args, **kwargs): """ Some stuff omitted Other Parameters ---------------- scalex, scaley : bool, default: True These parameters determine if the view limits are adapted to the data limits. The values are passed on to `autoscale_view`. **kwargs : `.Line2D` properties, optional *kwargs* are used to specify properties like a line label (for auto legends), linewidth, antialiasing, marker face color. Example:: >>> plot([1, 2, 3], [1, 2, 3], 'go-', label='line 1', linewidth=2) >>> plot([1, 2, 3], [1, 4, 9], 'rs', label='line 2') If you specify multiple lines with one plot call, the kwargs apply to all those lines. In case the label object is iterable, each element is used as labels for each set of data. Here is a list of available `.Line2D` properties: %(Line2D:kwdoc)s """ ``` The `%(Line2D:kwdoc)` syntax makes `interpd` lookup an [.Artist]{.title-ref} subclass named `Line2D`, and call [.artist.kwdoc]{.title-ref} on that class. [.artist.kwdoc]{.title-ref} introspects the subclass and summarizes its properties as a substring, which gets interpolated into the docstring. Note that this scheme does not work for decorating an Artist\'s `__init__`, as the subclass and its properties are not defined yet at that point. Instead, `@_docstring.interpd` can be used to decorate the class itself \-- at that point, [.kwdoc]{.title-ref} can list the properties and interpolate them into `__init__.__doc__`. ### Inherit docstrings If a subclass overrides a method but does not change the semantics, we can reuse the parent docstring for the method of the child class. Python does this automatically, if the subclass method does not have a docstring. Use a plain comment `# docstring inherited` to denote the intention to reuse the parent docstring. That way we do not accidentally create a docstring in the future: class A: def foo(): """The parent docstring.""" pass class B(A): def foo(): # docstring inherited pass ### Add figures {#docstring-adding-figures} As above (see `rst-figures-and-includes`{.interpreted-text role="ref"}), figures in the examples gallery can be referenced with a `.. plot::` directive pointing to the python script that created the figure. For instance the [\~.Axes.legend]{.title-ref} docstring references the file `examples/text_labels_and_annotations/legend.py`{.interpreted-text role="file"}: ``` python """ ... Examples -------- .. plot:: gallery/text_labels_and_annotations/legend.py """ ``` Note that `examples/text_labels_and_annotations/legend.py` has been mapped to `gallery/text_labels_and_annotations/legend.py`, a redirection that may be fixed in future re-organization of the docs. Plots can also be directly placed inside docstrings. Details are in `/api/sphinxext_plot_directive_api`{.interpreted-text role="doc"}. A short example is: ``` python """ ... Examples -------- .. plot:: import matplotlib.image as mpimg img = mpimg.imread('_static/stinkbug.png') imgplot = plt.imshow(img) """ ``` An advantage of this style over referencing an example script is that the code will also appear in interactive docstrings. ### Generate inheritance diagrams {#inheritance-diagrams} Class inheritance diagrams can be generated with the Sphinx [inheritance-diagram](https://www.sphinx-doc.org/en/master/usage/extensions/inheritance.html) directive. Example: ``` rst .. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text :parts: 2 ``` ::: {.inheritance-diagram parts="2"} matplotlib.patches matplotlib.lines matplotlib.text ::: ## Write examples and tutorials {#writing-examples-and-tutorials} Examples and tutorials are Python scripts that are run by [Sphinx Gallery](https://sphinx-gallery.readthedocs.io/en/latest/). Sphinx Gallery finds `*.py` files in source directories and runs the files to create images and narrative that are embedded in `*.rst` files in a build location of the `doc/`{.interpreted-text role="file"} directory. Files in the build location should not be directly edited as they will be overwritten by Sphinx gallery. Currently Matplotlib has four galleries as follows: Source location Build location ---------------------------------------------------------- ---------------------------------------------------- `galleries/plot_types`{.interpreted-text role="file"} `doc/plot_types`{.interpreted-text role="file"} `galleries/examples`{.interpreted-text role="file"} `doc/gallery`{.interpreted-text role="file"} `galleries/tutorials`{.interpreted-text role="file"} `doc/tutorials`{.interpreted-text role="file"} `galleries/users_explain`{.interpreted-text role="file"} `doc/users/explain`{.interpreted-text role="file"} The first three are traditional galleries. The last, `galleries/users_explain`{.interpreted-text role="file"}, is a mixed gallery where some of the files are raw `*.rst` files and some are `*.py` files; Sphinx Gallery just copies these `*.rst` files from the source location to the build location (see `raw_restructured_gallery`{.interpreted-text role="ref"}, below). In the Python files, to exclude an example from having a plot generated, insert \"sgskip\" somewhere in the filename. The format of these files is relatively straightforward. Properly formatted comment blocks are treated as [ReST](https://docutils.sourceforge.io/rst.html) text, the code is displayed, and figures are put into the built page. Matplotlib uses the `# %%` section separator so that IDEs will identify \"code cells\" to make it easy to re-run sub-sections of the example. For instance the example `/gallery/lines_bars_and_markers/simple_plot`{.interpreted-text role="doc"} example is generated from `/galleries/examples/lines_bars_and_markers/simple_plot.py`{.interpreted-text role="file"}, which looks like: ``` python """ =========== Simple Plot =========== Create a simple plot. """ import matplotlib.pyplot as plt import numpy as np # Data for plotting t = np.arange(0.0, 2.0, 0.01) s = 1 + np.sin(2 * np.pi * t) # Note that using plt.subplots below is equivalent to using # fig = plt.figure and then ax = fig.add_subplot(111) fig, ax = plt.subplots() ax.plot(t, s) ax.set(xlabel='time (s)', ylabel='voltage (mV)', title='About as simple as it gets, folks') ax.grid() plt.show() ``` The first comment block is treated as [ReST](https://docutils.sourceforge.io/rst.html) text. The other comment blocks render as comments in `/gallery/lines_bars_and_markers/simple_plot`{.interpreted-text role="doc"}. Tutorials are made with the exact same mechanism, except they are longer and typically have more than one comment block (i.e. `quick_start`{.interpreted-text role="ref"}). The first comment block can be the same as the example above. Subsequent blocks of ReST text are delimited by the line `# %%` : ``` python """ =========== Simple Plot =========== Create a simple plot. """ ... ax.grid() plt.show() # %% # Second plot # =========== # # This is a second plot that is very nice fig, ax = plt.subplots() ax.plot(np.sin(range(50))) ``` In this way text, code, and figures are output in a \"notebook\" style. ### Sample data When sample data comes from a public dataset, please cite the source of the data. Sample data should be written out in the code. When this is not feasible, the data can be loaded using [.cbook.get_sample_data]{.title-ref}. ``` python import matplotlib.cbook as cbook fh = cbook.get_sample_data('mydata.dat') ``` If the data is too large to be included in the code, it should be added to `lib/matplotlib/mpl-data/sample_data/`{.interpreted-text role="file"} ### Create mini-gallery The showcased Matplotlib functions should be listed in an admonition at the bottom as follows ``` python # %% # # .. admonition:: References # # The use of the following functions, methods, classes and modules is shown # in this example: # # - `matplotlib.axes.Axes.fill` / `matplotlib.pyplot.fill` # - `matplotlib.axes.Axes.axis` / `matplotlib.pyplot.axis` ``` This allows sphinx-gallery to place an entry to the example in the mini-gallery of the mentioned functions. Whether or not a function is mentioned here should be decided depending on if a mini-gallery link prominently helps to illustrate that function; e.g. mention `matplotlib.pyplot.subplots` only in examples that are about laying out subplots, not in every example that uses it. Functions that exist in `pyplot` as well as in Axes or Figure should mention both references no matter which one is used in the example code. The `pyplot` reference should always be the second to mention; see the example above. ### Order examples The order of the sections of the `tutorials`{.interpreted-text role="ref"} and the `gallery`{.interpreted-text role="ref"}, as well as the order of the examples within each section are determined in a two step process from within the `/doc/sphinxext/gallery_order.py`{.interpreted-text role="file"}: - *Explicit order*: This file contains a list of folders for the section order and a list of examples for the subsection order. The order of the items shown in the doc pages is the order those items appear in those lists. - *Implicit order*: If a folder or example is not in those lists, it will be appended after the explicitly ordered items and all of those additional items will be ordered by pathname (for the sections) or by filename (for the subsections). As a consequence, if you want to let your example appear in a certain position in the gallery, extend those lists with your example. In case no explicit order is desired or necessary, still make sure to name your example consistently, i.e. use the main function or subject of the example as first word in the filename; e.g. an image example should ideally be named similar to `imshow_mynewexample.py`{.interpreted-text role="file"}. ### Raw restructured text files in the gallery {#raw_restructured_gallery} [Sphinx Gallery](https://sphinx-gallery.readthedocs.io/en/latest/) folders usually consist of a `README.txt` and a series of Python source files that are then translated to an `index.rst` file and a series of `example_name.rst` files in the `doc/`{.interpreted-text role="file"} subdirectories. However, Sphinx Gallery also allows raw `*.rst` files to be passed through a gallery (see [Manually passing files](https://sphinx-gallery.github.io/stable/configuration.html#manually-passing-files) in the Sphinx Gallery documentation). We use this feature in `galleries/users_explain`{.interpreted-text role="file"}, where, for instance, `galleries/users_explain/colors`{.interpreted-text role="file"} is a regular Sphinx Gallery subdirectory, but `galleries/users_explain/artists`{.interpreted-text role="file"} has a mix of `*.rst` and `*py` files. For mixed subdirectories like this, we must add any `*.rst` files to a `:toctree:`, either in the `README.txt` or in a manual `index.rst`. ### Examples guidelines The gallery of examples contains visual demonstrations of matplotlib features. Gallery examples exist so that users can scan through visual examples. Unlike tutorials or user guides, gallery examples teach by demonstration, rather than by explanation or instruction. Gallery examples should contain a very brief description of *what* is being demonstrated and, when relevant, *how* it is achieved. Explanations should be brief, providing only the minimal context necessary for understanding the example. Cross-link related documentation (e.g. tutorials, user guides and API entries) and tag the example with related concepts. #### Format All `examples-index`{.interpreted-text role="ref"} should aim to follow these guidelines: Title : Describe content in a short sentence (approx. 1-6 words). Do not use *demo* as this is implied by being an example. Avoid implied verbs such as *create*, *make*, etc, e.g. *annotated heatmaps* is preferred to *create annotated heatmaps*. Use the simple present tense when a verb is necessary, e.g. *Fill the area between two curves* Description : In a short paragraph (approx 1-3 sentences) describe what visualization technique is being demonstrated and how library features are used to execute the technique, e.g. *Set bar color and bar label entries using the color and label parameters of \~Axes.bar* Plot : Clearly demonstrate the subject and, when possible, show edge cases and different applications. While the plot should be visually appealing, prioritize keeping the plot uncluttered. Code : Write the minimum necessary to showcase the feature that is the focus of the example. Avoid custom styling and annotation (titles, legends, colors, etc.) when it will not improve the clarity of the example. Use short comments sparingly to describe what hard to follow parts of code are doing. When more context or explanation is required, add a text paragraph before the code example. `/gallery/misc/bbox_intersect`{.interpreted-text role="doc"} demonstrates the point of visual examples. This example is \"messy\" in that it\'s hard to categorize, but the gallery is the right spot for it because it makes sense to find it by visual search `/gallery/images_contours_and_fields/colormap_interactive_adjustment`{.interpreted-text role="doc"} is an example of a good descriptive title that briefly summarizes how the showcased library features are used to implement the demonstrated visualization technique. `/gallery/lines_bars_and_markers/lines_with_ticks_demo`{.interpreted-text role="doc"} is an example of having a minimal amount of code necessary to showcase the feature. The lack of extraneous code makes it easier for the reader to map which parts of code correspond to which parts of the plot. #### Figure size When customizing figure sizes, we aim to avoid downscaling in rendered HTML docs. The current width limit (induced by *pydata-sphinx-theme*) is 720px, i.e. `figsize=(7.2, ...)`, or 896px if the page does not have subsections and thus does not have the \"On this page\" navigation on the right-hand side. ### Plot types guidelines The `plot_types`{.interpreted-text role="ref"} gallery provides an overview of the types of visualizations that Matplotlib provides out of the box, meaning that there is a high-level API for generating each type of chart. Additions to this gallery are generally discouraged because this gallery is heavily curated and tightly scoped to methods on [matplotlib.axes.Axes]{.title-ref}. #### Format title : Method signature with required arguments, e.g. `plot(x, y)` description : In one sentence, describe the visualization that the method produces and link to the API documentation, e.g. *Draws a bar chart. See \~Axes.bar*. When necessary, add an additional sentence explaining the use case for this function vs a very similar one, e.g. stairs vs step. plot : Use data with a self explanatory structure to illustrate the type of data this plotting method is typically used for. code : The code should be about 5-10 lines with minimal customization. Plots in this gallery use the `_mpl-gallery` stylesheet for a uniform aesthetic. ## Miscellaneous ### Move documentation Sometimes it is desirable to move or consolidate documentation. With no action this will lead to links either going dead (404) or pointing to old versions of the documentation. Preferable is to replace the old page with an html refresh that immediately redirects the viewer to the new page. So, for example we move `/doc/topic/old_info.rst` to `/doc/topic/new_info.rst`. We remove `/doc/topic/old_info.rst` and in `/doc/topic/new_info.rst` we insert a `redirect-from` directive that tells sphinx to still make the old file with the html refresh/redirect in it (probably near the top of the file to make it noticeable) ``` rst .. redirect-from:: /topic/old_info ``` In the built docs this will yield an html file `/build/html/topic/old_info.html` that has a refresh to `new_info.html`. If the two files are in different subdirectories: ``` rst .. redirect-from:: /old_topic/old_info2 ``` will yield an html file `/build/html/old_topic/old_info2.html` that has a (relative) refresh to `../topic/new_info.html`. Use the full path for this directive, relative to the doc root at `https://matplotlib.org/stable/`. So `/old_topic/old_info2` would be found by users at `http://matplotlib.org/stable/old_topic/old_info2`. For clarity, do not use relative links. ### Navbar and style Matplotlib has a few subprojects that share the same navbar and style, so these are centralized as a sphinx theme at [mpl_sphinx_theme](https://github.com/matplotlib/mpl-sphinx-theme). Changes to the style or topbar should be made there to propagate across all subprojects. ## Analytics Documentation page analytics are available at . --- # Contribute {#developers-guide-index} ::: ifconfig releaselevel != \'dev\' ::: important ::: title Important ::: If you plan to contribute to Matplotlib, please read the [development version](https://matplotlib.org/devdocs/devel/index.html) of this document as it will have the most up to date installation instructions, workflow process, and contributing guidelines. ::: ::: `heart;1em;sd-text-info`{.interpreted-text role="octicon"} Thank you for your interest in helping to improve Matplotlib! `heart;1em;sd-text-info`{.interpreted-text role="octicon"} This project is a community effort, and everyone is welcome to contribute. Everyone within the community is expected to abide by our `code of conduct `{.interpreted-text role="ref"}. There are various ways to contribute, such as optimizing and refactoring code, detailing unclear documentation and writing new examples, helping the community, reporting and fixing bugs, requesting and implementing new features\... ## GitHub issue tracker[]{#submitting-a-bug-report} {#request-a-new-feature} The [issue tracker](https://github.com/matplotlib/matplotlib/issues) serves as the centralized location for making feature requests, reporting bugs, identifying major projects to work on, and discussing priorities. We have preloaded the issue creation page with markdown forms requesting the information we need to triage issues and we welcome you to add any additional information or context that may be necessary for resolving the issue: ::: grid 1 1 2 2 ::: {.grid-item-card class-header="sd-fs-5"} ### `bug;1em;sd-text-info`{.interpreted-text role="octicon"} **Submit a bug report** Thank you for your help in keeping bug reports targeted and descriptive. ::: {.button-link expand="" color="primary"} Report a bug ::: ::: ::: {.grid-item-card class-header="sd-fs-5"} ### `light-bulb;1em;sd-text-info`{.interpreted-text role="octicon"} **Request a new feature** Thank you for your help in keeping feature requests well defined and tightly scoped. ::: {.button-link expand="" color="primary"} Request a feature ::: ::: ::: Since Matplotlib is an open source project with limited resources, we encourage users to also `participate `{.interpreted-text role="ref"} in fixing bugs and implementing new features. ## Contributing guide We welcome you to get more involved with the Matplotlib project! If you are new to contributing, we recommend that you first read our `contributing guide`{.interpreted-text role="ref"}: ::: {.toctree hidden=""} contribute ::: ::: {.grid class-row="sd-fs-5 sd-align-minor-center"} 1 1 2 2 ::: grid-item ::: {.grid gutter="1"} 1 ::: {.grid-item-card link="contribute_code" link-type="ref" class-card="sd-shadow-none" class-body="sd-text-{primary}"} `code;1em;sd-text-info`{.interpreted-text role="octicon"} Contribute code ::: ::: {.grid-item-card link="contribute_documentation" link-type="ref" class-card="sd-shadow-none" class-body="sd-text-{primary}"} `note;1em;sd-text-info`{.interpreted-text role="octicon"} Write documentation ::: ::: {.grid-item-card link="contribute_triage" link-type="ref" class-card="sd-shadow-none" class-body="sd-text-{primary}"} `issue-opened;1em;sd-text-info`{.interpreted-text role="octicon"} Triage issues ::: ::: {.grid-item-card link="other_ways_to_contribute" link-type="ref" class-card="sd-shadow-none" class-body="sd-text-{primary}"} `globe;1em;sd-text-info`{.interpreted-text role="octicon"} Build community ::: ::: ::: ::: grid-item ::: {.grid gutter="1"} 1 ::: grid-item `info;1em;sd-text-info`{.interpreted-text role="octicon"} `Is this my first contribution? `{.interpreted-text role="ref"} ::: ::: grid-item `question;1em;sd-text-info`{.interpreted-text role="octicon"} `Where do I ask questions? `{.interpreted-text role="ref"} ::: ::: grid-item `git-pull-request;1em;sd-text-info`{.interpreted-text role="octicon"} `How do I choose an issue? `{.interpreted-text role="ref"} ::: ::: grid-item `codespaces;1em;sd-text-info`{.interpreted-text role="octicon"} `How do I start a pull request? `{.interpreted-text role="ref"} ::: ::: ::: ::: ## Development workflow {#development_environment} If you are contributing code or documentation, please follow our guide for setting up and managing a development environment and workflow: ::: grid 1 1 2 2 ::: {.grid-item-card shadow="none"} **Install** \^\^\^ .. rst-class:: section-toc .. toctree:: :maxdepth: 4 > development_setup ::: ::: {.grid-item-card shadow="none"} **Workflow** \^\^\^\^ ::: {.toctree maxdepth="2"} development_workflow ::: ::: {.toctree maxdepth="1"} troubleshooting.rst ::: ::: ::: ## Policies and guidelines {#contribution_guideline} ::: admonition AI Usage AI may be used responsibly as a supportive tool, but we expect authentic contributions. For guidance, see our `AI policy `{.interpreted-text role="ref"}. ::: These policies and guidelines help us maintain consistency in the various types of maintenance work. If you are writing code or documentation, following these policies helps maintainers more easily review your work. If you are helping triage, community manage, or release manage, these guidelines describe how our current process works. ::: {.grid class-row="sf-fs-1" gutter="2"} 1 1 2 2 ::: {.grid-item-card shadow="none"} **Code** \^\^\^ ::: {.toctree maxdepth="1"} coding_guide api_changes testing ::: ::: ::: {.grid-item-card shadow="none"} **Documentation** \^\^\^ ::: {.toctree maxdepth="1"} document style_guide tag_guidelines ::: ::: ::: {.grid-item-card shadow="none"} **Triage And Review** \^\^\^ ::: {.toctree maxdepth="1"} triage pr_guide ::: ::: ::: {.grid-item-card shadow="none"} **Maintenance** \^\^\^ ::: {.toctree maxdepth="1"} release_guide communication_guide min_dep_policy MEP/index ::: ::: ::: --- # Licenses for contributed code {#license-discussion} Matplotlib only uses BSD compatible code. If you bring in code from another project make sure it has a PSF, BSD, MIT or compatible license (see the Open Source Initiative [licenses page](https://opensource.org/licenses) for details on individual licenses). If it doesn\'t, you may consider contacting the author and asking them to relicense it. GPL and LGPL code are not acceptable in the main code base, though we are considering an alternative way of distributing L/GPL code through an separate channel, possibly a toolkit. If you include code, make sure you include a copy of that code\'s license in the license directory if the code\'s license requires you to distribute the license with it. Non-BSD compatible licenses are acceptable in Matplotlib toolkits (e.g., basemap), but make sure you clearly state the licenses you are using. ## Why BSD compatible? The two dominant license variants in the wild are GPL-style and BSD-style. There are countless other licenses that place specific restrictions on code reuse, but there is an important difference to be considered in the GPL and BSD variants. The best known and perhaps most widely used license is the GPL, which in addition to granting you full rights to the source code including redistribution, carries with it an extra obligation. If you use GPL code in your own code, or link with it, your product must be released under a GPL compatible license. i.e., you are required to give the source code to other people and give them the right to redistribute it as well. Many of the most famous and widely used open source projects are released under the GPL, including linux, gcc, emacs and sage. The second major class are the BSD-style licenses (which includes MIT and the python PSF license). These basically allow you to do whatever you want with the code: ignore it, include it in your own open source project, include it in your proprietary product, sell it, whatever. python itself is released under a BSD compatible license, in the sense that, quoting from the PSF license page: There is no GPL-like "copyleft" restriction. Distributing binary-only versions of Python, modified or not, is allowed. There is no requirement to release any of your source code. You can also write extension modules for Python and provide them only in binary form. Famous projects released under a BSD-style license in the permissive sense of the last paragraph are the BSD operating system, python and TeX. There are several reasons why early Matplotlib developers selected a BSD compatible license. Matplotlib is a python extension, and we choose a license that was based on the python license (BSD compatible). Also, we wanted to attract as many users and developers as possible, and many software companies will not use GPL code in software they plan to distribute, even those that are highly committed to open source development, such as [enthought](https://www.enthought.com), out of legitimate concern that use of the GPL will \"infect\" their code base by its viral nature. In effect, they want to retain the right to release some proprietary code. Companies and institutions who use Matplotlib often make significant contributions, because they have the resources to get a job done, even a boring one. Two of the Matplotlib backends (FLTK and WX) were contributed by private companies. The final reason behind the licensing choice is compatibility with the other python extensions for scientific computing: ipython, numpy, scipy, the enthought tool suite and python itself are all distributed under BSD compatible licenses. --- # Dependency version policy {#min_deps_policy} For the purpose of this document, \'minor version\' is in the sense of SemVer (major, minor, patch) or \'meso version\' in the sense of [EffVer](https://jacobtomlinson.dev/effver/) (macro, meso, micro). It includes both major/macro and minor/meso releases. For projects that use date-based versioning, every release is a \'minor version\'. Matplotlib follows [NEP 29](https://numpy.org/neps/nep-0029-deprecation_policy.html). ## Python and NumPy Matplotlib supports: - All minor versions of Python released 42 months prior to the project, and at minimum the two latest minor versions. - All minor versions of `numpy` released in the 24 months prior to the project, and at minimum the last three minor versions. In `pyproject.toml`{.interpreted-text role="file"}, the `requires-python` variable should be set to the minimum supported version of Python. All supported minor versions of Python should be in the test matrix and have binary artifacts built for the release. Minimum Python and NumPy version support should be adjusted upward on every major and minor release, but never on a patch release. See also the `list-of-dependency-min-versions`{.interpreted-text role="ref"}. ## Python dependencies For Python dependencies we should support at least: with compiled extensions : minor versions initially released in the 24 months prior to our planned release date or the oldest that support our minimum Python + NumPy without compiled extensions : minor versions initially released in the 12 months prior to our planned release date or the oldest that supports our minimum Python. We will only bump these dependencies as we need new features or the old versions no longer support our minimum NumPy or Python. We will work around bugs in our dependencies when practical. IPython and Matplotlib do not formally depend on each other, however there is practical coupling for the integration of Matplotlib\'s UI into IPython and IPykernel. We will ensure this integration works with at least minor or major versions of IPython and IPykernel released in the 24 months prior to our planned release date. Matplotlib may or may not work with older versions and we will not warn if used with IPython or IPykernel outside of this window. ## Test and documentation dependencies As these packages are only needed for testing or building the docs and not needed by end-users, we can be more aggressive about dropping support for old versions. However, we need to be careful to not over-run what down-stream packagers support (as most of the run the tests and build the documentation as part of the packaging process). We will support at least minor versions of the development dependencies released in the 12 months prior to our planned release. Specific versions that are known to be buggy may be excluded from support using the finest-grained filtering that is practical. We will only bump these as needed or versions no longer support our minimum Python and NumPy. ## System and C-dependencies For system or C-dependencies (FreeType, GUI frameworks, LaTeX, Ghostscript, FFmpeg) support as old as practical. These can be difficult to install for end-users and we want to be usable on as many systems as possible. We will bump these on a case-by-case basis. In the case of GUI frameworks for which we rely on Python bindings being available, we will also drop support for bindings so old that they don\'t support any Python version that we support. ## Security issues in dependencies Generally, we do not adjust the supported versions of dependencies based on security vulnerabilities. We are a library not an application and the version constraints on our dependencies indicate what will work (not what is wise to use). Users and packagers can install newer versions of the dependencies at their discretion and evaluation of risk and impact. In contrast, if we were to adjust our minimum supported version it is very hard for a user to override our judgment. If Matplotlib aids in exploiting the underlying vulnerability we should treat that as a critical bug in Matplotlib. ## List of dependency versions {#list-of-dependency-min-versions} The following list shows the minimal versions of Python and NumPy dependencies for different versions of Matplotlib. Follow the links for the full specification of the dependencies. Matplotlib Python NumPy --------------------------------------------------------------------------------- ---------- -------- 3.11 3.11 1.25.0 [3.10](https://matplotlib.org/3.10.0/devel/dependencies.html) 3.10 1.23.0 [3.9](https://matplotlib.org/3.9.0/devel/dependencies.html) 3.9 1.23.0 [3.8](https://matplotlib.org/3.8.0/devel/dependencies.html) 3.9 1.21.0 [3.7](https://matplotlib.org/3.7.0/devel/dependencies.html) 3.8 1.20.0 [3.6](https://matplotlib.org/3.6.0/devel/dependencies.html) 3.8 1.19.0 [3.5](https://matplotlib.org/3.5.0/devel/dependencies.html) 3.7 1.17.0 [3.4](https://matplotlib.org/3.4.0/devel/dependencies.html) 3.7 1.16.0 [3.3](https://matplotlib.org/3.3.0/users/installing.html#dependencies) 3.6 1.15.0 [3.2](https://matplotlib.org/3.2.0/users/installing.html#dependencies) 3.6 1.11.0 [3.1](https://matplotlib.org/3.1.0/users/installing.html#dependencies) 3.6 1.11.0 [3.0](https://matplotlib.org/3.0.0/users/installing.html#dependencies) 3.5 1.10.0 [2.2](https://matplotlib.org/2.2.0/users/installing.html#dependencies) 2.7, 3.4 1.7.1 [2.1](https://matplotlib.org/2.1.0/users/installing.html#dependencies) 2.7, 3.4 1.7.1 [2.0](https://matplotlib.org/2.0.0/users/installing.html#required-dependencies) 2.7, 3.4 1.7.1 [1.5](https://matplotlib.org/1.5.0/users/installing.html#required-dependencies) 2.7, 3.4 1.6 [1.4](https://matplotlib.org/1.4.0/users/installing.html#required-dependencies) 2.6, 3.3 1.6 [1.3](https://matplotlib.org/1.3.0/users/installing.html#build-requirements) 2.6, 3.3 1.5 1.2 2.6, 3.1 1.4 1.1 2.4 1.1 1.0 2.4 1.1 ## Updating Python and NumPy versions To update the minimum versions of Python we need to update: - `pyproject.toml` (classifiers, requires-python, `[tool.ruff]` target-version) - `environment.yml` - `doc/install/dependencies.rst` - `doc/devel/min_dep_policy.rst` (this file) - CI configuration files (circle, GHA, azure) - `tox.ini` To update the minimum NumPy we need to update: - `pyproject.toml` - `environment.yml` - `doc/install/dependencies.rst` - `doc/devel/min_dep_policy.rst` (this file) - `requirements/testing/minver.txt` - `lib/matplotlib/__init__.py` (matplotlib.\_check_versions()) The work to leverage new features or remove workarounds for no-longer supported versions should be done in a follow-on PRs to keep the version bump PRs well scoped. In both cases add an api_changes/development with the following template: ``` rst Increase to minimum supported versions of dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For Matplotlib 3.ZZ, the :ref:`minimum supported versions ` are being bumped: +------------+-----------------+----------------+ | Dependency | min in mpl3.N | min in mpl3.M | +============+=================+================+ | Python | 3.XX | 3.AA | | NumPy | 1.YY | 1.BB | +------------+-----------------+----------------+ This is consistent with our :ref:`min_deps_policy` and `SPEC0 `__ ``` --- # Pull request guidelines {#pr-guidelines} [Pull requests (PRs) on GitHub](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) are the mechanism for contributing to Matplotlib\'s code and documentation. We value contributions from people with all levels of experience. In particular, if this is your first PR not everything has to be perfect. We\'ll guide you through the PR process. Nevertheless, please try to follow our guidelines as well as you can to help make the PR process quick and smooth. If your pull request is incomplete or a work-in-progress, please mark it as a `draft pull request `{.interpreted-text role="ref"} on GitHub and specify what feedback from the developers would be helpful. Please be patient with reviewers. We try our best to respond quickly, but we have limited bandwidth. If there is no feedback within a couple of days, please ping us by posting a comment to your PR or reaching out on a `communication channel `{.interpreted-text role="ref"} ## Summary for pull request authors {#pr-author-guidelines} We recommend that you check that your contribution complies with the following guidelines before submitting a pull request: ::: rst-class checklist ::: - Changes, both new features and bugfixes, should have good test coverage. See `testing`{.interpreted-text role="ref"} for more details. - Update the `documentation `{.interpreted-text role="ref"} if necessary. - All public methods should have informative docstrings with sample usage when appropriate. Use the `docstring standards `{.interpreted-text role="ref"}. - For high-level plotting functions, consider adding a small example to the `examples gallery `{.interpreted-text role="ref"}. - If you add a new feature or change the API in a backward-incompatible way, please document it as described in `api_changes`{.interpreted-text role="ref"}. - Code should follow our conventions as documented in our `coding_guidelines`{.interpreted-text role="ref"}. - When adding or changing public function signatures, add `type hints `{.interpreted-text role="ref"}. - When adding keyword arguments, see our guide to `keyword-argument-processing`{.interpreted-text role="ref"}. When opening a pull request on Github, please ensure that: ::: rst-class checklist ::: - Changes were made on a `feature branch `{.interpreted-text role="ref"}. - `pre-commit `{.interpreted-text role="ref"} checks for spelling, formatting, etc pass - The pull request targets the `main branch `{.interpreted-text role="ref"} - If your pull request addresses an issue, please use the title to describe the issue (e.g. \"Add ability to plot timedeltas\") and mention the issue number in the pull request description to ensure that a link is created to the original issue (e.g. \"Closes #8869\" or \"Fixes #8869\"). This will ensure the original issue mentioned is automatically closed when your PR is merged. For more details, see [linking an issue and pull request](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue). - `pr-automated-tests`{.interpreted-text role="ref"} pass For guidance on creating and managing a pull request, please see our `contributing `{.interpreted-text role="ref"} and `pull request workflow `{.interpreted-text role="ref"} guides. ## Summary for pull request reviewers ::: redirect-from /devel/maintainer_workflow ::: **Please help review and merge PRs!** If you have commit rights, then you are trusted to use them. Please be patient and [kind](https://youtu.be/tzFWz5fiVKU?t=49m30s) with contributors. When reviewing, please ensure that the pull request satisfies the following requirements before merging it: ### Content ::: rst-class checklist ::: - Is the feature / bugfix reasonable? - Does the PR conform with the `coding_guidelines`{.interpreted-text role="ref"}? - Is the `documentation `{.interpreted-text role="ref"} (docstrings, examples, what\'s new, API changes) updated? - Is the change purely stylistic? Generally, such changes are discouraged when not part of other non-stylistic work because it obscures the git history of functional changes to the code. Reflowing a method or docstring as part of a larger refactor/rewrite is acceptable. ### Workflow ::: rst-class checklist ::: - Make sure all `automated tests `{.interpreted-text role="ref"} pass. - The PR should `target the main branch `{.interpreted-text role="ref"}. - Tag with descriptive `labels `{.interpreted-text role="ref"}. - Set the `milestone `{.interpreted-text role="ref"}. - `Review `{.interpreted-text role="ref"} the contents. - Approve if all of the above topics are handled. - Keep an eye on the `number of commits `{.interpreted-text role="ref"}. - `Merge `{.interpreted-text role="ref"} if a `sufficient number of approvals `{.interpreted-text role="ref"} is reached. ## Detailed guidelines {#pr-guidelines-details} ### Draft PRs {#draft-pr} Authors may create a [draft PR](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests) (or change to draft status later) if the code is not yet ready for a regular full review. Typical use cases are posting code as a basis for discussion or signalling that you intend to rework the code as a result of feedback. Authors should clearly communicate why the PR has draft status and what needs to be done to make it ready for review. In particular, they should explicitly ask for targeted feedback if needed. By default, reviewers will not look at the code of a draft PR and only respond to specific questions by the author. ### Documentation {#pr-documentation} - Every new feature should be documented. If it\'s a new module, don\'t forget to add a new rst file to the API docs. - Each high-level plotting function should have a small example in the `Examples` section of the docstring. This should be as simple as possible to demonstrate the method. More complex examples should go into a dedicated example file in the `examples`{.interpreted-text role="file"} directory, which will be rendered to the examples gallery in the documentation. - Build the docs and make sure all formatting warnings are addressed. - See `documenting-matplotlib`{.interpreted-text role="ref"} for our documentation style guide. ### Labels {#pr-labels} - If you have the rights to set labels, tag the PR with descriptive labels. See the [list of labels](https://github.com/matplotlib/matplotlib/labels). - If the PR makes changes to the wheel building Action, add the \"Run cibuildwheel\" label to enable testing wheels. ### Milestones {#pr-milestones} Set the milestone according to these guidelines: - *New features and API changes* are milestoned for the next meso release `v3.N.0`. - *Bugfixes, tests for released code, and docstring changes* may be milestoned for the next micro release `v3.N.M`. - *Documentation changes* (only .rst files and examples) may be milestoned `v3.N-doc`. If multiple rules apply, choose the first matching from the above list. See `backport-strategy`{.interpreted-text role="ref"} for detailed guidance on what should or should not be backported. The milestone marks the release a PR should go into. It states intent, but can be changed because of release planning or re-evaluation of the PR scope and maturity. All Pull Requests should target the main branch. The milestone tag triggers an `automatic backport `{.interpreted-text role="ref"} for milestones which have a corresponding branch. ### Review {#pr-review} - Do not let perfect be the enemy of the good, particularly for documentation or example PRs. If you find yourself making many small suggestions, either open a PR against the original branch, push changes to the contributor branch, or merge the PR and then open a new PR against upstream. - If you push to a contributor branch leave a comment explaining what you did, ex \"I took the liberty of pushing a small clean-up PR to your branch, thanks for your work.\". If you are going to make substantial changes to the code or intent of the PR please check with the contributor first. ### Approval {#pr-approval} As a guiding principle, we require two [approvals](https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests) from core developers (those with commit rights) before merging a pull request. This two-pairs-of-eyes strategy shall ensure a consistent project direction and prevent accidental mistakes. It is permissible to merge with one approval if the change is not fundamental and can easily be reverted at any time in the future. Some explicit rules following from this: - *Documentation and examples* may be merged with a single approval. Use the threshold \"is this better than it was?\" as the review criteria. - Minor *infrastructure updates*, e.g. temporary pinning of broken dependencies or small changes to the CI configuration, may be merged with a single approval. - *Code changes* (anything in `src` or `lib`) must have two approvals. Ensure that all API changes are documented in a file in one of the subdirectories of `doc/api/next_api_changes`{.interpreted-text role="file"}, and significant new features have an entry in `doc/user/whats_new`{.interpreted-text role="file"}. - If a PR already has a positive review, a core developer (e.g. the first reviewer, but not necessarily) may champion that PR for merging. In order to do so, they should ping all core devs both on GitHub and on the dev mailing list, and label the PR with the \"Merge with single review?\" label. Other core devs can then either review the PR and merge or reject it, or simply request that it gets a second review before being merged. If no one asks for such a second review within a week, the PR can then be merged on the basis of that single review. A core dev should only champion one PR at a time and we should try to keep the flow of championed PRs reasonable. ### Automated tests {#pr-automated-tests} Before being merged, a PR should pass the `automated-tests`{.interpreted-text role="ref"}. If you are unsure why a test is failing, ask on the PR or in our `communication-channels`{.interpreted-text role="ref"} ### Merging {#pr-merging} After giving the last required `approval `{.interpreted-text role="ref"}, the author of the approval should merge the PR. PR authors should not self-merge except for when another reviewer explicitly allows it (e.g., \"Approve modulo CI passing, may self-merge when green\", or \"Take or leave the comments. You may self merge\".). ### Number of commits and squashing {#pr-squashing} - Squashing is case-by-case. The balance is between burden on the contributor, keeping a relatively clean history, and keeping a history usable for bisecting. The only time we are really strict about it is to eliminate binary files (ex multiple test image re-generations) and to remove upstream merges. ## Branches and backports {#branches_and_backports} ### Current branches The current active branches are *main* : The current development version. Future meso (*v3.N.0*) or macro (*v4.0.0*) will be branched from this. *v3.N.x* : Maintenance branch for Matplotlib 3.N. Future micro releases will be tagged from this. *v3.N.M-doc* : Documentation for the current micro release. On a micro release, this will be replaced by a properly named branch for the new release. ### Branch selection for pull requests {#pr-branch-selection} Generally, all pull requests should target the main branch. Other branches are fed through `automatic `{.interpreted-text role="ref"} or `manual `{.interpreted-text role="ref"}. Directly targeting other branches is only rarely necessary for special maintenance work. ### Backport strategy Backports to the micro release branch (*v3.N.x*) are the changes that will be included in the next patch (aka bug-fix) release. The goal of the patch releases is to fix bugs without adding any new regressions or behavior changes. We will always attempt to backport: - critical bug fixes (segfault, failure to import, things that the user cannot work around) - fixes for regressions introduced in the last two meso releases and may attempt to backport fixes for regressions introduced in older releases. In the case where the backport is not clean, for example if the bug fix is built on top of other code changes we do not want to backport, balance the effort and risk of re-implementing the bug fix vs the severity of the bug. When in doubt, err on the side of not backporting. When backporting a Pull Request fails or is declined, re-milestone the original PR to the next meso release and leave a comment explaining why. The only changes backported to the documentation branch (*v3.N.M-doc*) are changes to `doc`{.interpreted-text role="file"} or `galleries`{.interpreted-text role="file"}. Any changes to `lib`{.interpreted-text role="file"} or `src`{.interpreted-text role="file"}, including docstring-only changes, must not be backported to this branch. ### Automated backports We use MeeseeksDev bot to automatically backport merges to the correct maintenance branch base on the milestone. To work properly the milestone must be set before merging. If you have commit rights, the bot can also be manually triggered after a merge by leaving a message `@meeseeksdev backport to BRANCH` on the PR. If there are conflicts MeeseeksDev will inform you that the backport needs to be done manually. The target branch is configured by putting `on-merge: backport to TARGETBRANCH` in the milestone description on it\'s own line. If the bot is not working as expected, please report issues to [MeeseeksDev](https://github.com/MeeseeksBox/MeeseeksDev). ### Manual backports When doing backports please copy the form used by MeeseeksDev, `Backport PR #XXXX: TITLE OF PR`. If you need to manually resolve conflicts make note of them and how you resolved them in the commit message. We do a backport from main to v2.2.x assuming: - `matplotlib` is a read-only remote branch of the matplotlib/matplotlib repo The `TARGET_SHA` is the hash of the merge commit you would like to backport. This can be read off of the GitHub PR page (in the UI with the merge notification) or through the git CLI tools. Assuming that you already have a local branch `v2.2.x` (if not, then `git checkout -b v2.2.x`), and that your remote pointing to `https://github.com/matplotlib/matplotlib` is called `upstream`: ``` bash git fetch upstream git checkout v2.2.x # or include -b if you don't already have this. git reset --hard upstream/v2.2.x git cherry-pick -m 1 TARGET_SHA # resolve conflicts and commit if required ``` Files with conflicts can be listed by `git status`, and will have to be fixed by hand (search on `>>>>>`). Once the conflict is resolved, you will have to re-add the file(s) to the branch and then continue the cherry pick: ``` bash git add lib/matplotlib/conflicted_file.py git add lib/matplotlib/conflicted_file2.py git cherry-pick --continue ``` Use your discretion to push directly to upstream or to open a PR; be sure to push or PR against the `v2.2.x` upstream branch, not `main`! --- # Release guide ::: admonition This document is only relevant for Matplotlib release managers. A guide for developers who are doing a Matplotlib release. ::: ## Versioning Scheme Matplotlib follows the [Intended Effort Versioning (EffVer)](https://jacobtomlinson.dev/effver/) versioning scheme: *macro.meso.micro*. *macro* : A release that we expect a large effort from our users to upgrade to. The v1 to v2 transition included a complete overhaul of the default styles and the v2 to v3 transition involved dropping support for Python 2. Future macro versions would include changes of a comparable scale that can not be done incrementally in meso releases. *meso* : A release that we expect some effort from our users to upgrade to. We target a *Meso* release every 6 months. These release are primarily intended to release new features to our users, however they also contain intentional feature deprecations and removals per `our policy `{.interpreted-text role="ref"}. *micro* : A release that we expect users to require little to no effort to upgrade to. Per our `backport-strategy`{.interpreted-text role="ref"} we only backport bug fixes to the maintenance branch. We expect minimal impact on users other than possibly breaking work arounds to a fixed bug or [bugs being used as features](https://xkcd.com/1172/). These are released as-needed, but typically every 1-2 months between meso releases. ## Making the release branch {#release_feature_freeze} ::: note ::: title Note ::: This assumes that a read-only remote for the canonical repository is `remote` and a read/write remote is `DANGER` ::: When a new meso release (vX.Y.0) is approaching, a new release branch must be made. When precisely this should happen is up to the release manager, but this point is where most new features intended for the meso release are merged and you are entering a feature freeze (i.e. newly implemented features will be going into vX.Y+1). This does not necessarily mean that no further changes will be made prior to release, just that those changes will be made using the backport system. For an upcoming `v3.7.0` release, first create the branch: ``` bash git switch main git pull git switch -c v3.7.x git push DANGER v3.7.x ``` Update the `v3.7.0` milestone so that the description reads: ``` bash New features and API changes on-merge: backport to v3.7.x ``` Micro versions should instead read: ``` bash Bugfixes and docstring changes on-merge: backport to v3.7.x ``` Check all active milestones for consistency. Older milestones should also backport to higher meso versions (e.g. `v3.6.3` and `v3.6-doc` should backport to both `v3.6.x` and `v3.7.x` once the `v3.7.x` branch exists and while PR backports are still targeting `v3.6.x`). Close milestones for versions that are unlikely to be released, e.g. micro versions of older meso releases. Remilestone issues/PRs that are now untagged to the appropriate future release milestone. Create the milestone for the next-next meso release (i.e. `v3.9.0`, as `v3.8.0` should already exist). While most active items should go in the next meso release, this milestone can help with longer term planning, especially around deprecation cycles. ## Testing {#release-testing} We use [GitHub Actions](https://github.com/matplotlib/matplotlib/actions) for continuous integration. When preparing for a release, the final tagged commit should be tested locally before it is uploaded: ``` bash pytest -n 8 . ``` In addition the following test should be run and manually inspected: ``` bash python tools/memleak.py agg 1000 agg.pdf ``` Run the User Acceptance Tests for the NBAgg and ipympl backends: ``` bash jupyter notebook lib/matplotlib/backends/web_backend/nbagg_uat.ipynb ``` For ipympl, restart the kernel, add a cell for `%matplotlib widget` and do not run the cell with `matplotlib.use('nbagg')`. Tests which check `connection_info`, use `reshow`, or test the OO interface are not expected to work for `ipympl`. ## GitHub statistics {#release_ghstats} We automatically extract GitHub issue, PRs, and authors from GitHub via the API. To prepare this list: 1. Archive the existing GitHub statistics page. a. Copy the current `doc/release/github_stats.rst`{.interpreted-text role="file"} to `doc/release/prev_whats_new/github_stats_{X}.{Y}.{Z}.rst`{.interpreted-text role="file"}. b. Change the link target at the top of the file. c. Remove the \"Previous GitHub Stats\" section at the end. For example, when updating from v3.7.0 to v3.7.1: ``` bash cp doc/release/github_stats.rst doc/release/prev_whats_new/github_stats_3.7.0.rst $EDITOR doc/release/prev_whats_new/github_stats_3.7.0.rst # Change contents as noted above. git add doc/release/prev_whats_new/github_stats_3.7.0.rst ``` 2. Re-generate the updated stats: ``` bash python tools/github_stats.py --since-tag v3.7.0 --milestone=v3.7.1 \ --project 'matplotlib/matplotlib' --links > doc/release/github_stats.rst ``` 3. Review and commit changes. Some issue/PR titles may not be valid reST (the most common issue is `*` which is interpreted as unclosed markup). Also confirm that `codespell` does not find any issues. ::: note ::: title Note ::: Make sure you authenticate against the GitHub API. If you do not, you will get blocked by GitHub for going over the API rate limits. You can authenticate in one of two ways: - using the `keyring` package; `pip install keyring` and then when running the stats script, you will be prompted for user name and password, that will be stored in your system keyring, or, - using a personal access token; generate a new token [on this GitHub page](https://github.com/settings/tokens) with the `repo:public_repo` scope and place the token in `~/.ghoauth`{.interpreted-text role="file"}. ::: ## Update and validate the docs {#release_chkdocs} ### Merge `*-doc` branch Merge the most recent \'doc\' branch (e.g., `v3.7.0-doc`) into the branch you are going to tag on and delete the doc branch on GitHub. ### Update supported versions in Security Policy When making macro or meso releases, update the supported versions in the Security Policy in `SECURITY.md`{.interpreted-text role="file"}. For meso version release update the table in `SECURITY.md`{.interpreted-text role="file"} to specify that the two most recent meso releases in the current macro version series are supported. For a macro version release update the table in `SECURITY.md`{.interpreted-text role="file"} to specify that the last meso version in the previous macro version series is still supported. Dropping support for the last version of a macro version series will be handled on an ad-hoc basis. ### Update release notes #### What\'s new *Only needed for macro and meso releases. Bugfix releases should not have new features.* Merge the contents of all the files in `doc/release/next_whats_new/`{.interpreted-text role="file"} into a single file `doc/release/prev_whats_new/whats_new_{X}.{Y}.0.rst`{.interpreted-text role="file"} and delete the individual files. #### API changes *Primarily needed for macro and meso releases. We may sometimes have API changes in micro releases.* Merge the contents of all the files in `doc/api/next_api_changes/`{.interpreted-text role="file"} into a single file `doc/api/prev_api_changes/api_changes_{X}.{Y}.{Z}.rst`{.interpreted-text role="file"} and delete the individual files. #### Release notes TOC Update `doc/release/release_notes.rst`{.interpreted-text role="file"}: - For macro and meso releases add a new section ``` rst X.Y === .. toctree:: :maxdepth: 1 prev_whats_new/whats_new_X.Y.0.rst ../api/prev_api_changes/api_changes_X.Y.0.rst prev_whats_new/github_stats_X.Y.0.rst ``` - For micro releases add the GitHub stats and (if present) the API changes to the existing X.Y section ``` rst ../api/prev_api_changes/api_changes_X.Y.Z.rst prev_whats_new/github_stats_X.Y.Z.rst ``` ### Update version switcher The version switcher is populated from . Since it\'s always taken from devdocs, update the file `doc/_static/switcher.json`{.interpreted-text role="file"} on the main branch through a regular PR: - If a micro release, update the version from `{X}.{Y}.{Z-1}`{.interpreted-text role="samp"} to `{X}.{Y}.{Z}`{.interpreted-text role="samp"} - If a meso release `{X}.{Y}.0`{.interpreted-text role="samp"}: > - update the dev entry to > `name: {X}.{Y+1} (dev)`{.interpreted-text role="samp"} > - update the stable entry to > `name: {X}.{Y} (stable)`{.interpreted-text role="samp"} > - add a new entry for the previous stable > (`name: {X}.{Y-1}`{.interpreted-text role="samp"}). Once that PR is merged, the devdocs site will be updated automatically. ### Verify that docs build Finally, make sure that the docs build cleanly: ``` bash make -Cdoc O=-j$(nproc) html latexpdf ``` After the docs are built, check that all of the links, internal and external, are still valid. We use `linkchecker` for this: ``` bash pip install linkchecker pushd doc/build/html linkchecker index.html --check-extern popd ``` Address any issues which may arise. The internal links are checked on Circle CI, so this should only flag failed external links. ## Create release commit and tag {#release_tag} To create the tag, first create an empty commit with a very terse set of the release notes in the commit message: ``` bash git commit --allow-empty ``` and then create a signed, annotated tag with the same text in the body message: ``` bash git tag -a -s v3.7.0 ``` which will prompt you for your GPG key password and an annotation. For pre-releases it is important to follow `440`{.interpreted-text role="pep"} so that the build artifacts will sort correctly in PyPI. To prevent issues with any down-stream builders which download the tarball from GitHub it is important to move all branches away from the commit with the tag[^1]: ``` bash git commit --allow-empty ``` Push the branch to GitHub. This is done prior to pushing the tag as a last step in ensuring that the branch was fully up to date. If it fails, re-fetch and recreate commits and tag over an up to date branch: ``` bash git push DANGER v3.7.x ``` Finally, push the tag to GitHub: ``` bash git push DANGER v3.7.0 ``` Congratulations, the scariest part is done! This assumes the release branch has already been made. Usually this is done at the time of feature freeze for a meso release (which often coincides with the last micro release of the previous meso version) If this is a final release, also create a \'doc\' branch (this is not done for pre-releases): ``` bash git branch v3.7.0-doc git push DANGER v3.7.0-doc ``` Update (or create) the `v3.7-doc` milestone. The description should include the instruction for meeseeksmachine to backport changes with the `v3.7-doc` milestone to both the `v3.7.x` branch and the `v3.7.0-doc` branch: ``` bash Documentation changes (.rst files and examples) on-merge: backport to v3.7.x on-merge: backport to v3.7.0-doc ``` Check all active milestones for consistency. Older doc milestones should also backport to higher meso versions (e.g. `v3.6-doc` should backport to both `v3.6.x` and `v3.7.x` if the `v3.7.x` branch exists) ## Release management / DOI {#release_DOI} Via the [GitHub UI](https://github.com/matplotlib/matplotlib/releases), turn the newly pushed tag into a release. If this is a pre-release remember to mark it as such. For final releases, also get the DOI from [Zenodo](https://zenodo.org/) (which will automatically produce one once the tag is pushed). Add the DOI post-fix and version to the dictionary in `tools/cache_zenodo_svg.py`{.interpreted-text role="file"} and run the script. This will download the new SVG to `doc/_static/zenodo_cache/{postfix}.svg`{.interpreted-text role="file"} and edit `doc/project/citing.rst`{.interpreted-text role="file"}. Commit the new SVG, the change to `tools/cache_zenodo_svg.py`{.interpreted-text role="file"}, and the changes to `doc/project/citing.rst`{.interpreted-text role="file"} to the VER-doc branch and push to GitHub. : ``` bash git checkout v3.7.0-doc $EDITOR tools/cache_zenodo_svg.py python tools/cache_zenodo_svg.py git commit -a git push DANGER v3.7.0-doc:v3.7.0-doc ``` ## Building binaries {#release_bld_bin} We distribute macOS, Windows, and many Linux wheels as well as a source tarball via PyPI. - Windows, macOS and manylinux wheels are built on GitHub Actions. Builds are triggered by the GitHub Action defined in a separate [release repository](https://github.com/matplotlib/matplotlib-release), and wheels will be available as artifacts of the build. Both a source tarball and the wheels will be automatically uploaded to PyPI once all of them have been built. - To trigger the build for the `matplotlib-release` repository: - If not already created, create a release branch for the meso version (e.g. `v3.10.x`) - Edit the `SOURCE_REF_TO_BUILD` environment variable at the top of [wheels.yml](https://github.com/matplotlib/matplotlib-release/blob/main/.github/workflows/wheels.yml) on the release branch to point to the release tag. - Run the workflow from the release branch, with \"pypi\" selected for the pypi environment using the [Workflow Dispatch trigger](https://github.com/matplotlib/matplotlib-release/actions/workflows/wheels.yml) - This will run cibuildwheel and upload to PyPI using the Trusted Publishers GitHub Action. - The auto-tick bot should open a pull request into the [conda-forge feedstock](https://github.com/conda-forge/matplotlib-feedstock). Review and merge (if you have the power to). ::: warning ::: title Warning ::: Because this is automated, it is extremely important to bump all branches away from the tag as discussed in `release_tag`{.interpreted-text role="ref"}. ::: ## Manually uploading to PyPI {#release_upload_bin} ::: note ::: title Note ::: As noted above, the GitHub Actions workflow should build and upload source tarballs and wheels automatically. If for some reason, you need to upload these artifacts manually, then follow the instructions in this section. ::: Once you have collected all of the wheels (expect this to take a few hours), generate the tarball: ``` bash git checkout v3.7.0 git clean -xfd python -m build --sdist ``` and copy all of the wheels into `dist`{.interpreted-text role="file"} directory. First, check that the dist files are OK: ``` bash twine check dist/* ``` and then use `twine` to upload all of the files to PyPI : ``` bash twine upload -s dist/matplotlib*tar.gz twine upload dist/*whl ``` Congratulations, you have now done the second scariest part! ## Build and deploy documentation {#release_docs} To build the documentation you must have the tagged version installed, but build the docs from the `ver-doc` branch. An easy way to arrange this is: ``` bash pip install matplotlib pip install -r requirements/doc/doc-requirements.txt git checkout v3.7.0-doc git clean -xfd make -Cdoc O="-t release -j$(nproc)" html latexpdf LATEXMKOPTS="-silent -f" ``` which will build both the HTML and PDF version of the documentation. The built documentation exists in the [matplotlib.github.com](https://github.com/matplotlib/matplotlib.github.com/) repository. Pushing changes to main automatically updates the website. The documentation is organized in subdirectories by version. The latest stable release is symlinked from the `stable`{.interpreted-text role="file"} directory. The documentation for current main is built on Circle CI and pushed to the [devdocs](https://github.com/matplotlib/devdocs/) repository. These are available at [matplotlib.org/devdocs](https://matplotlib.org/devdocs/). Assuming you have this repository checked out in the same directory as matplotlib : ``` bash cd ../matplotlib.github.com cp -a ../matplotlib/doc/build/html 3.7.0 rm 3.7.0/.buildinfo cp ../matplotlib/doc/build/latex/Matplotlib.pdf 3.7.0 ``` which will copy the built docs over. If this is a final release, link the `stable` subdirectory to the newest version: ``` bash rm stable ln -s 3.7.0 stable ``` You will also need to edit `sitemap.xml`{.interpreted-text role="file"} to include the newly released version. Now commit and push everything to GitHub : ``` bash git add * git commit -a -m 'Updating docs for v3.7.0' git push DANGER main ``` Congratulations you have now done the third scariest part! If you have access, clear the CloudFlare caches. It typically takes about 5-10 minutes for the website to process the push and update the live web page (remember to clear your browser cache). Remember to `update the version switcher `{.interpreted-text role="ref"}! ## Merge up changes to main {#release_merge_up} After a release is done, the changes from the release branch should be merged into the `main` branch. This is primarily done so that the released tag is on the main branch so `git describe` (and thus `setuptools-scm`) has the most current tag. Secondarily, changes made during release (including removing individualized release notes, fixing broken links, and updating the version switcher) are bubbled up to `main`. Git conflicts are very likely to arise, though aside from changes made directly to the release branch (mostly as part of the release), they should be relatively-easily resolved by using the version from `main`. This is not a universal rule, and care should be taken to ensure correctness: ``` bash git switch main git pull git switch -c merge_up_v3.7.0 git merge v3.7.x # resolve conflicts git merge --continue ``` Due to branch protections for the `main` branch, this is merged via a standard pull request, though the PR cleanliness status check is expected to fail. The PR should not be squashed because the intent is to merge the branch histories. ## Publicize this release After the release is published to PyPI and conda, it should be announced through our communication channels: ::: rst-class checklist ::: - Send a short version of the release notes and acknowledgments to all the `mailing-lists`{.interpreted-text role="ref"} - Post highlights and link to `What's new `{.interpreted-text role="ref"} on the active `social media accounts `{.interpreted-text role="ref"} - Add a release announcement to the \"News\" section of [matplotlib.org](https://github.com/matplotlib/mpl-brochure-site) by editing `docs/body.html`. Link to the auto-generated announcement discourse post, which is in [Announcements \> matplotlib-announcements](https://discourse.matplotlib.org/c/announce/matplotlib-announce/10). ## Conda packages The Matplotlib project itself does not release conda packages. In particular, the Matplotlib release manager is not responsible for conda packaging. For information on the packaging of Matplotlib for conda-forge see . [^1]: The tarball that is provided by GitHub is produced using [git archive](https://git-scm.com/docs/git-archive). We use [setuptools_scm](https://github.com/pypa/setuptools_scm) which uses a format string in `lib/matplotlib/_version.py`{.interpreted-text role="file"} to have `git` insert a list of references to exported commit (see `.gitattributes`{.interpreted-text role="file"} for the configuration). This string is then used by `setuptools_scm` to produce the correct version, based on the git tag, when users install from the tarball. However, if there is a branch pointed at the tagged commit, then the branch name will also be included in the tarball. When the branch eventually moves, anyone who checked the hash of the tarball before the branch moved will have an incorrect hash. To generate the file that GitHub does use: ``` bash git archive v3.7.0 -o matplotlib-3.7.0.tar.gz --prefix=matplotlib-3.7.0/ ``` --- # Documentation style guide This guide contains best practices for the language and formatting of Matplotlib documentation. ::: seealso For more information about contributing, see the `documenting-matplotlib`{.interpreted-text role="ref"} section. ::: ## Expository language For explanatory writing, the following guidelines are for clear and concise language use. ### Terminology There are several key terms in Matplotlib that are standards for reliability and consistency in documentation. They are not interchangeable. +--------------+--------------+------------------------------------+------------------------------------+ | Term | Description | Correct | Incorrect | +==============+==============+====================================+====================================+ | `~matplot | Matplotlib | - *For Matplotlib objects*: | - \"The figure is the working | | lib.figure.F | working | Figure, \"The Figure is the | space for visuals.\" | | igure`{.inte | space for | working space for the visual. | - \"Methods in the figure | | rpreted-text | programming. | - *Referring to class*: | provide the visuals.\" | | r | | `~matplotli | - \"The | | ole="class"} | | b.figure.Figure`{.interpreted-text | `~matplotli | | | | role="class"}, \"Methods | b.figure.Figure`{.interpreted-text | | | | within the | role="class"} Four leglock is | | | | `~matplotli | a wrestling move.\" | | | | b.figure.Figure`{.interpreted-text | | | | | role="class"} provide the | | | | | visuals.\" | | | | | - *General language*: figure, | | | | | \"Michelle Kwan is a famous | | | | | figure skater.\" | | +--------------+--------------+------------------------------------+------------------------------------+ | `~mat | Subplots | - *For Matplotlib objects*: | - \"The axes methods transform | | plotlib.axes | within | Axes, \"An Axes is a subplot | the data.\" | | .Axes`{.inte | Figure. | within the Figure.\" | - \"Each | | rpreted-text | Contains | - *Referring to class*: | `~matpl | | r | plot | `~matpl | otlib.axes.Axes`{.interpreted-text | | ole="class"} | elements and | otlib.axes.Axes`{.interpreted-text | role="class"} is specific to a | | | is | role="class"}, \"Each | Figure.\" | | | responsible | `~matpl | - \"The musicians on stage call | | | for plotting | otlib.axes.Axes`{.interpreted-text | their guitars Axes.\" | | | and | role="class"} is specific to | - \"The point where the Axes | | | configuring | one Figure.\" | meet is the origin of the | | | additional | - *General language*: axes, | coordinate system.\" | | | details. | \"Both loggers and lumberjacks | | | | | use axes to chop wood.\" OR | | | | | \"There are no standard names | | | | | for the coordinates in the | | | | | three axes.\" (Plural of axis) | | +--------------+--------------+------------------------------------+------------------------------------+ | `~matplot | Broad | - *For Matplotlib objects*: | - \"Configure the legend artist | | lib.artist.A | variety of | Artist, \"Artists display | with its respective method.\" | | rtist`{.inte | Matplotlib | visuals and are the visible | - \"There is an | | rpreted-text | objects that | elements when rendering a | `~matplotli | | r | display | Figure.\" | b.artist.Artist`{.interpreted-text | | ole="class"} | visuals. | - *Referring to class*: | role="class"} for that visual | | | | `~matplotli | in the graph.\" | | | | b.artist.Artist`{.interpreted-text | - \"Some Artists became famous | | | | role="class"} , \"Each | only by accident.\" | | | | `~matplotli | | | | | b.artist.Artist`{.interpreted-text | | | | | role="class"} has respective | | | | | methods and functions.\" | | | | | - *General language*: artist, | | | | | \"The artist in the museum is | | | | | from France.\" | | +--------------+--------------+------------------------------------+------------------------------------+ | `~mat | Hu | - *For Matplotlib objects*: | - \"Plot the graph onto the | | plotlib.axis | man-readable | Axis, \"The Axis for the bar | axis.\" | | .Axis`{.inte | single | chart is a separate Artist.\" | - \"Each Axis is usually named | | rpreted-text | dimensional | (plural, Axis objects) | after the coordinate which is | | r | object of | - *Referring to class*: | measured along it.\" | | ole="class"} | reference | `~matpl | - \"In some computer graphics | | | marks | otlib.axis.Axis`{.interpreted-text | contexts, the ordinate | | | containing | role="class"}, \"The | `~matpl | | | ticks, tick | `~matpl | otlib.axis.Axis`{.interpreted-text | | | labels, | otlib.axis.Axis`{.interpreted-text | role="class"} may be oriented | | | spines, and | role="class"} contains | downwards.\" | | | edges. | respective XAxis and YAxis | | | | | objects.\" | | | | | - *General language*: axis, | | | | | \"Rotation around a fixed axis | | | | | is a special case of | | | | | rotational motion.\" | | +--------------+--------------+------------------------------------+------------------------------------+ | Axes | Usage | - Axes interface | - explicit interface | | interface | pattern in | - call methods on the Axes / | - object oriented | | | which one | Figure object | - OO-style | | | calls | | - OOP | | | methods on | | | | | Axes and | | | | | Figure (and | | | | | sometimes | | | | | other | | | | | Artist) | | | | | objects to | | | | | configure | | | | | the plot. | | | +--------------+--------------+------------------------------------+------------------------------------+ | pyplot | Usage | - `pyplot` interface | - implicit interface | | interface | pattern in | - call `pyplot` functions | - MATLAB like | | | which one | | - Pyplot | | | only calls | | | | | [.pyplot] | | | | | {.title-ref} | | | | | functions to | | | | | configure | | | | | the plot. | | | +--------------+--------------+------------------------------------+------------------------------------+ ### Grammar #### Subject Use second-person imperative sentences for directed instructions specifying an action. Second-person pronouns are for individual-specific contexts and possessive reference. ----------------------------------------------------------------------------------------------------- Correct Incorrect -------------------------------------------------- -------------------------------------------------- Install Matplotlib from the source directory using You can install Matplotlib from the source the Python `pip` installer program. Depending on directory. You can find additional support if you your operating system, you may need additional are having trouble with your installation. support. ----------------------------------------------------------------------------------------------------- #### Tense Use present simple tense for explanations. Avoid future tense and other modal or auxiliary verbs when possible. ----------------------------------------------------------------------------------------------------- Correct Incorrect -------------------------------------------------- -------------------------------------------------- The fundamental ideas behind Matplotlib for Matplotlib will take data and transform it through visualization involve taking data and transforming functions and methods. They can generate many it through functions and methods. kinds of visuals. These will be the fundamentals for using Matplotlib. ----------------------------------------------------------------------------------------------------- #### Voice Write in active sentences. Passive voice is best for situations or conditions related to warning prompts. ----------------------------------------------------------------------------------------------------- Correct Incorrect -------------------------------------------------- -------------------------------------------------- The function `plot` generates the graph. The graph is generated by the `plot` function. An error message is returned by the function if You will see an error message from the function if there are no arguments. there are no arguments. ----------------------------------------------------------------------------------------------------- #### Sentence structure Write with short sentences using Subject-Verb-Object order regularly. Limit coordinating conjunctions in sentences. Avoid pronoun references and subordinating conjunctive phrases. ----------------------------------------------------------------------------------------------------- Correct Incorrect -------------------------------------------------- -------------------------------------------------- The `pyplot` module in Matplotlib is a collection The `pyplot` module in Matplotlib is a collection of functions. These functions create, manage, and of functions which create, manage, and manipulate manipulate the current Figure and plotting area. the current Figure and plotting area. The `plot` function plots data to the respective The `plot` function plots data within its Axes. The Axes corresponds to the respective respective Axes for its respective Figure. Figure. The implicit approach is a convenient shortcut for Users that wish to have convenient shortcuts for generating simple plots. generating plots use the implicit approach. ----------------------------------------------------------------------------------------------------- ## Formatting The following guidelines specify how to incorporate code and use appropriate formatting for Matplotlib documentation. ### Code Matplotlib is a Python library and follows the same standards for documentation. #### Comments Examples of Python code have comments before or on the same line. +--------------------------------------------------+--------------------------------------------------+ | Correct | Incorrect | +==================================================+==================================================+ | # Data | years = [2006, 2007, 2008] | | years = [2006, 2007, 2008] | # Data | +--------------------------------------------------+--------------------------------------------------+ | years = [2006, 2007, 2008] # Data | | +--------------------------------------------------+--------------------------------------------------+ #### Outputs When generating visuals with Matplotlib using `.py` files in examples, display the visual with [matplotlib.pyplot.show]{.title-ref} to display the visual. Keep the documentation clear of Python output lines. +--------------------------------------------------+--------------------------------------------------+ | Correct | Incorrect | +==================================================+==================================================+ | plt.plot([1, 2, 3], [1, 2, 3]) | plt.plot([1, 2, 3], [1, 2, 3]) | | plt.show() | | +--------------------------------------------------+--------------------------------------------------+ | fig, ax = plt.subplots() | fig, ax = plt.subplots() | | ax.plot([1, 2, 3], [1, 2, 3]) | ax.plot([1, 2, 3], [1, 2, 3]) | | fig.show() | | +--------------------------------------------------+--------------------------------------------------+ ### reStructuredText Matplotlib uses reStructuredText Markup for documentation. Sphinx helps to transform these documents into appropriate formats for accessibility and visibility. - [reStructuredText Specifications](https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html) - [Quick Reference Document](https://docutils.sourceforge.io/docs/user/rst/quickref.html) #### Lists Bulleted lists are for items that do not require sequencing. Numbered lists are exclusively for performing actions in a determined order. +--------------------------------------------------+--------------------------------------------------+ | Correct | Incorrect | +==================================================+==================================================+ | The example uses three graphs. | The example uses three graphs. | +--------------------------------------------------+--------------------------------------------------+ | - Bar | 1. Bar | | - Line | 2. Line | | - Pie | 3. Pie | +--------------------------------------------------+--------------------------------------------------+ | These four steps help to get started using | The following steps are important to get started | | Matplotlib. | using Matplotlib. | +--------------------------------------------------+--------------------------------------------------+ | > 1. Import the Matplotlib library. | > - Import the Matplotlib library. | | > 2. Import the necessary modules. | > - Import the necessary modules. | | > 3. Set and assign data to work on. | > - Set and assign data to work on. | | > 4. Transform data with methods and functions. | > - Transform data with methods and functions. | +--------------------------------------------------+--------------------------------------------------+ #### Tables Use ASCII tables with reStructuredText standards in organizing content. Markdown tables and the csv-table directive are not accepted. +--------------------------------------------------+--------------------------------------------------+ | Correct | Incorrect | +==================================================+==================================================+ | --------------------- | | Correct | Incorrect | | | Correct Incorrect | | ------- | --------- | | | --------- ----------- | | OK | Not OK | | | OK Not OK | | | | | | --------------------- | | +--------------------------------------------------+--------------------------------------------------+ | +----------+----------+ | .. csv-table:: | | | Correct | Incorrect| | :header: "correct", "incorrect" | | +==========+==========+ | :widths: 10, 10 | | | OK | Not OK | | | | +----------+----------+ | "OK ", "Not OK" | +--------------------------------------------------+--------------------------------------------------+ | =========== =========== | | | Correct Incorrect | | | =========== =========== | | | OK Not OK | | | =========== =========== | | +--------------------------------------------------+--------------------------------------------------+ ## Additional resources This style guide is not a comprehensive standard. For a more thorough reference of how to contribute to documentation, see the links below. These resources contain common best practices for writing documentation. - [Python Developer\'s Guide](https://devguide.python.org/documenting/#documenting-python) - [Google Developer Style Guide](https://developers.google.com/style) - [IBM Style Guide](https://www.oreilly.com/library/view/the-ibm-style/9780132118989/) - [Red Hat Style Guide](https://stylepedia.net/style/#grammar) --- # Tag Glossary ::: {.contents depth="1" local="" backlinks="entry"} ::: ## API tags: what content from the API reference is in the example? ------------------------------------------------------------------------- `tag` use case --------------------------------- --------------------------------------- **Primary or relevant plot component** `component: axes` remarkable or very clear use of component `component: axis` `component: marker` `component: label` `component: title` `component: legend` `component: subplot` `component: figure` `component: annotation` `component: label` `component: ticks` `component: spines` frequently paired with `component: axis` `component: error` `component: animation` **Styling** Use these tags when plot contains a teachable example `styling: color` `styling: shape` `styling: size` `styling: position` `styling: texture` `styling: colormap` `styling: linestyle` `styling: small-multiples` `styling: conditional` styling is determined programmatically by a condition being met **Interactivity** `interactivity: event handling` `interactivity: click` `interactivity: mouseover` `interactivity: zoom` `interactivity: pan` `interactivity: brush` `interactivity: drag` `interactivity: scroll` **Plot Type** `plot-type: bar` example contains a bar plot `plot-type: line` example contains a line plot `plot-type: pie` example contains a pie plot `plot-type: polar` example contains a polar plot `plot-type: 3D` example contains a 3D plot `plot-type: histogram` example contains a histogram `plot-type: specialty` `plot-type: scatter` ------------------------------------------------------------------------- ## Structural tags: what format is the example? What context can we provide? +--------------------+-------------------------------------------------+ | `tag` | use case | +====================+=================================================+ | `level` | level refers to how much context/background the | | | user will need | +--------------------+-------------------------------------------------+ | `level: beginner` | concepts are standalone, self-contained, | | | require only one module | +--------------------+-------------------------------------------------+ | `le | concepts may require knowledge of other | | vel: intermediate` | modules, have dependencies | +--------------------+-------------------------------------------------+ | `level: advanced` | concepts require multiple modules and have | | | dependencies | +--------------------+-------------------------------------------------+ | `purpose` | what\'s it here for? | +--------------------+-------------------------------------------------+ | `purp | storytelling exemplar \-- build a visual | | ose: storytelling` | argument | +--------------------+-------------------------------------------------+ | `p | reference docs like \ | | urpose: reference` | "marker reference\" or \"list of named colors\" | | | | | | : - dense collection of short-format | | | information | | | - well-defined scope, accessible | | | information | +--------------------+-------------------------------------------------+ | `purpose: fun` | just for fun! | +--------------------+-------------------------------------------------+ | ` | good showcase example | | purpose: showcase` | | +--------------------+-------------------------------------------------+ ## Domain tags: what discipline(s) might seek this example consistently? It\'s futile to draw fences around \"who owns what\", and that\'s not the point of domain tags. See below for a list of existing domain tags. If you don\'t see the one you\'re looking for and you think it should exist, consider proposing it. ----------------------------------------------------------------------- `tag` use case ------------------------------- --------------------------------------- `domain` for whom is the example relevant? `domain: cartography` `domain: geometry` `domain: statistics` `domain: oceanography` `domain: signal-processing` ----------------------------------------------------------------------- ## Internal tags: what information is helpful for maintainers or contributors? These tags should be used only for development purposes; therefore please add them separately behind a version guard: ``` rst .. ifconfig:: releaselevel == 'dev' .. tags:: internal: needs-review ``` -------------------------------------------------------------------------------- `tag` use case ------------------------------ ------------------------------------------------- `internal: high-bandwidth` allows users to filter out bandwidth-intensive examples like animations `internal: untagged` allows docs contributors to easily find untagged examples `internal: deprecated` examples containing deprecated functionality or concepts `internal: needs-review` example needs to be reviewed for accuracy or pedagogical value `internal: outstanding-todo` example has an unfinished to-do `internal: too-much` the example should be refined, split into multiple examples, or reformatted into a tutorial or reference -------------------------------------------------------------------------------- --- # Tagging guidelines ## Why do we need tags? Tags serve multiple purposes. Tags have a one-to-many organization (i.e. one example can have several tags), while the gallery structure requires that examples are placed in only one location. This means tags provide a secondary layer of organization and make the gallery of examples more flexible and more user-friendly. They allow for better discoverability, search, and browse functionality. They are helpful for users struggling to write a search query for what they\'re looking for. Hidden tags provide additional functionality for maintainers and contributors. ## How to tag? Place the tag directive at the bottom of each page and add the tags underneath, e.g.: ``` rst .. tags:: topic: tagging, purpose: reference ``` ## What gets a tag? Every gallery example should be tagged with: - 1+ content tags - structural, domain, or internal tag(s) if helpful Tags can repeat existing forms of organization (e.g. an example is in the Animation folder and also gets an `animation` tag). Tags are helpful to denote particularly good \"byproduct\" examples. E.g. the explicit purpose of a gallery example might be to demonstrate a colormap, but it\'s also a good demonstration of a legend. Tag `legend` to indicate that, rather than changing the title or the scope of the example. ::: card **Tag Categories** \^\^\^ .. rst-class:: section-toc ::: {.toctree maxdepth="2"} tag_glossary ::: +++ See `Tag Glossary `{.interpreted-text role="doc"} for a complete list ::: ## Proposing new tags 1. Review existing tag list, looking out for similar entries (i.e. `axes` and `axis`). 2. If a relevant tag or subcategory does not yet exist, propose it. Each tag is two parts: `subcategory: tag`. Tags should be one or two words. 3. New tags should be added when they are relevant to existing gallery entries too. Avoid tags that will link to only a single gallery entry. 4. Tags can recreate other forms of organization. Tagging organization aims to work for 80-90% of cases. Some examples fall outside of the tagging structure. Niche or specific examples shouldn\'t be given standalone tags that won\'t apply to other examples. --- # Testing Matplotlib uses the [pytest](http://doc.pytest.org/en/latest/) framework. The tests are in `lib/matplotlib/tests`{.interpreted-text role="file"}, and customizations to the pytest testing infrastructure are in `matplotlib.testing`{.interpreted-text role="mod"}. ## Requirements {#testing_requirements} To run the tests you will need to `set up Matplotlib for development `{.interpreted-text role="ref"}. Note in particular the `additional dependencies `{.interpreted-text role="ref"} for testing. ::: note ::: title Note ::: We will assume that you want to run the tests in a development setup. While you can run the tests against a regular installed version of Matplotlib, this is a far less common use case. You still need the `additional dependencies `{.interpreted-text role="ref"} for testing. You have to additionally get the reference images from the repository, because they are not distributed with pre-built Matplotlib packages. ::: ## Running the tests {#run_tests} In the root directory of your development repository run: pytest `pytest` can be configured via many `command-line parameters `{.interpreted-text role="external+pytest:doc"}. Some particularly useful ones are: ------------------------ ------------------------------------------------------------------------------------------------------------ `-v` or `--verbose` Be more verbose `-n NUM` Run tests in parallel over NUM processes (requires [pytest-xdist](https://pypi.org/project/pytest-xdist/)) `--capture=no` or `-s` Do not capture stdout ------------------------ ------------------------------------------------------------------------------------------------------------ To run a single test from the command line, you can provide a file path, optionally followed by the function separated by two colons, e.g., (tests do not need to be installed, but Matplotlib should be): pytest lib/matplotlib/tests/test_simplification.py::test_clipping If you want to use `pytest` as a module (via `python -m pytest`), then you will need to avoid clashes between `pytest`\'s import mode and Python\'s search path: - On more recent Python, you may `disable "unsafe import paths" <-P>`{.interpreted-text role="external+python:std:option"} (i.e., stop adding the current directory to the import path) with the `-P` argument: python -P -m pytest - On older Python, you may enable `isolated mode <-I>`{.interpreted-text role="external+python:std:option"} (which stops adding the current directory to the import path, but has other repercussions): python -I -m pytest - On any Python, set `pytest`\'s `import mode `{.interpreted-text role="external+pytest:doc"} to the older `prepend` mode (but note that this will break `pytest`\'s assert rewriting): python -m pytest --import-mode prepend ### Viewing image test output The output of `image-based `{.interpreted-text role="ref"} tests is stored in a `result_images` directory. These images can be compiled into one HTML page, containing hundreds of images, using the `visualize_tests` tool: python tools/visualize_tests.py Image test failures can also be analysed using the `triage_tests` tool: python tools/triage_tests.py The triage tool allows you to accept or reject test failures and will copy the new image to the folder where the baseline test images are stored. The triage tool requires that `QT `{.interpreted-text role="ref"} is installed. ## Writing a simple test Many elements of Matplotlib can be tested using standard tests. For example, here is a test from `matplotlib/tests/test_basic.py`{.interpreted-text role="file"}: def test_simple(): """ very simple example test """ assert 1 + 1 == 2 Pytest determines which functions are tests by searching for files whose names begin with `"test_"` and then within those files for functions beginning with `"test"` or classes beginning with `"Test"`. Some tests have internal side effects that need to be cleaned up after their execution (such as created figures or modified [.rcParams]{.title-ref}). The pytest fixture `matplotlib.testing.conftest.mpl_test_settings` will automatically clean these up; there is no need to do anything further. ## Random data in tests Random data is a very convenient way to generate data for examples, however the randomness is problematic for testing (as the tests must be deterministic!). To work around this set the seed in each test. For numpy\'s default random number generator use: import numpy as np rng = np.random.default_rng(19680801) and then use `rng` when generating the random numbers. The seed is `John Hunter's `{.interpreted-text role="ref"} birthday. ## Writing an image comparison test {#image-comparison} Writing an image-based test is only slightly more difficult than a simple test. The main consideration is that you must specify the \"baseline\", or expected, images in the [\~matplotlib.testing.decorators.image_comparison]{.title-ref} decorator. For example, this test generates a single image and automatically tests it: from matplotlib.testing.decorators import image_comparison import matplotlib.pyplot as plt @image_comparison(baseline_images=['line_dashes'], remove_text=True, extensions=['png'], style='mpl20') def test_line_dashes(): fig, ax = plt.subplots() ax.plot(range(10), linestyle=(0, (3, 3)), lw=5) The first time this test is run, there will be no baseline image to compare against, so the test will fail. Copy the output images (in this case `result_images/test_lines/test_line_dashes.png`{.interpreted-text role="file"}) to the correct subdirectory of `baseline_images`{.interpreted-text role="file"} tree in the source directory (in this case `lib/matplotlib/tests/baseline_images/test_lines`{.interpreted-text role="file"}). Put this new file under source code revision control (with `git add`). When rerunning the tests, they should now pass. It is preferred that new tests use `style='mpl20'` as this leads to smaller figures and reflects the newer look of default Matplotlib plots. Also, if the texts (labels, tick labels, etc) are not really part of what is tested, use the `remove_text=True` argument or add the `text_placeholders` fixture as this will lead to smaller figures and reduce possible issues with font mismatch on different platforms. ### Compare two methods of creating an image Baseline images take a lot of space in the Matplotlib repository. An alternative approach for image comparison tests is to use the [\~matplotlib.testing.decorators.check_figures_equal]{.title-ref} decorator, which should be used to decorate a function taking two [.Figure]{.title-ref} parameters and draws the same images on the figures using two different methods (the tested method and the baseline method). The decorator will arrange for setting up the figures and then collect the drawn results and compare them. For example, this test compares two different methods to draw the same circle: plotting a circle using a [matplotlib.patches.Circle]{.title-ref} patch vs plotting the circle using the parametric equation of a circle : from matplotlib.testing.decorators import check_figures_equal import matplotlib.patches as mpatches import matplotlib.pyplot as plt import numpy as np @check_figures_equal() def test_parametric_circle_plot(fig_test, fig_ref): xo = yo = 0.5 radius = 0.4 ax_test = fig_test.subplots() theta = np.linspace(0, 2 * np.pi, 150) l, = ax_test.plot(xo + (radius * np.cos(theta)), yo + (radius * np.sin(theta)), c='r') ax_ref = fig_ref.subplots() red_circle_ref = mpatches.Circle((xo, yo), radius, ec='r', fc='none', lw=l.get_linewidth()) ax_ref.add_artist(red_circle_ref) for ax in [ax_ref, ax_test]: ax.set(xlim=(0, 1), ylim=(0, 1), aspect='equal') Both comparison decorators have a tolerance argument `tol` that is used to specify the tolerance for difference in color value between the two images, where 255 is the maximal difference. The test fails if the average pixel difference is greater than this value. See the documentation of [\~matplotlib.testing.decorators.image_comparison]{.title-ref} and [\~matplotlib.testing.decorators.check_figures_equal]{.title-ref} for additional information about their use. ## Creating a new module in matplotlib.tests We try to keep the tests categorized by the primary module they are testing. For example, the tests related to the `mathtext.py` module are in `test_mathtext.py`. ## Using GitHub Actions for CI [GitHub Actions](https://docs.github.com/en/actions) is a hosted CI system \"in the cloud\". GitHub Actions is configured to receive notifications of new commits to GitHub repos and to run builds or tests when it sees these new commits. It looks for a YAML files in `.github/workflows` to see how to test the project. GitHub Actions is already enabled for the [main Matplotlib GitHub repository](https://github.com/matplotlib/matplotlib/) \-- for example, see [the Tests workflows](https://github.com/matplotlib/matplotlib/actions?query=workflow%3ATests). GitHub Actions should be automatically enabled for your personal Matplotlib fork once the YAML workflow files are in it. It generally isn\'t necessary to look at these workflows, since any pull request submitted against the main Matplotlib repository will be tested. The Tests workflow is skipped in forked repositories but you can trigger a run manually from the [GitHub web interface](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow). You can see the GitHub Actions results at \-- here\'s [an example](https://github.com/QuLogic/matplotlib/actions). ## Using tox [Tox](https://tox.readthedocs.io/en/latest/) is a tool for running tests against multiple Python environments, including multiple versions of Python (e.g., 3.10, 3.11) and even different Python implementations altogether (e.g., CPython, PyPy, Jython, etc.), as long as all these versions are available on your system\'s \$PATH (consider using your system package manager, e.g. apt-get, yum, or Homebrew, to install them). tox makes it easy to determine if your working copy introduced any regressions before submitting a pull request. Here\'s how to use it: ``` bash $ pip install tox $ tox ``` You can also run tox on a subset of environments: ``` bash $ tox -e py310,py311 ``` Tox processes environments sequentially by default, which can be slow when testing multiple environments. To speed this up, tox now includes built-in parallelization support via the \--parallel flag. Give it a try: ``` bash $ tox --parallel auto ``` Tox is configured using a file called `tox.ini`. You may need to edit this file if you want to add new environments to test (e.g., `py33`) or if you want to tweak the dependencies or the way the tests are run. For more info on the `tox.ini` file, see the [Tox Configuration Specification](https://tox.readthedocs.io/en/latest/config.html). ## Building old versions of Matplotlib When running a `git bisect` to see which commit introduced a certain bug, you may (rarely) need to build very old versions of Matplotlib. The following constraints need to be taken into account: - Matplotlib 1.3 (or earlier) requires numpy 1.8 (or earlier). ## Testing released versions of Matplotlib Running the tests on an installation of a released version (e.g. PyPI package or conda package) also requires additional setup. ::: note ::: title Note ::: For an end-user, there is usually no need to run the tests on released versions of Matplotlib. Official releases are tested before publishing. ::: ### Install additional dependencies Install the `additional dependencies for testing `{.interpreted-text role="ref"}. ### Obtain the reference images Many tests compare the plot result against reference images. The reference images are not part of the regular packaged versions (pip wheels or conda packages). If you want to run tests with reference images, you need to obtain the reference images matching the version of Matplotlib you want to test. To do so, either download the matching source distribution `matplotlib-X.Y.Z.tar.gz` from [PyPI](https://pypi.org/project/matplotlib/) or alternatively, clone the git repository and `git checkout vX.Y.Z`. Copy the folder `lib/matplotlib/tests/baseline_images`{.interpreted-text role="file"} to the folder `matplotlib/tests`{.interpreted-text role="file"} of your the matplotlib installation to test. The correct target folder can be found using: python -c "import matplotlib.tests; print(matplotlib.tests.__file__.rsplit('/', 1)[0])" An analogous copying of `lib/mpl_toolkits/*/tests/baseline_images`{.interpreted-text role="file"} is necessary for testing `mpl_toolkits`. ### Run the tests To run all the tests on your installed version of Matplotlib: pytest --pyargs matplotlib.tests The test discovery scope can be narrowed to single test modules or even single functions: pytest --pyargs matplotlib.tests.test_simplification.py::test_clipping --- # Bug triaging and issue curation {#bug_triaging} The [issue tracker](https://github.com/matplotlib/matplotlib/issues) is important to communication in the project because it serves as the centralized location for making feature requests, reporting bugs, identifying major projects to work on, and discussing priorities. For this reason, it is important to curate the issue list, adding labels to issues and closing issues that are resolved or unresolvable. Writing well defined issues increases their chances of being successfully resolved. Guidelines on writing a good issue can be found in `here `{.interpreted-text role="ref"}. The recommendations in this page are adapted from the [scikit learn](https://scikit-learn.org/stable/developers/bug_triaging.html) and [Pandas](https://pandas.pydata.org/docs/development/maintaining.html) contributing guides. ## Improve issue reports Triaging issues does not require any particular expertise in the internals of Matplotlib, is extremely valuable to the project, and we welcome anyone to participate in issue triage! However, people who are not part of the Matplotlib organization do not have [permissions to change milestones, add labels, or close issue](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization). If you do not have enough GitHub permissions do something (e.g. add a label, close an issue), please leave a comment with your recommendations! The following actions are typically useful: - documenting issues that are missing elements to reproduce the problem such as code samples - suggesting better use of code formatting (e.g. triple back ticks in the markdown). - suggesting to reformulate the title and description to make them more explicit about the problem to be solved - linking to related issues or discussions while briefly describing how they are related, for instance \"See also #xyz for a similar attempt at this\" or \"See also #xyz where the same thing was reported\" provides context and helps the discussion - verifying that the issue is reproducible - classify the issue as a feature request, a long standing bug or a regression ::: topic **Fruitful discussions** Online discussions may be harder than it seems at first glance, in particular given that a person new to open-source may have a very different understanding of the process than a seasoned maintainer. Overall, it is useful to stay positive and assume good will. [The following article](http://gael-varoquaux.info/programming/technical-discussions-are-hard-a-few-tips.html) explores how to lead online discussions in the context of open source. ::: ### Maintainers and triage team members In addition to the above, maintainers and the triage team can do the following important tasks: - Update labels for issues and PRs: see the list of [available GitHub labels](https://github.com/matplotlib/matplotlib/labels). - Triage issues: - **reproduce the issue**, if the posted code is a bug label the issue with \"status: confirmed bug\". - **identify regressions**, determine if the reported bug used to work as expected in a recent version of Matplotlib and if so determine the last working version. Regressions should be milestoned for the next bug-fix release and may be labeled as \"Release critical\". - **close usage questions** and politely point the reporter to use [discourse](https://discourse.matplotlib.org) or Stack Overflow instead and label as \"community support\". - **close duplicate issues**, after checking that they are indeed duplicate. Ideally, the original submitter moves the discussion to the older, duplicate issue - **close issues that cannot be replicated**, after leaving time (at least a week) to add extra information ::: topic **Closing issues: a tough call** When uncertain on whether an issue should be closed or not, it is best to strive for consensus with the original poster, and possibly to seek relevant expertise. However, when the issue is a usage question or has been considered as unclear for many years, then it should be closed. ::: ## Preparing PRs for review Reviewing code is also encouraged. Contributors and users are welcome to participate to the review process following our `review guidelines `{.interpreted-text role="ref"}. ## Triage workflow {#triage_workflow} The following workflow is a good way to approach issue triaging: 1. Thank the reporter for opening an issue The issue tracker is many people's first interaction with the Matplotlib project itself, beyond just using the library. As such, we want it to be a welcoming, pleasant experience. 2. Is this a usage question? If so close it with a polite message. 3. Is the necessary information provided? Check that the poster has filled in the issue template. If crucial information (the version of Python, the version of Matplotlib used, the OS, and the backend), is missing politely ask the original poster to provide the information. 4. Is the issue minimal and reproducible? For bug reports, we ask that the reporter provide a minimal reproducible example. See [this useful post](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) by Matthew Rocklin for a good explanation. If the example is not reproducible, or if it\'s clearly not minimal, feel free to ask the reporter if they can provide an example or simplify the provided one. Do acknowledge that writing minimal reproducible examples is hard work. If the reporter is struggling, you can try to write one yourself. If a reproducible example is provided, but you see a simplification, add your simpler reproducible example. If you cannot reproduce the issue, please report that along with your OS, Python, and Matplotlib versions. If we need more information from either this or the previous step please label the issue with \"status: needs clarification\". 5. Is this a regression? While we strive for a bug-free library, regressions are the highest priority. If we have broken user-code that *used to* work, we should fix that in the next micro release! Try to determine when the regression happened by running the reproduction code against older versions of Matplotlib. This can be done by released versions of Matplotlib (to get the version it last worked in) or by using [git bisect](https://git-scm.com/docs/git-bisect) to find the first commit where it was broken. 6. Is this a duplicate issue? We have many open issues. If a new issue seems to be a duplicate, point to the original issue. If it is a clear duplicate, or consensus is that it is redundant, close it. Make sure to still thank the reporter, and encourage them to chime in on the original issue, and perhaps try to fix it. If the new issue provides relevant information, such as a better or slightly different example, add it to the original issue as a comment or an edit to the original post. Label the closed issue with \"status: duplicate\" 7. Make sure that the title accurately reflects the issue. If you have the necessary permissions edit it yourself if it\'s not clear. 8. Add the relevant labels, such as \"Documentation\" when the issue is about documentation, \"Bug\" if it is clearly a bug, \"New feature\" if it is a new feature request, \... If the issue is clearly defined and the fix seems relatively straightforward, label the issue as "Good first issue" (and possibly a description of the fix or a hint as to where in the code base to look to get started). An additional useful step can be to tag the corresponding module e.g. the \"GUI/Qt\" label when relevant. ## Triage team {#triage_team} If you would like to join the triage team: 1. Correctly triage 2-3 issues. 2. Ask someone on in the Matplotlib organization (publicly or privately) to recommend you to the triage team (look for \"Member\" on the top-right of comments on GitHub). If you worked with someone on the issues triaged, they would be a good person to ask. 3. Responsibly exercise your new power! Anyone with commit or triage rights may nominate a user to be invited to join the triage team by emailing . --- ::: {#troubleshooting-faq} ::: redirect-from /faq/troubleshooting_faq ::: ::: ::: redirect-from /users/faq/troubleshooting_faq ::: # Troubleshooting For guidance on debugging an installation, see `installing-faq`{.interpreted-text role="ref"}. ## Problems with git {#git-trouble} First, make sure you have a clean build and install (see `clean-install`{.interpreted-text role="ref"}), get the latest git update, install it and run a simple test script in debug mode: rm -rf /path/to/site-packages/matplotlib* git clean -xfd git pull python -m pip install -v . > build.out python -c "from pylab import *; set_loglevel('DEBUG'); plot(); show()" > run.out and post `build.out`{.interpreted-text role="file"} and `run.out`{.interpreted-text role="file"} to the [matplotlib-devel](https://mail.python.org/mailman/listinfo/matplotlib-devel) mailing list (please do not post git problems to the [users list](https://mail.python.org/mailman/listinfo/matplotlib-users)). Of course, you will want to clearly describe your problem, what you are expecting and what you are getting, but often a clean build and install will help. See also `reporting-problems`{.interpreted-text role="ref"}. ## Unlink of file `*/_c_internal_utils.cp311-win_amd64.pyd` failed The DLL files may be loaded by multiple running instances of Matplotlib; therefore check that Matplotlib is not running in any other application before trying to unlink this file. Multiple versions of Matplotlib can be linked to the same DLL, for example a development version installed in a development conda environment and a stable version running in a Jupyter notebook. To resolve this error, fully close all running instances of Matplotlib. ## Windows compilation errors If the compiled extensions are not building on Windows due to errors in linking to Windows\' header files, for example `../../src/_tkagg.cpp:133:10: error: 'WM_DPICHANGED' was not declared in this scope`, you should check which compiler Meson is using: ``` bat Build type: native build Project name: matplotlib Project version: 3.9.0.dev0 C compiler for the host machine: cc (gcc 7.2.0 "cc (Rev1, Built by MSYS2 project) 7.2.0") C linker for the host machine: cc ld.bfd 2.29.1 C++ compiler for the host machine: c++ (gcc 7.2.0 "c++ (Rev1, Built by MSYS2 project) 7.2.0") C++ linker for the host machine: c++ ld.bfd 2.29.1 ``` Our `dependencies `{.interpreted-text role="ref"} documentation lists the minimum header version if you intended to use `MSYS2`. If you intended to use `MSVC` then you may need to force Meson to `use MSVC `{.interpreted-text role="external+meson-python:ref"}. --- ::: title Matplotlib documentation ::: ::: module matplotlib ::: # Matplotlib documentation Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations. ## Install ::: {.tab-set .sd-width-content-min} ::: tab-item pip ``` bash pip install matplotlib ``` ::: ::: tab-item conda ``` bash conda install -c conda-forge matplotlib ``` ::: ::: tab-item pixi ``` bash pixi add matplotlib ``` ::: ::: tab-item uv ``` bash uv add matplotlib ``` ::: warning ::: title Warning ::: uv usually installs its own versions of Python from the python-build-standalone project, and only recent versions of those Python builds (August 2025) work properly with the `tkagg` backend for displaying plots in a window. Please make sure you are using uv 0.8.7 or newer (update with e.g. `uv self update`) and that your bundled Python installs are up to date (with `uv python upgrade --reinstall`). Alternatively, you can use one of the other `supported GUI frameworks `{.interpreted-text role="ref"}, e.g. ``` bash uv add matplotlib pyside6 ``` ::: ::: ::: tab-item other `install-official`{.interpreted-text role="ref"} `install-third-party`{.interpreted-text role="ref"} `install-nightly-build`{.interpreted-text role="ref"} `install-source`{.interpreted-text role="ref"} ::: ::: ::: {.toctree hidden=""} install/index ::: ## Learn ::: grid 1 1 2 2 ::: {.grid-item-card padding="2" columns="6"} **How to use Matplotlib?** \^\^\^ .. toctree:: :maxdepth: 1 > users/explain/quick_start User guide \ > tutorials/index.rst users/faq.rst ::: ::: {.grid-item-card padding="2" columns="6"} **What can Matplotlib do?** \^\^\^ .. toctree:: :maxdepth: 1 > plot_types/index.rst gallery/index.rst ::: ::: {.grid-item-card padding="2" columns="12"} **Reference** \^\^\^ ::: {.grid class-row="sd-align-minor-center"} 1 1 2 2 ::: grid-item ::: {.toctree maxdepth="1"} API reference \ Figure methods \ Plotting methods \ ::: ::: ::: grid-item Top-level interfaces to create: - figures: [.pyplot.figure]{.title-ref} - subplots: [.pyplot.subplots]{.title-ref}, [.pyplot.subplot_mosaic]{.title-ref} ::: ::: ::: ::: ## Community ::: {.grid class-row="sd-align-minor-center"} 1 1 2 2 ::: grid-item ::: rst-class section-toc ::: ::: {.toctree maxdepth="2"} users/resources/index.rst ::: ::: ::: grid-item `link-external;1em;sd-text-info`{.interpreted-text role="octicon"} [Third-party packages](https://matplotlib.org/mpl-third-party/), provide custom, domain specific, and experimental features, including styles, colors, more plot types and backends, and alternative interfaces. ::: ::: ## What\'s new ::: grid 1 1 2 2 ::: grid-item Learn about new features and API changes. ::: ::: grid-item ::: {.toctree maxdepth="1"} release/release_notes.rst ::: ::: ::: ## Contribute ::: {.grid class-row="sd-align-minor-center"} 1 1 2 2 ::: grid-item Matplotlib is a community project maintained for and by its users. See `developers-guide-index`{.interpreted-text role="ref"} for the many ways you can help! ::: ::: {.grid-item maxdepth="2"} .. rst-class:: section-toc .. toctree: devel/index.rst ::: ::: ## About us ::: {.grid class-row="sd-align-minor-center"} 1 1 2 2 ::: grid-item Matplotlib was created by neurobiologist John Hunter to work with EEG data. It grew to be used and developed by many people in many different fields. John\'s goal was that Matplotlib make easy things easy and hard things possible. ::: ::: {.grid-item maxdepth="2"} .. rst-class:: section-toc .. toctree: project/index.rst ::: ::: --- ::: redirect-from /devel/dependencies ::: ::: redirect-from /users/installing/dependencies ::: # Dependencies ## Runtime dependencies {#runtime_dependencies} ### Required When installing through a package manager like `pip` or `conda`, the mandatory dependencies are automatically installed. This list is mainly for reference. - [Python](https://www.python.org/downloads/) (\>= 3.11) - [contourpy](https://pypi.org/project/contourpy/) (\>= 1.0.1) - [cycler](https://matplotlib.org/cycler/) (\>= 0.10.0) - [dateutil](https://pypi.org/project/python-dateutil/) (\>= 2.7) - [fontTools](https://fonttools.readthedocs.io/en/latest/) (\>= 4.22.0) - [kiwisolver](https://github.com/nucleic/kiwi) (\>= 1.3.1) - [NumPy](https://numpy.org) (\>= 1.25) - [packaging](https://pypi.org/project/packaging/) (\>= 20.0) - [Pillow](https://pillow.readthedocs.io/en/latest/) (\>= 9.0) - [pyparsing](https://pypi.org/project/pyparsing/) (\>= 3) ### Optional {#optional_dependencies} The following packages and tools are not required but extend the capabilities of Matplotlib. #### Backends {#backend_dependencies} Matplotlib figures can be rendered to various user interfaces. See `what-is-a-backend`{.interpreted-text role="ref"} for more details on the optional Matplotlib backends and the capabilities they provide. - [Tk](https://docs.python.org/3/library/tk.html) (\>= 8.5, != 8.6.0 or 8.6.1): for the Tk-based backends. Tk is part of most standard Python installations, but it\'s not part of Python itself and thus may not be present in rare cases. - [PyQt6](https://pypi.org/project/PyQt6/) (\>= 6.1), [PySide6](https://pypi.org/project/PySide6/), [PyQt5](https://pypi.org/project/PyQt5/) (\>= 5.12), or [PySide2](https://pypi.org/project/PySide2/): for the Qt-based backends. - [PyGObject](https://pygobject.readthedocs.io/en/latest/) and [pycairo](https://pycairo.readthedocs.io/en/latest/) (\>= 1.14.0): for the GTK-based backends. If using pip (but not conda or system package manager) PyGObject must be built from source; see [pygobject documentation](https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html). - [pycairo](https://pycairo.readthedocs.io/en/latest/) (\>= 1.14.0) or [cairocffi](https://doc.courtbouillon.org/cairocffi/stable/) (\>= 0.8): for cairo-based backends. - [wxPython](https://www.wxpython.org/) (\>= 4): for the wx-based backends. If using pip (but not conda or system package manager) on Linux wxPython wheels must be manually downloaded from . - [Tornado](https://pypi.org/project/tornado/) (\>= 5): for the WebAgg backend. - [ipykernel](https://pypi.org/project/ipykernel/): for the nbagg backend. - macOS (\>= 10.12): for the macosx backend. #### Animations - [ffmpeg](https://www.ffmpeg.org/): for saving movies. - [ImageMagick](https://www.imagemagick.org/script/index.php): for saving animated gifs. #### Font handling and rendering - [LaTeX](https://www.latex-project.org/) (with [cm-super](https://ctan.org/pkg/cm-super) and [underscore](https://ctan.org/pkg/underscore)) and [GhostScript (\>= 9.0)](https://ghostscript.com/releases/): for rendering text with LaTeX. - [fontconfig](https://www.fontconfig.org) (\>= 2.7): for detection of system fonts on Linux. ### C libraries Matplotlib brings its own copies of the following libraries: - `Agg`: the Anti-Grain Geometry C++ rendering engine - `ttconv`: a TrueType font utility Additionally, Matplotlib depends on: - [FreeType](https://www.freetype.org/) (\>= 2.3): a font rendering library - [QHull](http://www.qhull.org/) (\>= 8.0.2): a library for computing triangulations (note that this version is also known as 2020.2) #### Download during install By default, Matplotlib downloads and builds its own copies of Qhull and FreeType. The vendored version of FreeType is necessary to run the test suite, because different versions of FreeType rasterize characters differently. #### Use system libraries To force Matplotlib to use a copy of FreeType or Qhull already installed in your system, you must [pass configuration settings to Meson via meson-python](https://meson-python.readthedocs.io/en/stable/how-to-guides/config-settings.html): ``` sh python -m pip install \ --config-settings=setup-args="-Dsystem-freetype=true" \ --config-settings=setup-args="-Dsystem-qhull=true" \ . ``` In this case, you need to install the FreeType and Qhull library and headers. This can be achieved using a package manager, e.g. for FreeType: ``` sh # Pick ONE of the following: sudo apt install libfreetype6-dev # Debian/Ubuntu sudo dnf install freetype-devel # Fedora brew install freetype # macOS with Homebrew conda install freetype # conda, any OS ``` (adapt accordingly for Qhull). On Linux and macOS, it is also recommended to install [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/), a helper tool for locating FreeType: ``` sh # Pick ONE of the following: sudo apt install pkg-config # Debian/Ubuntu sudo dnf install pkgconf # Fedora brew install pkg-config # macOS with Homebrew conda install pkg-config # conda # Or point the PKG_CONFIG environment variable to the path to pkg-config: export PKG_CONFIG=... ``` If not using pkg-config (in particular on Windows), you may need to set the include path (to the library headers) and link path (to the libraries) explicitly, if they are not in standard locations. This can be done using standard environment variables \-- on Linux and macOS: ``` sh export CFLAGS='-I/directory/containing/ft2build.h' export LDFLAGS='-L/directory/containing/libfreetype.so' ``` and on Windows: ``` bat set CL=/IC:\directory\containing\ft2build.h set LINK=/LIBPATH:C:\directory\containing\freetype.lib ``` If you go this route but need to reset and rebuild to change your settings, remember to clear your artifacts before re-building: git clean -xfd #### From source files If the automatic download does not work (for example, on air-gapped systems) it is preferable to instead use system libraries. However you can manually download the tarballs into `subprojects/packagecache`{.interpreted-text role="file"} at the top level of the checkout repository. The expected SHA256 hashes of the downloaded tarballs are in `subprojects/*.wrap`{.interpreted-text role="file"} if you wish to verify them, but they will also be checked by the build system before unpacking. ### Minimum pip / manylinux support (linux) Matplotlib publishes [manylinux wheels](https://github.com/pypa/manylinux) which have a minimum version of pip which will recognize the wheels - Python 3.9+: `manylinux2014` / pip \>= 19.3 In all cases the required version of pip is embedded in the CPython source. ## Build dependencies {#development-dependencies} ### Python {#setup-dependencies} `pip` normally builds packages using `build isolation `{.interpreted-text role="external+pip:doc"}, which means that `pip` installs the dependencies listed here for the duration of the build process. However, build isolation is disabled via the the `--no-build-isolation `{.interpreted-text role="external+pip:ref"} flag when `installing Matplotlib for development `{.interpreted-text role="ref"}, which means that the dependencies must be explicitly installed, either by `creating a virtual environment `{.interpreted-text role="ref"} (recommended) or by manually installing the following packages: - [meson-python](https://meson-python.readthedocs.io/) (\>= 0.13.1). - [PyBind11](https://pypi.org/project/pybind11/) (\>= 2.13.2). Used to connect C/C++ code with Python. - [setuptools_scm](https://pypi.org/project/setuptools-scm/) (\>= 7). Used to update the reported `mpl.__version__` based on the current git commit. Also a runtime dependency for editable installs. - [NumPy]() (\>= 1.22). Also a runtime dependency. ### Compilers and external build tools {#compile-build-dependencies} When setting up a virtual environment for development, [ninja](https://ninja-build.org/) (\>= 1.8.2) may need to be installed separately. This may be available as a [pre-built binary](https://github.com/ninja-build/ninja/releases) or from a [package manager](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages) or bundled with Meson. Ninja may also be installed via `pip` if otherwise not available. #### Compilers {#compile-dependencies} Matplotlib requires a C++ compiler that supports C++17, and each platform has a development environment that must be installed before a compiler can be installed. You may also need to install headers for various libraries used in the compiled extension source files. > ::: tab-item > Linux > > On some Linux systems, you can install a meta-build package. For > example, on Ubuntu `apt install build-essential` with elevated > privileges. > > Otherwise, use the system distribution\'s package manager to install > `gcc `{.interpreted-text role="ref"}. > ::: > > ::: tab-item > macOS > > Install [Xcode](https://developer.apple.com/xcode/) for Apple platform > development. > ::: > > ::: tab-item > Windows > > Install [Visual Studio Build > Tools](https://visualstudio.microsoft.com/downloads/?q=build+tools) > > Make sure \"Desktop development with C++\" is selected, and that the > latest MSVC, \"C++ CMake tools for Windows,\" and a Windows SDK > compatible with your version of Windows are selected and installed. > They should be selected by default under the \"Optional\" subheading, > but are required to build Matplotlib from source. > > Alternatively, you can install a Linux-like environment such as > [CygWin](https://www.cygwin.com/) or [Windows Subsystem for > Linux](https://learn.microsoft.com/en-us/windows/wsl/install). If > using [MinGW-64](https://www.mingw-w64.org/), we require **v6** of the > `` `Mingw-w64-x86_64-headers ``. > ::: We highly recommend that you install a compiler using your platform tool, i.e., Xcode, VS Code or Linux package manager. Choose **one** compiler from this list: ::: {#compiler-table} ------------------------------------------------------------------------------------------------------------------------------------------------ compiler minimum platforms notes version -------------- -------------- -------------- --------------------------------------------------------------------------------------------------- GCC **7.2** Linux, macOS, [gcc 7.2](https://gcc.gnu.org/projects/cxx-status.html#cxx17), [GCC: Windows Binaries](https://gcc.gnu.org/install/binaries.html), Clang (LLVM) **5** Linux, macOS [clang 5](https://clang.llvm.org/cxx_status.html), [LLVM](https://releases.llvm.org/download.html) MSVC++ **16.0** Windows [Visual Studio 2019 C++](https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-160) ------------------------------------------------------------------------------------------------------------------------------------------------ ::: ## Test dependencies This section lists the additional software required for `running the tests `{.interpreted-text role="ref"}. ### Required - [pytest](http://doc.pytest.org/en/latest/) (\>= 7.0.0) ### Optional In addition to all of the optional dependencies on the main library, for testing the following will be used if they are installed. #### Python These packages are installed when `creating a virtual environment `{.interpreted-text role="ref"}, otherwise they must be installed manually: - [nbformat](https://pypi.org/project/nbformat/) and [nbconvert](https://pypi.org/project/nbconvert/) used to test the notebook backend - [pandas](https://pypi.org/project/pandas/) used to test compatibility with Pandas - [pikepdf](https://pypi.org/project/pikepdf/) used in some tests for the pgf and pdf backends - [psutil](https://pypi.org/project/psutil/) used in testing the interactive backends - [pytest-cov](https://pytest-cov.readthedocs.io/en/latest/) (\>= 2.3.1) to collect coverage information - [pytest-timeout](https://pypi.org/project/pytest-timeout/) to limit runtime in case of stuck tests - [pytest-xdist](https://pypi.org/project/pytest-xdist/) to run tests in parallel - [pytest-xvfb](https://pypi.org/project/pytest-xvfb/) to run tests without windows popping up (Linux) - [pytz](https://pypi.org/project/pytz/) used to test pytz int - [sphinx](https://pypi.org/project/Sphinx/) used to test our sphinx extensions - [xarray](https://pypi.org/project/xarray/) used to test compatibility with xarray #### External tools - [Ghostscript](https://ghostscript.com/) (\>= 9.0, to render PDF files) - [Inkscape](https://inkscape.org) (to render SVG files) - [WenQuanYi Zen Hei](http://wenq.org/en/) and [Noto Sans CJK](https://fonts.google.com/noto/use) fonts for testing font fallback and non-Western fonts If any of these dependencies are not discovered, then the tests that rely on them will be skipped by pytest. ::: note ::: title Note ::: When installing Inkscape on Windows, make sure that you select "Add Inkscape to system PATH", either for all users or current user, or the tests will not find it. ::: ## Documentation dependencies {#doc-dependencies} ### Python The additional Python packages required to build the `documentation `{.interpreted-text role="ref"} are listed in `doc-requirements.txt`{.interpreted-text role="file"} and can be installed using : pip install -r requirements/doc/doc-requirements.txt The content of `doc-requirements.txt`{.interpreted-text role="file"} is also shown below: ``` {literal=""} # Requirements for building docs # # You will first need a matching Matplotlib installation # e.g (from the Matplotlib root directory) # pip install --no-build-isolation --editable .[dev] # # Install the documentation requirements with: # pip install -r requirements/doc/doc-requirements.txt # sphinx>=5.1.0,!=6.1.2 colorspacious ipython ipywidgets ipykernel numpydoc>=1.0 packaging>=20 mpl-sphinx-theme~=3.10.0 pyyaml PyStemmer sphinxcontrib-svg2pdfconverter>=1.1.0 sphinxcontrib-video>=0.2.1 sphinx-copybutton sphinx-design sphinx-gallery[parallel]>=0.12.0 sphinx-tags>=0.4.0 ``` ### External tools {#doc-dependencies-external} #### Required The documentation requires LaTeX and Graphviz. These are not Python packages and must be installed separately. - [Graphviz](http://www.graphviz.org/download) - a LaTeX distribution, e.g. [TeX Live](https://www.tug.org/texlive/) or [MikTeX](https://miktex.org/) ##### LaTeX dependencies {#tex-dependencies} The following collections must be installed. When using a distribution that does not support collections, the packages listed for each collection must be installed. You may need to install some packages that are not listed here. The complete version of many LaTeX distribution installers, e.g. \"texlive-full\" or \"texlive-all\", will often automatically include these collections. ------------------------------------------------------------------------------ collection packages ----------------------------- ------------------------------------------------ collection-basic [cm](https://ctan.org/pkg/cm), luahbtex collection-fontsrecommended [cm-super](https://ctan.org/pkg/cm-super), [lm](https://ctan.org/pkg/lm), [txfonts](https://ctan.org/pkg/txfonts) collection-latex [fix-cm](https://ctan.org/pkg/fix-cm), [geometry](https://ctan.org/pkg/geometry), [hyperref](https://ctan.org/pkg/hyperref), [latex](https://ctan.org/pkg/latex), latex-bin, [psnfss](https://ctan.org/pkg/psnfss) collection-latexextra [import](https://ctan.org/pkg/import), [sfmath](https://ctan.org/pkg/sfmath), [type1cm](https://ctan.org/pkg/type1cm) collection-latexrecommended [fontspec](https://ctan.org/pkg/fontspec), [underscore](https://ctan.org/pkg/underscore), collection-xetex [xetex](https://ctan.org/pkg/xetex), xetex-bin ------------------------------------------------------------------------------ The following packages must also be installed: - [dvipng](https://ctan.org/pkg/dvipng) - [pgf](https://ctan.org/pkg/pgf) (if using the pgf backend) #### Optional The documentation can be built without Inkscape and optipng, but the build process will raise various warnings. - [Inkscape](https://inkscape.org) - [optipng](http://optipng.sourceforge.net) - the font [xkcd script](https://github.com/ipython/xkcd-font/) or [Comic Neue](https://github.com/crozynski/comicneue) - the font \"Times New Roman\" --- ::: {#environment-variables} ::: redirect-from /faq/installing_faq ::: ::: ::: redirect-from /users/faq/installing_faq ::: ::: redirect-from /users/installing/environment_variables_faq ::: # Environment variables ::: envvar HOME The user\'s home directory. On Linux, `~ `{.interpreted-text role="envvar"} is shorthand for `HOME`{.interpreted-text role="envvar"}. ::: ::: envvar MPLBACKEND This optional variable can be set to choose the Matplotlib backend. See `what-is-a-backend`{.interpreted-text role="ref"}. ::: ::: envvar MPLCONFIGDIR This is the directory used to store user customizations to Matplotlib, as well as some caches to improve performance. If `MPLCONFIGDIR`{.interpreted-text role="envvar"} is not defined, `{HOME}/.config/matplotlib`{.interpreted-text role="file"} and `{HOME}/.cache/matplotlib`{.interpreted-text role="file"} are used on Linux, and `{HOME}/.matplotlib`{.interpreted-text role="file"} on other platforms, if they are writable. Otherwise, the Python standard library\'s [tempfile.gettempdir]{.title-ref} is used to find a base directory in which the `matplotlib`{.interpreted-text role="file"} subdirectory is created. ::: ::: envvar PATH The list of directories searched to find executable programs. ::: ::: envvar PYTHONPATH The list of directories that are added to Python\'s standard search list when importing packages and modules. ::: ::: envvar QT_API The Python Qt wrapper to prefer when using Qt-based backends. See `the entry in the usage guide `{.interpreted-text role="ref"} for more information. ::: ## Setting environment variables in Linux and macOS {#setting-linux-macos-environment-variables} To list the current value of `PYTHONPATH`{.interpreted-text role="envvar"}, which may be empty, try: echo $PYTHONPATH The procedure for setting environment variables in depends on what your default shell is. Common shells include `bash`{.interpreted-text role="program"} and `csh`{.interpreted-text role="program"}. You should be able to determine which by running at the command prompt: echo $SHELL To create a new environment variable: export PYTHONPATH=~/Python # bash/ksh setenv PYTHONPATH ~/Python # csh/tcsh To prepend to an existing environment variable: export PATH=~/bin:${PATH} # bash/ksh setenv PATH ~/bin:${PATH} # csh/tcsh The search order may be important to you, do you want `~/bin`{.interpreted-text role="file"} to be searched first or last? To append to an existing environment variable: export PATH=${PATH}:~/bin # bash/ksh setenv PATH ${PATH}:~/bin # csh/tcsh To make your changes available in the future, add the commands to your `~/.bashrc`{.interpreted-text role="file"} or `~/.cshrc`{.interpreted-text role="file"} file. ## Setting environment variables in Windows {#setting-windows-environment-variables} Open the `Control Panel`{.interpreted-text role="program"} (`Start --> Control Panel`{.interpreted-text role="menuselection"}), start the `System`{.interpreted-text role="program"} program. Click the `Advanced`{.interpreted-text role="guilabel"} tab and select the `Environment Variables`{.interpreted-text role="guilabel"} button. You can edit or add to the `User Variables`{.interpreted-text role="guilabel"}. --- ::: redirect-from /users/installing ::: ::: redirect-from /users/installing/index ::: # Installation ::: {.tab-set .sd-width-content-min} ::: tab-item pip ``` bash pip install matplotlib ``` ::: ::: tab-item conda ``` bash conda install -c conda-forge matplotlib ``` ::: ::: tab-item pixi ``` bash pixi add matplotlib ``` ::: ::: tab-item uv ``` bash uv add matplotlib ``` ::: warning ::: title Warning ::: uv usually installs its own versions of Python from the python-build-standalone project, and only recent versions of those Python builds (August 2025) work properly with the `tkagg` backend for displaying plots in a window. Please make sure you are using uv 0.8.7 or newer (update with e.g. `uv self update`) and that your bundled Python installs are up to date (with `uv python upgrade --reinstall`). Alternatively, you can use one of the other `supported GUI frameworks `{.interpreted-text role="ref"}, e.g. ``` bash uv add matplotlib pyside6 ``` ::: ::: ::: tab-item other `install-official`{.interpreted-text role="ref"} `install-third-party`{.interpreted-text role="ref"} `install-nightly-build`{.interpreted-text role="ref"} `install-source`{.interpreted-text role="ref"} ::: ::: ## Install an official release {#install-official} Matplotlib releases are available as wheel packages for macOS, Windows and Linux on [PyPI](https://pypi.org/project/matplotlib/). Install it using `pip`: ``` sh python -m pip install -U pip python -m pip install -U matplotlib ``` If this command results in Matplotlib being compiled from source and there\'s trouble with the compilation, you can add `--prefer-binary` to select the newest version of Matplotlib for which there is a precompiled wheel for your OS and Python. ::: note ::: title Note ::: The following non-interactive backends work out of the box: Agg, ps, pdf, svg The TkAgg interactive backend also typically works out of the box. It requires Tk bindings, which are usually provided via the Python standard library\'s `tkinter` module. On some OSes, you may need to install a separate package like `python3-tk` to add this component of the standard library. Some tools like `uv` make use of Python builds from the python-build-standalone project, which only gained usable Tk bindings recently (August 2025). If you are having trouble with the TkAgg backend, ensure you have an up-to-date build, e.g. `uv self update && uv python upgrade --reinstall`. For support of other GUI frameworks, LaTeX rendering, saving animations and a larger selection of file formats, you can install `optional dependencies `{.interpreted-text role="ref"}. ::: ## Third-party distributions {#install-third-party} Various third-parties provide Matplotlib for their environments. ### Conda packages Matplotlib is available both via the *anaconda main channel* : ``` sh conda install matplotlib ``` as well as via the *conda-forge community channel* : ``` sh conda install -c conda-forge matplotlib ``` ### Python distributions Matplotlib is part of major Python distributions: - [Anaconda](https://www.anaconda.com/) - [ActiveState ActivePython](https://www.activestate.com/products/python/downloads/) - [WinPython](https://winpython.github.io/) ### Linux package manager If you are using the Python version that comes with your Linux distribution, you can install Matplotlib via your package manager, e.g.: - Debian / Ubuntu: `sudo apt-get install python3-matplotlib` - Fedora: `sudo dnf install python3-matplotlib` - Red Hat: `sudo yum install python3-matplotlib` - Arch: `sudo pacman -S python-matplotlib` ::: redirect-from /users/installing/installing_source ::: ## Install a nightly build {#install-nightly-build} Matplotlib makes nightly development build wheels available on the [scientific-python-nightly-wheels Anaconda Cloud organization](https://anaconda.org/scientific-python-nightly-wheels). These wheels can be installed with `pip` by specifying scientific-python-nightly-wheels as the package index to query: ``` sh python -m pip install \ --upgrade \ --pre \ --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ --extra-index-url https://pypi.org/simple \ matplotlib ``` ## Install from source {#install-source} ::: {.admonition .important} Installing for Development If you would like to contribute to Matplotlib or otherwise need to install the latest development code, please follow the instructions in `installing_for_devs`{.interpreted-text role="ref"}. ::: The following instructions are for installing from source for production use. This is generally *not* recommended; please use prebuilt packages when possible. Proceed with caution because these instructions may result in your build producing unexpected behavior and/or causing local testing to fail. Before trying to install Matplotlib, please install the `dependencies`{.interpreted-text role="ref"}. To build from a tarball, download the latest *tar.gz* release file from [the PyPI files page](https://pypi.org/project/matplotlib/). If you are building your own Matplotlib wheels (or sdists) on Windows, note that any DLLs that you copy into the source tree will be packaged too. ## Configure build and behavior defaults We provide a [meson.options](https://github.com/matplotlib/matplotlib/blob/main/meson.options) file containing options with which you can use to customize the build process. For example, which default backend to use, whether some of the optional libraries that Matplotlib ships with are installed, and so on. These options will be particularly useful to those packaging Matplotlib. Aspects of some behavioral defaults of the library can be configured via: ::: {.toctree maxdepth="2"} environment_variables_faq.rst ::: Default plotting appearance and behavior can be configured via the `rcParams file `{.interpreted-text role="ref"}. ## Dependencies Mandatory dependencies should be installed automatically if you install Matplotlib using a package manager such as `pip` or `conda`; therefore this list is primarily for reference and troubleshooting. ::: {.toctree maxdepth="2"} dependencies ::: ## Frequently asked questions {#installing-faq} ### Report a compilation problem See `reporting-problems`{.interpreted-text role="ref"}. ### Matplotlib compiled fine, but nothing shows up when I use it The first thing to try is a `clean install `{.interpreted-text role="ref"} and see if that helps. If not, the best way to test your install is by running a script, rather than working interactively from a python shell or an integrated development environment such as `IDLE`{.interpreted-text role="program"} which add additional complexities. Open up a UNIX shell or a DOS command prompt and run, for example: ``` sh python -c "from pylab import *; set_loglevel('DEBUG'); plot(); show()" ``` This will give you additional information about which backends Matplotlib is loading, version information, and more. At this point you might want to make sure you understand Matplotlib\'s `configuration `{.interpreted-text role="ref"} process, governed by the `matplotlibrc`{.interpreted-text role="file"} configuration file which contains instructions within and the concept of the Matplotlib backend. If you are still having trouble, see `reporting-problems`{.interpreted-text role="ref"}. ### How to completely remove Matplotlib {#clean-install} Occasionally, problems with Matplotlib can be solved with a clean installation of the package. In order to fully remove an installed Matplotlib: 1. Delete the caches from your `Matplotlib configuration directory `{.interpreted-text role="ref"}. 2. Delete any Matplotlib directories or eggs from your `installation directory `{.interpreted-text role="ref"}. ### macOS Notes #### Which python for macOS? Apple ships macOS with its own Python, in `/usr/bin/python`, and its own copy of Matplotlib. Unfortunately, the way Apple currently installs its own copies of NumPy, Scipy and Matplotlib means that these packages are difficult to upgrade (see [system python packages](https://github.com/MacPython/wiki/wiki/Which-Python#system-python-and-extra-python-packages)). For that reason we strongly suggest that you install a fresh version of Python and use that as the basis for installing libraries such as NumPy and Matplotlib. One convenient way to install Matplotlib with other useful Python software is to use the [Anaconda](https://www.anaconda.com/) Python scientific software collection, which includes Python itself and a wide range of libraries; if you need a library that is not available from the collection, you can install it yourself using standard methods such as *pip*. See the Anaconda web page for installation support. Other options for a fresh Python install are the standard installer from [python.org](https://www.python.org/downloads/macos/), or installing Python using a general macOS package management system such as [homebrew](https://brew.sh/) or [macports](https://www.macports.org). Power users on macOS will likely want one of homebrew or macports on their system to install open source software packages, but it is perfectly possible to use these systems with another source for your Python binary, such as Anaconda or Python.org Python. #### Installing macOS binary wheels {#install_macos_binaries} If you are using Python from , Homebrew, or Macports, then you can use the standard pip installer to install Matplotlib binaries in the form of wheels. pip is installed by default with python.org and Homebrew Python, but needs to be manually installed on Macports with : ``` sh sudo port install py38-pip ``` Once pip is installed, you can install Matplotlib and all its dependencies with from the Terminal.app command line: ``` sh python3 -m pip install matplotlib ``` You might also want to install IPython or the Jupyter notebook (`python3 -m pip install ipython notebook`). #### Checking your installation The new version of Matplotlib should now be on your Python \"path\". Check this at the Terminal.app command line: ``` sh python3 -c 'import matplotlib; print(matplotlib.__version__, matplotlib.__file__)' ``` You should see something like ``` none 3.10.0 /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/matplotlib/__init__.py ``` where `3.10.0` is the Matplotlib version you just installed, and the path following depends on whether you are using Python.org Python, Homebrew or Macports. If you see another version, or you get an error like ``` none Traceback (most recent call last): File "", line 1, in ImportError: No module named matplotlib ``` then check that the Python binary is the one you expected by running : ``` sh which python3 ``` If you get a result like `/usr/bin/python...`, then you are getting the Python installed with macOS, which is probably not what you want. Try closing and restarting Terminal.app before running the check again. If that doesn\'t fix the problem, depending on which Python you wanted to use, consider reinstalling Python.org Python, or check your homebrew or macports setup. Remember that the disk image installer only works for Python.org Python, and will not get picked up by other Pythons. If all these fail, please `let us know `{.interpreted-text role="ref"}. ::: {#troubleshooting-install} ::: redirect-from /users/installing/troubleshooting_faq ::: ::: ## Troubleshooting ### Obtaining Matplotlib version {#matplotlib-version} To find out your Matplotlib version number, import it and print the `__version__` attribute: \>\>\> import matplotlib \>\>\> matplotlib.\_\_version\_\_ \'0.98.0\' ### `matplotlib`{.interpreted-text role="file"} install location {#locating-matplotlib-install} You can find what directory Matplotlib is installed in by importing it and printing the `__file__` attribute: \>\>\> import matplotlib \>\>\> matplotlib.\_\_file\_\_ \'/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/\_\_init\_\_.pyc\' ### `matplotlib`{.interpreted-text role="file"} configuration and cache directory locations {#locating-matplotlib-config-dir} Each user has a Matplotlib configuration directory which may contain a `matplotlibrc `{.interpreted-text role="ref"} file. To locate your `matplotlib/`{.interpreted-text role="file"} configuration directory, use `matplotlib.get_configdir`{.interpreted-text role="func"}: \>\>\> import matplotlib as mpl \>\>\> mpl.get_configdir() \'/home/darren/.config/matplotlib\' On Unix-like systems, this directory is generally located in your `HOME`{.interpreted-text role="envvar"} directory under the `.config/`{.interpreted-text role="file"} directory. In addition, users have a cache directory. On Unix-like systems, this is separate from the configuration directory by default. To locate your `.cache/`{.interpreted-text role="file"} directory, use `matplotlib.get_cachedir`{.interpreted-text role="func"}: \>\>\> import matplotlib as mpl \>\>\> mpl.get_cachedir() \'/home/darren/.cache/matplotlib\' On Windows, both the config directory and the cache directory are the same and are in your `Documents and Settings`{.interpreted-text role="file"} or `Users`{.interpreted-text role="file"} directory by default: \>\>\> import matplotlib as mpl \>\>\> mpl.get_configdir() \'C:\\Documents and Settings\\jdhunter\\.matplotlib\' \>\>\> mpl.get_cachedir() \'C:\\Documents and Settings\\jdhunter\\.matplotlib\' If you would like to use a different configuration directory, you can do so by specifying the location in your `MPLCONFIGDIR`{.interpreted-text role="envvar"} environment variable \-- see `setting-linux-macos-environment-variables`{.interpreted-text role="ref"}. Note that `MPLCONFIGDIR`{.interpreted-text role="envvar"} sets the location of both the configuration directory and the cache directory. --- ::: {.tab-set .sd-width-content-min} ::: tab-item pip ``` bash pip install matplotlib ``` ::: ::: tab-item conda ``` bash conda install -c conda-forge matplotlib ``` ::: ::: tab-item pixi ``` bash pixi add matplotlib ``` ::: ::: tab-item uv ``` bash uv add matplotlib ``` ::: warning ::: title Warning ::: uv usually installs its own versions of Python from the python-build-standalone project, and only recent versions of those Python builds (August 2025) work properly with the `tkagg` backend for displaying plots in a window. Please make sure you are using uv 0.8.7 or newer (update with e.g. `uv self update`) and that your bundled Python installs are up to date (with `uv python upgrade --reinstall`). Alternatively, you can use one of the other `supported GUI frameworks `{.interpreted-text role="ref"}, e.g. ``` bash uv add matplotlib pyside6 ``` ::: ::: ::: tab-item other `install-official`{.interpreted-text role="ref"} `install-third-party`{.interpreted-text role="ref"} `install-nightly-build`{.interpreted-text role="ref"} `install-source`{.interpreted-text role="ref"} ::: ::: --- ::: {#troubleshooting-install} ::: redirect-from /users/installing/troubleshooting_faq ::: ::: # Troubleshooting ## Obtaining Matplotlib version {#matplotlib-version} To find out your Matplotlib version number, import it and print the `__version__` attribute: \>\>\> import matplotlib \>\>\> matplotlib.\_\_version\_\_ \'0.98.0\' ## `matplotlib`{.interpreted-text role="file"} install location {#locating-matplotlib-install} You can find what directory Matplotlib is installed in by importing it and printing the `__file__` attribute: \>\>\> import matplotlib \>\>\> matplotlib.\_\_file\_\_ \'/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/\_\_init\_\_.pyc\' ## `matplotlib`{.interpreted-text role="file"} configuration and cache directory locations {#locating-matplotlib-config-dir} Each user has a Matplotlib configuration directory which may contain a `matplotlibrc `{.interpreted-text role="ref"} file. To locate your `matplotlib/`{.interpreted-text role="file"} configuration directory, use `matplotlib.get_configdir`{.interpreted-text role="func"}: \>\>\> import matplotlib as mpl \>\>\> mpl.get_configdir() \'/home/darren/.config/matplotlib\' On Unix-like systems, this directory is generally located in your `HOME`{.interpreted-text role="envvar"} directory under the `.config/`{.interpreted-text role="file"} directory. In addition, users have a cache directory. On Unix-like systems, this is separate from the configuration directory by default. To locate your `.cache/`{.interpreted-text role="file"} directory, use `matplotlib.get_cachedir`{.interpreted-text role="func"}: \>\>\> import matplotlib as mpl \>\>\> mpl.get_cachedir() \'/home/darren/.cache/matplotlib\' On Windows, both the config directory and the cache directory are the same and are in your `Documents and Settings`{.interpreted-text role="file"} or `Users`{.interpreted-text role="file"} directory by default: \>\>\> import matplotlib as mpl \>\>\> mpl.get_configdir() \'C:\\Documents and Settings\\jdhunter\\.matplotlib\' \>\>\> mpl.get_cachedir() \'C:\\Documents and Settings\\jdhunter\\.matplotlib\' If you would like to use a different configuration directory, you can do so by specifying the location in your `MPLCONFIGDIR`{.interpreted-text role="envvar"} environment variable \-- see `setting-linux-macos-environment-variables`{.interpreted-text role="ref"}. Note that `MPLCONFIGDIR`{.interpreted-text role="envvar"} sets the location of both the configuration directory and the cache directory. --- ::: redirect-from /citing ::: ::: redirect-from /users/project/citing ::: # Citing Matplotlib {#citing_matplotlib} If Matplotlib contributes to a project that leads to a scientific publication, please acknowledge this fact by citing [J. D. Hunter, \"Matplotlib: A 2D Graphics Environment\", Computing in Science & Engineering, vol. 9, no. 3, pp. 90-95, 2007](https://doi.org/10.1109/MCSE.2007.55). ::: {.literalinclude language="bibtex"} ../../CITATION.bib ::: ::: {.container .sphx-glr-download} `Download BibTeX bibliography file: CITATION.bib <../../CITATION.bib>`{.interpreted-text role="download"} ::: ## DOIs The following DOI represents *all* Matplotlib versions. Please select a more specific DOI from the list below, referring to the version used for your publication. [![image](https://zenodo.org/badge/DOI/10.5281/zenodo.592536.svg)](https://doi.org/10.5281/zenodo.592536) ### By version v3.10.7 : [![image](../_static/zenodo_cache/17298696.svg)](https://doi.org/10.5281/zenodo.17298696) v3.10.6 : [![image](../_static/zenodo_cache/16999430.svg)](https://doi.org/10.5281/zenodo.16999430) v3.10.5 : [![image](../_static/zenodo_cache/16644850.svg)](https://doi.org/10.5281/zenodo.16644850) v3.10.3 : [![image](../_static/zenodo_cache/15375714.svg)](https://doi.org/10.5281/zenodo.15375714) v3.10.1 : [![image](../_static/zenodo_cache/14940554.svg)](https://doi.org/10.5281/zenodo.14940554) v3.10.0 : [![image](../_static/zenodo_cache/14464227.svg)](https://doi.org/10.5281/zenodo.14464227) v3.9.4 : [![image](../_static/zenodo_cache/14436121.svg)](https://doi.org/10.5281/zenodo.14436121) v3.9.3 : [![image](../_static/zenodo_cache/14249941.svg)](https://doi.org/10.5281/zenodo.14249941) v3.9.2 : [![image](../_static/zenodo_cache/13308876.svg)](https://doi.org/10.5281/zenodo.13308876) v3.9.1 : [![image](../_static/zenodo_cache/12652732.svg)](https://doi.org/10.5281/zenodo.12652732) v3.9.0 : [![image](../_static/zenodo_cache/11201097.svg)](https://doi.org/10.5281/zenodo.11201097) v3.8.4 : [![image](../_static/zenodo_cache/10916799.svg)](https://doi.org/10.5281/zenodo.10916799) v3.8.3 : [![image](../_static/zenodo_cache/10661079.svg)](https://doi.org/10.5281/zenodo.10661079) v3.8.2 : [![image](../_static/zenodo_cache/10150955.svg)](https://doi.org/10.5281/zenodo.10150955) v3.8.1 : [![image](../_static/zenodo_cache/10059757.svg)](https://doi.org/10.5281/zenodo.10059757) v3.8.0 : [![image](../_static/zenodo_cache/8347255.svg)](https://doi.org/10.5281/zenodo.8347255) v3.7.3 : [![image](../_static/zenodo_cache/8336761.svg)](https://doi.org/10.5281/zenodo.8336761) v3.7.2 : [![image](../_static/zenodo_cache/8118151.svg)](https://doi.org/10.5281/zenodo.8118151) v3.7.1 : [![image](../_static/zenodo_cache/7697899.svg)](https://doi.org/10.5281/zenodo.7697899) v3.7.0 : [![image](../_static/zenodo_cache/7637593.svg)](https://doi.org/10.5281/zenodo.7637593) v3.6.3 : [![image](../_static/zenodo_cache/7527665.svg)](https://doi.org/10.5281/zenodo.7527665) v3.6.2 : [![image](../_static/zenodo_cache/7275322.svg)](https://doi.org/10.5281/zenodo.7275322) v3.6.1 : [![image](../_static/zenodo_cache/7162185.svg)](https://doi.org/10.5281/zenodo.7162185) v3.6.0 : [![image](../_static/zenodo_cache/7084615.svg)](https://doi.org/10.5281/zenodo.7084615) v3.5.3 : [![image](../_static/zenodo_cache/6982547.svg)](https://doi.org/10.5281/zenodo.6982547) v3.5.2 : [![image](../_static/zenodo_cache/6513224.svg)](https://doi.org/10.5281/zenodo.6513224) v3.5.1 : [![image](../_static/zenodo_cache/5773480.svg)](https://doi.org/10.5281/zenodo.5773480) v3.5.0 : [![image](../_static/zenodo_cache/5706396.svg)](https://doi.org/10.5281/zenodo.5706396) v3.4.3 : [![image](../_static/zenodo_cache/5194481.svg)](https://doi.org/10.5281/zenodo.5194481) v3.4.2 : [![image](../_static/zenodo_cache/4743323.svg)](https://doi.org/10.5281/zenodo.4743323) v3.4.1 : [![image](../_static/zenodo_cache/4649959.svg)](https://doi.org/10.5281/zenodo.4649959) v3.4.0 : [![image](../_static/zenodo_cache/4638398.svg)](https://doi.org/10.5281/zenodo.4638398) v3.3.4 : [![image](../_static/zenodo_cache/4475376.svg)](https://doi.org/10.5281/zenodo.4475376) v3.3.3 : [![image](../_static/zenodo_cache/4268928.svg)](https://doi.org/10.5281/zenodo.4268928) v3.3.2 : [![image](../_static/zenodo_cache/4030140.svg)](https://doi.org/10.5281/zenodo.4030140) v3.3.1 : [![image](../_static/zenodo_cache/3984190.svg)](https://doi.org/10.5281/zenodo.3984190) v3.3.0 : [![image](../_static/zenodo_cache/3948793.svg)](https://doi.org/10.5281/zenodo.3948793) v3.2.2 : [![image](../_static/zenodo_cache/3898017.svg)](https://doi.org/10.5281/zenodo.3898017) v3.2.1 : [![image](../_static/zenodo_cache/3714460.svg)](https://doi.org/10.5281/zenodo.3714460) v3.2.0 : [![image](../_static/zenodo_cache/3695547.svg)](https://doi.org/10.5281/zenodo.3695547) v3.1.3 : [![image](../_static/zenodo_cache/3633844.svg)](https://doi.org/10.5281/zenodo.3633844) v3.1.2 : [![image](../_static/zenodo_cache/3563226.svg)](https://doi.org/10.5281/zenodo.3563226) v3.1.1 : [![image](../_static/zenodo_cache/3264781.svg)](https://doi.org/10.5281/zenodo.3264781) v3.1.0 : [![image](../_static/zenodo_cache/2893252.svg)](https://doi.org/10.5281/zenodo.2893252) v3.0.3 : [![image](../_static/zenodo_cache/2577644.svg)](https://doi.org/10.5281/zenodo.2577644) v3.0.2 : [![image](../_static/zenodo_cache/1482099.svg)](https://doi.org/10.5281/zenodo.1482099) v3.0.1 : [![image](../_static/zenodo_cache/1482098.svg)](https://doi.org/10.5281/zenodo.1482098) v2.2.5 : [![image](../_static/zenodo_cache/3633833.svg)](https://doi.org/10.5281/zenodo.3633833) v3.0.0 : [![image](../_static/zenodo_cache/1420605.svg)](https://doi.org/10.5281/zenodo.1420605) v2.2.4 : [![image](../_static/zenodo_cache/2669103.svg)](https://doi.org/10.5281/zenodo.2669103) v2.2.3 : [![image](../_static/zenodo_cache/1343133.svg)](https://doi.org/10.5281/zenodo.1343133) v2.2.2 : [![image](../_static/zenodo_cache/1202077.svg)](https://doi.org/10.5281/zenodo.1202077) v2.2.1 : [![image](../_static/zenodo_cache/1202050.svg)](https://doi.org/10.5281/zenodo.1202050) v2.2.0 : [![image](../_static/zenodo_cache/1189358.svg)](https://doi.org/10.5281/zenodo.1189358) v2.1.2 : [![image](../_static/zenodo_cache/1154287.svg)](https://doi.org/10.5281/zenodo.1154287) v2.1.1 : [![image](../_static/zenodo_cache/1098480.svg)](https://doi.org/10.5281/zenodo.1098480) v2.1.0 : [![image](../_static/zenodo_cache/1004650.svg)](https://doi.org/10.5281/zenodo.1004650) v2.0.2 : [![image](../_static/zenodo_cache/573577.svg)](https://doi.org/10.5281/zenodo.573577) v2.0.1 : [![image](../_static/zenodo_cache/570311.svg)](https://doi.org/10.5281/zenodo.570311) v2.0.0 : [![image](../_static/zenodo_cache/248351.svg)](https://doi.org/10.5281/zenodo.248351) v1.5.3 : [![image](../_static/zenodo_cache/61948.svg)](https://doi.org/10.5281/zenodo.61948) v1.5.2 : [![image](../_static/zenodo_cache/56926.svg)](https://doi.org/10.5281/zenodo.56926) v1.5.1 : [![image](../_static/zenodo_cache/44579.svg)](https://doi.org/10.5281/zenodo.44579) v1.5.0 : [![image](../_static/zenodo_cache/32914.svg)](https://doi.org/10.5281/zenodo.32914) v1.4.3 : [![image](../_static/zenodo_cache/15423.svg)](https://doi.org/10.5281/zenodo.15423) v1.4.2 : [![image](../_static/zenodo_cache/12400.svg)](https://doi.org/10.5281/zenodo.12400) v1.4.1 : [![image](../_static/zenodo_cache/12287.svg)](https://doi.org/10.5281/zenodo.12287) v1.4.0 : [![image](../_static/zenodo_cache/11451.svg)](https://doi.org/10.5281/zenodo.11451) --- Contributor Covenant Code of Conduct -------------------------------------- Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. # Our Standards Examples of behavior that contributes to a positive environment for our community include: - Demonstrating empathy and kindness toward other people - Being respectful of differing opinions, viewpoints, and experiences - Giving and gracefully accepting constructive feedback - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience - Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: - The use of sexualized language or imagery, and sexual attention or advances of any kind - Trolling, insulting or derogatory comments, and personal or political attacks - Public or private harassment - Publishing others\' private information, such as a physical or email address, without their explicit permission - Other conduct which could reasonably be considered inappropriate in a professional setting # Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. # Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. # Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at which is monitored by the [CoC subcommittee](https://matplotlib.org/governance/people.html#coc-subcommittee) or a report can be made using the [NumFOCUS Code of Conduct report form](https://numfocus.typeform.com/to/ynjGdT). If community leaders cannot come to a resolution about enforcement, reports will be escalated to the NumFocus Code of Conduct committee (). All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. # Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ## 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ## 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ## 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ## 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. # Attribution This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at . Community Impact Guidelines were inspired by [Mozilla\'s code of conduct enforcement ladder](https://github.com/mozilla/diversity). For answers to common questions about this code of conduct, see the FAQ at . Translations are available at . --- ::: redirect-from /users/credits ::: ::: redirect-from /users/project/credits ::: # Credits Matplotlib was written by John D. Hunter, with contributions from an ever-increasing number of users and developers. The current lead developer is Thomas A. Caswell, who is assisted by many [active developers](https://www.openhub.net/p/matplotlib/contributors). Please also see our instructions on `/project/citing`{.interpreted-text role="doc"}. The following is a list of contributors extracted from the git revision control history of the project: 4over7, 816-8055, Aaron Boushley, Aashil Patel, AbdealiJK, Abhinav Sagar, Abhinuv Nitin Pitale, Acanthostega, Adam, Adam Ginsburg, Adam Gomaa, Adam Heck, Adam J. Stewart, Adam Ortiz, Adam Paszke, Adam Ruszkowski, Adam Williamson, Adrian Price-Whelan, Adrien Chardon, Adrien F. Vincent, Ahmet Bakan, Akshay Nair, Alan Bernstein, Alan Du, Alberto, Alejandro Dubrovsky, Aleksey Bilogur, Alex C. Szatmary, Alex Loew, Alex Rothberg, Alex Rudy, AlexCav, Alexander Buchkovsky, Alexander Harnisch, Alexander Rudy, Alexander Taylor, Alexei Colin, Alexis Bienvenüe, Ali Mehdi, Ali Uneri, Alistair Muldal, Allan Haldane, Allen Downey, Alon Hershenhorn, Alvaro Sanchez, Amit Aronovitch, Amy, Amy Roberts, AmyTeegarden, AndersonDaniel, Andras Deak, Andrea Bedini, Andreas Gustafsson, Andreas Hilboll, Andreas Mayer, Andreas Mueller, Andreas Wallner, Andrew Dawson, Andrew Merrill, Andrew Nelson, Andrew Straw, Andy Mastbaum, Andy Zhu, Ankur Dedania, Anthony Scopatz, Anton Akhmerov, Antony Lee, Anubhav Shrimal, Ao Liu (frankliuao), Ardie Orden, Arie, Ariel Hernán Curiale, Arnaud Gardelein, Arpad Horvath, Arthur Paulino, Arvind, Aseem Bansal, Ashley Whetter, Atharva Khare, Avinash Sharma, Ayappan P, BHT, BTWS, Bas van Schaik, Bastian Bechtold, Behram Mistree, Ben, Ben Cohen, Ben Gamari, Ben Keller, Ben Root, Benedikt Daurer, Benjamin Bengfort, Benjamin Berg, Benjamin Congdon, Benjamin Reedlunn, Bernhard M. Wiedemann, Bharat123rox, Bianca Gibson, Binglin Chang, Bingyao Liu, Björn Dahlgren, Blaise Thompson, Boaz Mohar, Bradley M. Froehle, Brandon Liu, Brendan Zhang, Brennan Magee, Brett Cannon, Brett Graham, Brian Mattern, Brian McLaughlin, Brigitta Sipocz, Bruno Beltran, Bruno Pagani, Bruno Zohreh, CJ Carey, Cameron Bates, Cameron Davidson-Pilon, Cameron Fackler, Carissa Brittain, Carl Michal, Carsten Schelp, Carwyn Pelley, Casey Webster, Casper van der Wel, Charles Moad, Charles Ruan, Chen Karako, Cho Yin Yong, Chris, Chris Barnes, Chris Beaumont, Chris G, Chris Holdgraf, Chris Zimmerman, Christer Jensen, Christian Brodbeck, Christian Brueffer, Christian Stade-Schuldt, Christoph Dann, Christoph Deil, Christoph Gohlke, Christoph Hoffmann, Christoph Pohl, Christoph Reiter, Christopher Bradshaw, Cimarron Mittelsteadt, Clemens Brunner, Cody Scot, Colin, Colin Carroll, Cong Ma, Conner R. Phillips, Corey Farwell, Craig Citro, Craig M, Craig Tenney, DaCoEx, Dakota Blair, Damian, Damon McDougall, Dan Hickstein, Dana, Daniel C. Marcu, Daniel Hyams, Daniel Laidig, Daniel O\'Connor, DanielMatu, Daniele Nicolodi, Danny Hermes, Dara Adib, Darren Dale, DaveL17, David A, David Anderson, David Chudzicki, David Haberthür, David Huard, David Kaplan, David Kent, David Kua, David Stansby, David Trémouilles, Dean Malmgren, Deng Tian, Derek Kim, Derek Tropf, Devashish Deshpande, Diego Mora Cespedes, Dietmar Schwertberger, Dietrich Brunn, Divyam Madaan, Dmitry Lupyan, Dmitry Mottl, Dmitry Shachnev, Dominik Schmidt, DonaldSeo, Dora Fraeman Caswell, DoriekeMG, Dorota Jarecka, Doug Blank, Drew J. Sonne, Duncan Macleod, Dylan Evans, E. G. Patrick Bos, Edin Salkovic, Edoardo Pizzigoni, Egor Panfilov, Elan Ernest, Elena Glassman, Elias Pipping, Elijah Schutz, Elizabeth Seiver, Elliott Sales de Andrade, Elvis Stansvik, Emil Mikulic, Emlyn Price, Eric Dill, Eric Firing, Eric Larson, Eric Ma, Eric O. LEBIGOT (EOL), Eric Relson, Eric Wieser, Erik Bray, Erik M. Bray, Erin Pintozzi, Eugen Beck, Eugene Yurtsev, Evan Davey, Ezra Peisach, Fabian Kloosterman, Fabian-Robert Stöter, Fabien Maussion, Fabio Zanini, FedeMiorelli, Federico Ariza, Felipe, Felix, Felix Kohlgrüber, Felix Yan, Fernando Perez, Filip Dimitrovski, Filipe Fernandes, Florencia Noriega, Florian Le Bourdais, Florian Rhiem, Francesco Montesano, Francis Colas, Franco Vaccari, Francoise Provencher, Frank Sauerburger, Frank Yu, François Magimel, Gabe, Gabriel Munteanu, Gal Avineri, Galen Lynch, Gauravjeet, Gaute Hope, Gazing, Gellule Xg, Geoffrey Spear, Geoffroy Billotey, Georg Raiser, Gerald Storer, Gina, Giovanni, Graeme Smecher, Graham Poulter, Greg Lucas, Gregory Ashton, Gregory R. Lee, Grillard, Grégory Lielens, Guillaume Gay, Guillermo Breto, Gustavo Braganca, Gustavo Goretkin, HHest, Hajoon Choi, Hakan Kucukdereli, Hanno Rein, Hans Dembinski, Hans Meine, Hans Moritz Günther, Harnesser, Harshal Prakash Patankar, Harshit Patni, Hassan Kibirige, Hastings Greer, Heath Henley, Heiko Oberdiek, Helder, Henning Pohl, Herbert Kruitbosch, Holger Peters, Hubert Holin, Hugo van Kemenade, Ian Hincks, Ian Thomas, Ida Hjorth, Ignas Anikevicius (gns_ank), Ildar Akhmetgaleev, Ilia Kurenkov, Ilya Flyamer, ImSoErgodic, ImportanceOfBeingErnest, Inception95, Ingo Fründ, Ioannis Filippidis, Isa Hassen, Isaac Schwabacher, Isaac Slavitt, Ismo Toijala, J Alammar, J. Goutin, Jaap Versteegh, Jack Kelly, Jacob McDonald, Jacobson Okoro, Jae-Joon Lee, Jaime Fernandez, Jake Lee, Jake Vanderplas, James A. Bednar, James Adams, James Pallister, James R. Evans, JamesMakela, Jamie Nunez, Jan S. (Milania1), Jan Schlüter, Jan Schulz, Jan-Philip Gehrcke, Jan-willem De Bleser, Jarrod Millman, Jascha Ulrich, Jason Grout, Jason King, Jason Liw Yan Chong, Jason Miller, Jason Neal, Jason Zheng, Javad, JayP16, Jean-Benoist Leger, Jeff Lutgen, Jeff Whitaker, Jeffrey Bingham, Jeffrey Hokanson @ Loki, JelsB, Jens Hedegaard Nielsen, Jeremy Fix, Jeremy O\'Donoghue, Jeremy Thurgood, Jeroonk, Jessica B. Hamrick, Jiahao Chen, Jim Radford, Jochen Voss, Jody Klymak, Joe Kington, Joel B. Mohler, Joel Frederico, Joel Wanner, Johannes H. Jensen, Johannes Wienke, John Hoffman, John Hunter, John Vandenberg, Johnny Gill, JojoBoulix, Jon Haitz Legarreta Gorroño, Jonas Camillus Jeppesen, Jonathan Waltman, Jorge Moraleda, Jorrit Wronski, Joscha Reimer, Josef Heinen, Joseph Albert, Joseph Fox-Rabinovitz, Joseph Jon Booker, Joseph Martinot-Lagarde, Joshua Taillon, José Ricardo, Jouni K. Seppänen, Joy Bhalla, Juan Nunez-Iglesias, Juanjo Bazán, Julia Sprenger, Julian Mehne, Julian Taylor, Julian V. Modesto, JulianCienfuegos, Julien Lhermitte, Julien Schueller, Julien Woillez, Julien-Charles Lévesque, Jun Tan, Justin Cai, Jörg Dietrich, Kacper Kowalik (Xarthisius), Kai Muehlbauer, Kanchana Ranasinghe, Kanwar245, Katrin Leinweber, Katy Huff, Kayla Ngan, Keerysanth Sribaskaran, Ken McIvor, Kenneth Ma, Kevin Chan, Kevin Davies, Kevin Ji, Kevin Keating, Kevin Mader, Kevin Rose, Kexuan Sun, Kieran Ramos, Kimmo Palin, Kjartan Myrdal, Kjell Le, Klara Gerlei, Konrad Förstner, Konstantin Tretyakov, Kristen M. Thyng, Kyle Bridgemohansingh, Kyle Sunden, Kyler Brown, Lance Hepler, Laptop11_ASPP2016, Larry Bradley, Laurent Thomas, Lawrence D\'Anna, Leeonadoh, Lennart Fricke, Leo Singer, Leon Loopik, Leon Yin, LevN0, Levi Kilcher, Liam Brannigan, Lion Krischer, Lionel Miller, Lodato Luciano, Lori J, Loïc Estève, Loïc Séguin-C, Luca Verginer, Luis Pedro Coelho, Luke Davis, Maarten Baert, Maciej Dems, Magnus Nord, Maik Riechert, Majid alDosari, Maksym P, Manan, Manan Kevadiya, Manish Devgan, Manuel GOACOLOU, Manuel Jung, Manuel Metz, Manuel Nuno Melo, Maoz Gelbart, Marat K, Marc Abramowitz, Marcel Martin, Marco Gorelli, MarcoGorelli, Marcos Duarte, Marek Rudnicki, Marianne Corvellec, Marin Gilles, Mark Harfouche, Mark Wolf, Marko Baštovanović, Markus Roth, Markus Rothe, Martin Dengler, Martin Fitzpatrick, Martin Spacek, Martin Teichmann, Martin Thoma, Martin Ueding, Massimo Santini, Masud Rahman, Mathieu Duponchelle, Matt Giuca, Matt Hancock, Matt Klein, Matt Li, Matt Newville, Matt Shen, Matt Terry, Matthew Bell, Matthew Brett, Matthew Emmett, Matthias Bussonnier, Matthias Geier, Matthias Lüthi, Matthieu Caneill, MatthieuDartiailh, Matti Picus, Matěj Týč, Max Chen, Max Humber, Max Shinn, Maximilian Albert, Maximilian Maahn, Maximilian Nöthe, Maximilian Trescher, MeeseeksMachine, Mellissa Cross, Mher Kazandjian, Michael, Michael Droettboom, Michael Jancsy, Michael Sarahan, Michael Scott Cuthbert, Michael Seifert, Michael Welter, Michaël Defferrard, Michele Mastropietro, Michiel de Hoon, Michka Popoff, Mike Henninger, Mike Jarvis, Mike Kaufman, Mikhail Korobov, MinRK, Mingkai Dong, Minty Zhang, MirandaXM, Miriam Sierig, Mitar, Molly Rossow, Moritz Boehle, Mudit Surana, Muhammad Mehdi, MuhammadFarooq1234, Mykola Dvornik, Naoya Kanai, Nathan Goldbaum, Nathan Musoke, Nathaniel M. Beaver, Neil, Neil Crighton, Nelle Varoquaux, Niall Robinson, Nic Eggert, Nicholas Devenish, Nick Forrington, Nick Garvey, Nick Papior, Nick Pope, Nick Semenkovich, Nico Schlömer, Nicolas Courtemanche, Nicolas P. Rougier, Nicolas Pinto, Nicolas Tessore, Nik Quibin, Nikita Kniazev, Niklas Koep, Nikolay Vyahhi, Nils Werner, Ninad Bhat, Norbert Nemec, Norman Fomferra, O. Castany, OceanWolf, Oleg Selivanov, Olga Botvinnik, Oliver Natt, Oliver Willekens, Olivier, Om Sitapara, Omar Chehab, Oriol Abril, Orso Meneghini, Osarumwense, Pankaj Pandey, Paramonov Andrey, Parfenov Sergey, Pascal Bugnion, Pastafarianist, Patrick Chen, Patrick Feiring, Patrick Marsh, Patrick Shriwise, PatrickFeiring, Paul, Paul Barret, Paul Ganssle, Paul Gierz, Paul Hobson, Paul Hoffman, Paul Ivanov, Paul J. Koprowski, Paul Kirow, Paul Romano, Paul Seyfert, Pauli Virtanen, Pavel Fedin, Pavol Juhas, Per Parker, Perry Greenfield, Pete Bachant, Pete Huang, Pete Peterson, Peter Iannucci, Peter Mackenzie-Helnwein, Peter Mortensen, Peter Schutt, Peter St. John, Peter Würtz, Petr Danecek, Phil Elson, Phil Ruffwind, Philippe Pinard, Pierre Haessig, Pierre Thibault, Pierre de Buyl, Pim Schellart, Piti Ongmongkolkul, Po, Pranav Garg, Przemysław Dąbek, Puneeth Chaganti, QiCuiHub, Qingpeng \"Q.P.\" Zhang, RAKOTOARISON Herilalaina, Ram Rachum, Ramiro Gómez, Randy Olson, Raphael, Rasmus Diederichsen, Ratin_Kumar, Rebecca W Perry, Reinier Heeres, Remi Rampin, Ricardo Mendes, Riccardo Di Maio, Richard Gowers, Richard Hattersley, Richard Ji-Cathriner, Richard Trieu, Ricky, Rishikesh, Rob Harrigan, Robert Johansson, Robin Dunn, Robin Neatherway, Robin Wilson, Rohan Walker, Roland Wirth, Roman Yurchak, Ronald Hartley-Davies, RoryIAngus, Roy Smith, Rui Lopes, Russell Owen, RutgerK, Ryan, Ryan Blomberg, Ryan D\'Souza, Ryan Dale, Ryan May, Ryan Morshead, Ryan Nelson, RyanPan, SBCV, Sairam Pillai, Saket Choudhary, Salganos, Salil Vanvari, Salinder Sidhu, Sam Vaughan, SamSchott, Sameer D\'Costa, Samesh Lakhotia, Samson, Samuel St-Jean, Sander, Sandro Tosi, Scott Howard, Scott Lasley, Scott Lawrence, Scott Stevenson, Sean Farley, Sebastian Bullinger, Sebastian Pinnau, Sebastian Raschka, Sebastián Vanrell, Seraphim Alvanides, Sergey B Kirpichev, Sergey Kholodilov, Sergey Koposov, Seunghoon Park, Siddhesh Poyarekar, Sidharth Bansal, Silviu Tantos, Simon Cross, Simon Gibbons, Simon Legner, Skelpdar, Skipper Seabold, Slav Basharov, Snowhite, SojiroFukuda, Sourav Singh, Spencer McIntyre, Stanley, Simon, Stefan Lehmann, Stefan Mitic, Stefan Pfenninger, Stefan van der Walt, Stefano Rivera, Stephan Erb, Stephane Raynaud, Stephen Horst, Stephen-Chilcote, Sterling Smith, Steve Chaplin, Steve Dower, Steven G. Johnson, Steven Munn, Steven Silvester, Steven Tilley, Stuart Mumford, Tadeo Corradi, Taehoon Lee, Takafumi Arakaki, Takeshi Kanmae, Tamas Gal, Tanuj, Taras Kuzyo, Ted Drain, Ted Petrou, Terence Honles, Terrence J. Katzenbaer, Terrence Katzenbaer, The Gitter Badger, Thein Oo, Thomas A Caswell, Thomas Hisch, Thomas Kluyver, Thomas Lake, Thomas Levine, Thomas Mansencal, Thomas Robitaille, Thomas Spura, Thomas VINCENT, Thorsten Liebig, Tian Xia, Till Hoffmann, Till Stensitzki, Tim Hoffmann, Timo Vanwynsberghe, Tobia De Koninck, Tobias Froehlich, Tobias Hoppe, Tobias Megies, Todd Jennings, Todd Miller, Tom, Tom Augspurger, Tom Dupré la Tour, Tom Flannaghan, Tomas Kazmar, Tony S Yu, Tor Colvin, Travis Oliphant, Trevor Bekolay, Trish Gillett-Kawamoto, Truong Pham, Tuan Dung Tran, Tyler Makaro, Tyrone Xiong, Ulrich Dobramysl, Umair Idris, V. Armando Solé, V. R, Vadim Markovtsev, Valentin Haenel, Valentin Schmidt, Vedant Nanda, Venkada, Vidur Satija, Viktor Kerkez, Vincent L.M. Mazoyer, Viraj Mohile, Vitaly Buka, Vlad Seghete, Víctor Terrón, Víctor Zabalza, WANG Aiyong, Warren Weckesser, Wen Li, Wendell Smith, Werner F Bruhin, Wes Campaigne, Wieland Hoffmann, Will Handley, Will Silva, William Granados, William Mallard, William Manley, Wouter Overmeire, Xiaowen Tang, Xufeng Wang, Yann Tambouret, Yao-Yuan Mao, Yaron de Leeuw, Yu Feng, Yue Zhihan, Yunfei Yang, Yuri D\'Elia, Yuval Langer, Yuxin Wu, Yuya, Zac Hatfield-Dodds, Zach Pincus, Zair Mubashar, Zbigniew Jędrzejewski-Szmek, Zhili (Jerry) Pan, Zulko, ahed87, akrherz, alcinos, alex, alvarosg, andrzejnovak, aneda, anykraus, aparamon, apodemus, arokem, as691454, aseagram, ash13, aszilagyi, azure-pipelines\[bot\], bblay, bduick, bev-a-tron, blackw1ng, blah blah, brut, btang02, buefox, burrbull, butterw, cammil, captainwhippet, cclauss, ch3rn0v, chadawagner, chaoyi1, chebee7i, chelseatroy, chuanzhu xu, cknd, cldssty, clintval, dabana, dahlbaek, danielballan, daronjp, davidovitch, daydreamt, deeenes, deepyaman, djdt, dlmccaffrey, domspad, donald, donchanee, drevicko, e-q, elpres, endolith, esvhd, et2010, fardal, ffteja, fgb, fibersnet, fourpoints, fredrik-1, frenchwr, fuzzythecat, fvgoto, gcallah, gitj, gluap, gnaggnoyil, goir, goldstarwebs, greg-roper, gregorybchris, gwin-zegal, hannah, helmiriawan, henryhu123, hugadams, ilivni, insertroar, itziakos, jacob-on-github, jb-leger, jbbrokaw, jbhopkins, jdollichon, jerrylui803, jess, jfbu, jhelie, jli, joaonsg, joelostblom, jonchar, juan.gonzalez, kcrisman, keithbriggs, kelsiegr, khyox, kikocorreoso, klaus, klonuo, kolibril13, kramer65, krishna katyal, ksafran, kshramt, lboogaard, legitz7, lepuchi, lichri12, limtaesu, lspvic, luftek, luz.paz, lzkelley, mamrehn, marky, masamson, mbyt, mcelrath, mcquin, mdipierro, mikhailov, miquelastein, mitch, mlub, mobando, mromanie, muahah, myyc, nathan78906, navdeep rana, nbrunett, nemanja, neok-m4700, nepix32, nickystringer, njwhite, nmartensen, nwin, ob, pdubcali, pibion, pkienzle, productivememberofsociety666, profholzer, pupssman, rahiel, ranjanm, rebot, rhoef, rsnape, ruin, rvhbooth, s0vereign, s9w, saksmito, scls19fr, scott-vsi, sdementen, serv-inc, settheory, sfroid, shaunwbell, simon-kraeusel, simonpf, sindunuragarp, smheidrich, sohero, spiessbuerger, stahlous, stone, stonebig, switham, sxntxn, syngron, teresy, thoo, thuvejan, tmdavison, tomoemon, tonyyli, torfbolt, u55, ugurthemaster, ultra-andy, vab9, vbr, vishalBindal, vraelvrangr, watkinrt, woclass, xbtsw, xuanyuansen, y1thof, yeo, zhangeugenia, zhoubecky, Élie Gouzien, Андрей Парамонов Some earlier contributors not included above are (with apologies to any we have missed): Charles Twardy, Gary Ruben, John Gill, David Moore, Paul Barrett, Jared Wahlstrand, Jim Benson, Paul Mcguire, Andrew Dalke, Nadia Dencheva, Baptiste Carvello, Sigve Tjoraand, Ted Drain, James Amundson, Daishi Harada, Nicolas Young, Paul Kienzle, John Porter, and Jonathon Taylor. Thanks to Tony Yu for the original logo design. We also thank all who have reported bugs, commented on proposed changes, or otherwise contributed to Matplotlib\'s development and usefulness. --- ::: redirect-from /users/history ::: ::: redirect-from /users/project/history ::: # History {#project_history} ::: note ::: title Note ::: The following introductory text was written in 2008 by John D. Hunter (1968-2012), the original author of Matplotlib. ::: Matplotlib is a library for making 2D plots of arrays in [Python](https://www.python.org). Although it has its origins in emulating the MATLAB graphics commands, it is independent of MATLAB, and can be used in a Pythonic, object-oriented way. Although Matplotlib is written primarily in pure Python, it makes heavy use of [NumPy](https://numpy.org) and other extension code to provide good performance even for large arrays. Matplotlib is designed with the philosophy that you should be able to create simple plots with just a few commands, or just one! If you want to see a histogram of your data, you shouldn\'t need to instantiate objects, call methods, set properties, and so on; it should just work. For years, I used to use MATLAB exclusively for data analysis and visualization. MATLAB excels at making nice looking plots easy. When I began working with EEG data, I found that I needed to write applications to interact with my data, and developed an EEG analysis application in MATLAB. As the application grew in complexity, interacting with databases, http servers, manipulating complex data structures, I began to strain against the limitations of MATLAB as a programming language, and decided to start over in Python. Python more than makes up for all of MATLAB\'s deficiencies as a programming language, but I was having difficulty finding a 2D plotting package (for 3D [VTK](http://www.vtk.org/) more than exceeds all of my needs). When I went searching for a Python plotting package, I had several requirements: - Plots should look great - publication quality. One important requirement for me is that the text looks good (antialiased, etc.) - Postscript output for inclusion with TeX documents - Embeddable in a graphical user interface for application development - Code should be easy enough that I can understand it and extend it - Making plots should be easy Finding no package that suited me just right, I did what any self-respecting Python programmer would do: rolled up my sleeves and dived in. Not having any real experience with computer graphics, I decided to emulate MATLAB\'s plotting capabilities because that is something MATLAB does very well. This had the added advantage that many people have a lot of MATLAB experience, and thus they can quickly get up to steam plotting in python. From a developer\'s perspective, having a fixed user interface (the pylab interface) has been very useful, because the guts of the code base can be redesigned without affecting user code. The Matplotlib code is conceptually divided into three parts: the *pylab interface* is the set of functions provided by `pylab`{.interpreted-text role="mod"} which allow the user to create plots with code quite similar to MATLAB figure generating code (`pyplot_tutorial`{.interpreted-text role="ref"}). The *Matplotlib frontend* or *Matplotlib API* is the set of classes that do the heavy lifting, creating and managing figures, text, lines, plots and so on (`artists_tutorial`{.interpreted-text role="ref"}). This is an abstract interface that knows nothing about output. The *backends* are device-dependent drawing devices, aka renderers, that transform the frontend representation to hardcopy or a display device (`what-is-a-backend`{.interpreted-text role="ref"}). Example backends: PS creates [PostScript®](https://www.adobe.com/products/postscript.html) hardcopy, SVG creates [Scalable Vector Graphics](https://www.w3.org/Graphics/SVG/) hardcopy, Agg creates PNG output using the high quality [Anti-Grain Geometry](http://agg.sourceforge.net/antigrain.com/) library that ships with Matplotlib, GTK embeds Matplotlib in a [Gtk+](https://www.gtk.org/) application, GTKAgg uses the Anti-Grain renderer to create a figure and embed it in a Gtk+ application, and so on for [PDF](https://acrobat.adobe.com/us/en/acrobat/about-adobe-pdf.html), [WxWidgets](https://www.wxpython.org/), [Tkinter](https://docs.python.org/3/library/tkinter.html), etc. Matplotlib is used by many people in many different contexts. Some people want to automatically generate PostScript files to send to a printer or publishers. Others deploy Matplotlib on a web application server to generate PNG output for inclusion in dynamically-generated web pages. Some use Matplotlib interactively from the Python shell in Tkinter on Windows. My primary use is to embed Matplotlib in a Gtk+ EEG application that runs on Windows, Linux and Macintosh OS X. ------------------------------------------------------------------------ Matplotlib\'s original logo (2003 \-- 2008). ::: plot from matplotlib import cbook, pyplot as plt, style import numpy as np style.use(\"classic\") datafile = cbook.get_sample_data(\'membrane.dat\', asfileobj=False) \# convert data to mV x = 1000 \* 0.1 \* np.fromstring(open(datafile, \'rb\').read(), np.float32) \# 0.0005 is the sample interval t = 0.0005 \* np.arange(len(x)) plt.figure(1, figsize=(7, 1), dpi=100) ax = plt.subplot(111, facecolor=\'y\') plt.plot(t, x) plt.text(0.5, 0.5, \'matplotlib\', color=\'r\', fontsize=40, fontname=\[\'Courier\', \'DejaVu Sans Mono\'\], horizontalalignment=\'center\', verticalalignment=\'center\', transform=ax.transAxes, ) plt.axis(\[1, 1.72, -60, 10\]) plt.gca().set_xticklabels(\[\]) plt.gca().set_yticklabels(\[\]) ::: Matplotlib logo (2008 - 2015). ::: plot import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cm as cm mpl.rcParams\[\'xtick.labelsize\'\] = 10 mpl.rcParams\[\'ytick.labelsize\'\] = 12 mpl.rcParams\[\'axes.edgecolor\'\] = \'gray\' axalpha = 0.05 figcolor = \'white\' dpi = 80 fig = plt.figure(figsize=(6, 1.1), dpi=dpi) fig.patch.set_edgecolor(figcolor) fig.patch.set_facecolor(figcolor) def add_math_background(): : ax = fig.add_axes((0., 0., 1., 1.)) text = \[\] text.append( (r\"\$W\^{3beta}\_{delta_1 rho_1 sigma_2} = \" r\"U\^{3beta}\_{delta_1 rho_1} + frac{1}{8 pi 2}\" r\"int\^{alpha_2}\_{alpha_2} d alpha\^prime_2 \" r\"left\[frac{ U\^{2beta}\_{delta_1 rho_1} - \" r\"alpha\^prime_2U\^{1beta}\_{rho_1 sigma_2} \" r\"}{U\^{0beta}\_{rho_1 sigma_2}}right\]\$\", (0.7, 0.2), 20)) text.append((r\"\$frac{drho}{d t} + rho vec{v}cdotnablavec{v} \" r\"= -nabla p + munabla\^2 vec{v} + rho vec{g}\$\", (0.35, 0.9), 20)) text.append((r\"\$i[nt](){-infty}\^infty e\^{-x\^2}dx=sqrt{pi}\$\", (0.15, 0.3), 25)) text.append((r\"\$F_G = Gfrac{m_1m_2}{r\^2}\$\", (0.85, 0.7), 30)) for eq, (x, y), size in text: ax.text(x, y, eq, ha=\'center\', va=\'center\', color=\"#11557c\", alpha=0.25, transform=ax.transAxes, fontsize=size) ax.set_axis_off() return ax def add_matplotlib_text(ax): : ax.text(0.95, 0.5, \'matplotlib\', color=\'#11557c\', fontsize=65, : ha=\'right\', va=\'center\', alpha=1.0, transform=ax.transAxes) def add_polar_bar(): : ax = fig.add_axes((0.025, 0.075, 0.2, 0.85), projection=\'polar\') ax.patch.set_alpha(axalpha) ax.set_axisbelow(True) N = 7 arc = 2. \* np.pi theta = np.arange(0.0, arc, arc/N) radii = 10 \* np.array(\[0.2, 0.6, 0.8, 0.7, 0.4, 0.5, 0.8\]) width = np.pi / 4 \* np.array(\[0.4, 0.4, 0.6, 0.8, 0.2, 0.5, 0.3\]) bars = ax.bar(theta, radii, width=width, bottom=0.0) for r, bar in zip(radii, bars): bar.set_facecolor(cm.jet(r/10.)) bar.set_alpha(0.6) ax.tick_params(labelbottom=False, labeltop=False, : labelleft=False, labelright=False) ax.grid(lw=0.8, alpha=0.9, ls=\'-\', color=\'0.5\') ax.set_yticks(np.arange(1, 9, 2)) ax.set_rmax(9) main_axes = add_math_background() add_polar_bar() add_matplotlib_text(main_axes) ::: --- ::: redirect-from /users/backmatter ::: ::: redirect-from /users/project/index ::: # Project information ::: {.toctree maxdepth="2"} mission.rst history.rst Code of Conduct \ citing.rst license.rst credits.rst ::: --- ::: {#license} ::: redirect-from /users/license ::: ::: ::: redirect-from /users/project/license ::: # License Matplotlib only uses BSD compatible code, and its license is based on the [PSF](https://docs.python.org/3/license.html) license. See the Open Source Initiative [licenses page](https://opensource.org/licenses) for details on individual licenses. Non-BSD compatible licenses (e.g., LGPL) are acceptable in matplotlib toolkits. For a discussion of the motivations behind the licencing choice, see `license-discussion`{.interpreted-text role="ref"}. ## Copyright policy John Hunter began Matplotlib around 2003. Since shortly before his passing in 2012, Michael Droettboom has been the lead maintainer of Matplotlib, but, as has always been the case, Matplotlib is the work of many. Prior to July of 2013, and the 1.3.0 release, the copyright of the source code was held by John Hunter. As of July 2013, and the 1.3.0 release, matplotlib has moved to a shared copyright model. Matplotlib uses a shared copyright model. Each contributor maintains copyright over their contributions to Matplotlib. But, it is important to note that these contributions are typically only changes to the repositories. Thus, the Matplotlib source code, in its entirety, is not the copyright of any single person or institution. Instead, it is the collective copyright of the entire Matplotlib Development Team. If individual contributors want to maintain a record of what changes/contributions they have specific copyright on, they should indicate their copyright in the commit message of the change, when they commit the change to one of the matplotlib repositories. The Matplotlib Development Team is the set of all contributors to the matplotlib project. A full list can be obtained from the git version control logs. ## License agreement ::: {.dropdown open="" class-container="sdd"} License agreement for Matplotlib versions 1.3.0 and later ::: {.literalinclude language="none"} ../../LICENSE/LICENSE ::: ::: ## Bundled software ::: {.dropdown class-container="sdd"} JSX Tools Resize Observer ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_JSXTOOLS_RESIZE_OBSERVER ::: ::: ::: {.dropdown class-container="sdd"} QT4 Editor ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_QT4_EDITOR ::: ::: ### Colormaps and themes {#licenses-cmaps-styles} ::: {.dropdown class-container="sdd"} ColorBrewer ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_COLORBREWER ::: ::: ::: {.dropdown class-container="sdd"} Solarized ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_SOLARIZED ::: ::: ::: {.dropdown class-container="sdd"} Yorick ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_YORICK ::: ::: ### Fonts {#licenses-fonts} ::: {.dropdown class-container="sdd"} American Mathematical Society (AMS) fonts ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_AMSFONTS ::: ::: ::: {.dropdown class-container="sdd"} BaKoMa ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_BAKOMA ::: ::: ::: {.dropdown class-container="sdd"} Carlogo ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_CARLOGO ::: ::: ::: {.dropdown class-container="sdd"} Courier 10 ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_COURIERTEN ::: ::: ::: {.dropdown class-container="sdd"} Last Resort ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_LAST_RESORT_FONT ::: ::: ::: {.dropdown class-container="sdd"} STIX ::: {.literalinclude language="none"} ../../LICENSE/LICENSE_STIX ::: ::: --- # Mission Statement The Matplotlib developer community develops, maintains, and supports Matplotlib and its extensions to provide data visualization tools for the Scientific Python Ecosystem. Adapting the requirements `laid out by John Hunter `{.interpreted-text role="ref"} Matplotlib should: - Support users of the Scientific Python ecosystem; - Facilitate interactive data exploration; - Produce high-quality raster and vector format outputs suitable for publication; - Provide a simple graphical user interface and support embedding in applications; - Be understandable and extensible by people familiar with data processing in Python; - Make common plots easy, and novel or complex visualizations possible. We believe that a diverse developer community creates the best software, and we welcome anyone who shares our mission, and our values described in the [code of conduct](https://github.com/matplotlib/matplotlib/blob/main/CODE_OF_CONDUCT.md). --- ::: redirect-from /users/github_stats ::: # GitHub statistics for 3.10.7 (Oct 08, 2025) {#github-stats} GitHub statistics for 2024/12/14 (tag: v3.10.0) - 2025/10/08 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 4 issues and merged 16 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/105?closed=1) The following 32 authors contributed 422 commits. - Aasma Gupta - AASMA GUPTA - Antony Lee - Christine P. Chai - David Stansby - dependabot\[bot\] - Elliott Sales de Andrade - G.D. McBain - Greg Lucas - hannah - hu-xiaonan - Ian Thomas - Inês Cachola - Jody Klymak - Jouni K. Seppänen - Khushi_29 - Kyle Sunden - Lumberbot (aka Jack) - N R Navaneet - Nathan G. Wiseman - Oscar Gustafsson - Praful Gulani - Qian Zhang - Raphael Erik Hviding - Roman - Ruth Comer - saikarna913 - Scott Shambaugh - Thomas A Caswell - Tim Heap - Tim Hoffmann - Trygve Magnus Ræder GitHub issues and pull requests: Pull Requests (16): - `30628`{.interpreted-text role="ghpull"}: Backport PR #30626 on branch v3.10.x (MNT: Fix new F401 unused imports warnings) - `30626`{.interpreted-text role="ghpull"}: MNT: Fix new F401 unused imports warnings - `30589`{.interpreted-text role="ghpull"}: Backport PR #29745: Use PEP8 style method and function names from - `30614`{.interpreted-text role="ghpull"}: Backport PR #30612 on branch v3.10.x (MNT: update black pin) - `30612`{.interpreted-text role="ghpull"}: MNT: update black pin - `30572`{.interpreted-text role="ghpull"}: Backport PR #30571 on branch v3.10.x (CI: remove macos13) - `30571`{.interpreted-text role="ghpull"}: CI: remove macos13 - `30570`{.interpreted-text role="ghpull"}: Backport PR #30558 on branch v3.10.x (Fix stubtest with mypy 18) - `30558`{.interpreted-text role="ghpull"}: Fix stubtest with mypy 18 - `30540`{.interpreted-text role="ghpull"}: Backport PR #30539 on branch v3.10.x (Fix scale_unit/scale_units typo in quiver docs) - `30539`{.interpreted-text role="ghpull"}: Fix scale_unit/scale_units typo in quiver docs - `30518`{.interpreted-text role="ghpull"}: Backport PR #30497 on branch v3.10.x (TST: Use a temporary directory for test_save_figure_return) - `30497`{.interpreted-text role="ghpull"}: TST: Use a temporary directory for test_save_figure_return - `30506`{.interpreted-text role="ghpull"}: Backport PR #30490 on branch v3.10.x (Fix SVG rendering error in def update_background) - `30490`{.interpreted-text role="ghpull"}: Fix SVG rendering error in def update_background - `30494`{.interpreted-text role="ghpull"}: Backport PR #30492 on branch v3.10.x (DOC: pytz link should be from PyPI) Issues (4): - `30611`{.interpreted-text role="ghissue"}: \[MNT\]: black version - `30551`{.interpreted-text role="ghissue"}: \[Bug\]: Mypy stubtest failure on disjoint_base - `30493`{.interpreted-text role="ghissue"}: \[Bug\]: test_save_figure_return seems flaky - `30485`{.interpreted-text role="ghissue"}: \[Bug\]: figures with SpanSelector(\..., useblit=True) can\'t be saved to SVG or PDF ## Previous GitHub statistics ::: {.toctree maxdepth="1" glob="" reversed=""} prev_whats_new/[github_stats]()\* ::: --- # 3D performance improvements Draw time for 3D plots has been improved, especially for surface and wireframe plots. Users should see up to a 10x speedup in some cases. This should make interacting with 3D plots much more responsive. --- # Standard getters/setters for axis inversion state Whether an axis is inverted can now be queried and set using the [.axes.Axes]{.title-ref} getters [\~.Axes.get_xinverted]{.title-ref}/[\~.Axes.get_yinverted]{.title-ref} and setters [\~.Axes.set_xinverted]{.title-ref}/[\~.Axes.set_yinverted]{.title-ref}. The previously existing methods ([.Axes.xaxis_inverted]{.title-ref}, [.Axes.invert_xaxis]{.title-ref}) are now discouraged (but not deprecated) due to their non-standard naming and behavior. --- # `bar_label` supports individual padding per label `bar_label` will now accept both a float value or an array-like for padding. The array-like defines the padding for each label individually. --- # `BarContainer` properties [.BarContainer]{.title-ref} gained new properties to easily access coordinates of the bars: - [\~.BarContainer.bottoms]{.title-ref} - [\~.BarContainer.tops]{.title-ref} - [\~.BarContainer.position_centers]{.title-ref} --- # `broken_barh()` vertical alignment though `align` parameter [\~.Axes.broken_barh]{.title-ref} now supports vertical alignment of the bars through the `align` parameter. --- # Setting the default color cycle to a named color sequence The default color cycle may now be configured in the `matplotlibrc` file or a style file to use any of the `/gallery/color/color_sequences`{.interpreted-text role="doc"}. For example ``` none axes.prop_cycle : cycler(color='Accent') ``` --- # Colormaps support giving colors for bad, under and over values on creation Colormaps gained keyword arguments `bad`, `under`, and `over` to specify these values on creation. Previously, these values would have to be set afterwards using one of [\~.Colormap.set_bad]{.title-ref}, [\~.Colormap.set_under]{.title-ref}, [\~.Colormap.set_bad]{.title-ref}, [\~.Colormap.set_extremes]{.title-ref}, [\~.Colormap.with_extremes]{.title-ref}. It is recommended to use the new functionality, e.g.: cmap = ListedColormap(colors, bad="red", under="darkblue", over="purple") instead of: cmap = ListedColormap(colors).with_extremes( bad="red", under="darkblue", over="purple") or: cmap = ListedColormap(colors) cmap.set_bad("red") cmap.set_under("darkblue") cmap.set_over("purple") --- # Tuning transparency of colormaps The new method [.Colormap.with_alpha]{.title-ref} allows to create a new colormap with the same color values but a new uniform alpha value. This is handy if you want to modify only the transparency of mapped colors for an Artist. --- # 3D depth-shading fix Previously, a slightly buggy method of estimating the visual \"depth\" of 3D items could lead to sudden and unexpected changes in transparency as the plot orientation changed. Now, the behavior has been made smooth and predictable. A new parameter `depthshade_minalpha` has also been added to allow users to set the minimum transparency level. Depth-shading is an option for Patch3DCollections and Path3DCollections, including 3D scatter plots. The default values for `depthshade` and `depthshade_minalpha` are now also controlled via rcParams, with values of `True` and `0.3` respectively. A simple example: ::: {.plot include-source="true" alt="A 3D scatter plot with depth-shading enabled."} import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(projection=\"3d\") X = \[i for i in range(10)\] Y = \[i for i in range(10)\] Z = \[i for i in range(10)\] S = \[(i + 1) \* 400 for i in range(10)\] ax.scatter( : xs=X, ys=Y, zs=Z, s=S, depthshade=True, depthshade_minalpha=0.3, ) ax.view_init(elev=10, azim=-150, roll=0) plt.show() ::: --- # Figure size units When creating figures, it is now possible to define figure sizes in cm or pixel. Up to now the figure size is specified via `plt.figure(..., figsize=(6, 4))`, and the given numbers are interpreted as inches. It is now possible to add a unit string to the tuple, i.e. `plt.figure(..., figsize=(600, 400, "px"))`. Supported unit strings are \"in\", \"cm\", \"px\". --- # Saving figures as GIF works again According to the figure documentation, the `savefig` method supports the GIF format with the file extension `.gif`. However, GIF support had been broken since Matplotlib 2.0.0. It works again. --- # Grouped bar charts The new method [\~.Axes.grouped_bar()]{.title-ref} simplifies the creation of grouped bar charts significantly. It supports different input data types (lists of datasets, dicts of datasets, data in 2D arrays, pandas DataFrames), and allows for easy customization of placement via controllable distances between bars and between bar groups. Example: ::: {.plot include-source="true" alt="Diagram of a grouped bar chart of 3 datasets with 2 categories."} import matplotlib.pyplot as plt categories = \[\'A\', \'B\'\] datasets = { \'dataset 0\': \[1, 11\], \'dataset 1\': \[3, 13\], \'dataset 2\': \[5, 15\], } fig, ax = plt.subplots() ax.grouped_bar(datasets, tick_labels=categories) ax.legend() ::: --- # `hist()` supports a single color for multiple datasets It is now possible to pass a single *color* value to [\~.Axes.hist()]{.title-ref}. This value is applied to all datasets. --- # Missing glyphs use Last Resort font Most fonts do not have 100% character coverage, and will fall back to a \"not found\" glyph for characters that are not provided. Often, this glyph will be minimal (e.g., the default DejaVu Sans \"not found\" glyph is just a rectangle.) Such minimal glyphs provide no context as to the characters that are missing. Now, missing glyphs will fall back to the [Last Resort font](https://github.com/unicode-org/last-resort-font) produced by the Unicode Consortium. This special-purpose font provides glyphs that represent types of Unicode characters. These glyphs show a representative character from the missing Unicode block, and at larger sizes, more context to help determine which character and font are needed. To disable this fallback behaviour, set `font.enable_last_resort`{.interpreted-text role="rc"} to `False`. ::: {.plot alt="An example of missing glyph behaviour, the first glyph from Bengali script, second glyph from Hiragana, and the last glyph from the Unicode Private Use Area. Multiple lines repeat the text with increasing font size from top to bottom. text_raw = r\"'\\N{Bengali Digit Zero}\\N{Hiragana Letter A}\\ufdd0'\" text = eval(text_raw) sizes = [ (0.85, 8), (0.80, 10), (0.75, 12), (0.70, 16), (0.63, 20), (0.55, 24), (0.45, 32), (0.30, 48), (0.10, 64), ] fig = plt.figure() fig.text(0.01, 0.90, f'Input: {text_raw}') for y, size in sizes: fig.text(0.01, y, f'{size}pt:{text}', fontsize=size)"} ::: --- # `legend.linewidth` rcParam and parameter A new rcParam `legend.linewidth` has been added to control the line width of the legend\'s box edges. When set to `None` (the default), it inherits the value from `patch.linewidth`. This allows for independent control of the legend frame line width without affecting other elements. The [.Legend]{.title-ref} constructor also accepts a new *linewidth* parameter to set the legend frame line width directly, overriding the rcParam value. ::: {.plot include-source="true" alt="A line plot with a legend showing a thick border around the legend box."} import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot(\[1, 2, 3\], label=\'data\') ax.legend(linewidth=2.0) \# Thick legend box edge plt.show() ::: --- # Maximum levels on log-scaled contour plots are now respected When plotting contours with a log norm, passing an integer value to the `levels` argument to cap the maximum number of contour levels now works as intended. --- # Improved selection of log-scale ticks The algorithm for selecting log-scale ticks (on powers of ten) has been improved. In particular, it will now always draw as many ticks as possible (e.g., it will not draw a single tick if it was possible to fit two ticks); if subsampling ticks, it will prefer putting ticks on integer multiples of the subsampling stride (e.g., it prefers putting ticks at 10^0^, 10^3^, 10^6^ rather than 10^1^, 10^4^, 10^7^) if this results in the same number of ticks at the end; and it is now more robust against floating-point calculation errors. --- # Separate styling options for major/minor grid line in rcParams Using `grid.major.*`{.interpreted-text role="rc"} or `grid.minor.*`{.interpreted-text role="rc"} will overwrite the value in `grid.*`{.interpreted-text role="rc"} for the major and minor gridlines, respectively. ::: {.plot include-source="true" alt="Modifying the gridlines using the new options `rcParams`"} import matplotlib as mpl import matplotlib.pyplot as plt \# Set visibility for major and minor gridlines mpl.rcParams\[\"axes.grid\"\] = True mpl.rcParams\[\"ytick.minor.visible\"\] = True mpl.rcParams\[\"xtick.minor.visible\"\] = True mpl.rcParams\[\"axes.grid.which\"\] = \"both\" \# Using old values to set both major and minor properties mpl.rcParams\[\"grid.color\"\] = \"red\" mpl.rcParams\[\"grid.linewidth\"\] = 1 \# Overwrite some values for major and minor separately mpl.rcParams\[\"grid.major.color\"\] = \"black\" mpl.rcParams\[\"grid.major.linewidth\"\] = 2 mpl.rcParams\[\"grid.minor.linestyle\"\] = \":\" mpl.rcParams\[\"grid.minor.alpha\"\] = 0.6 plt.plot(\[0, 1\], \[0, 1\]) plt.show() ::: --- # Okabe-Ito accessible color sequence Matplotlib now includes the [Okabe-Ito color sequence](https://jfly.uni-koeln.de/color/#pallet). Its colors remain distinguishable for common forms of color-vision deficiency and when printed. For example, to set it as the default colormap for your plots and image-like artists, use: ``` python import matplotlib.pyplot as plt from cycler import cycler plt.rcParams['axes.prop_cycle'] = cycler('color', plt.colormaps['okabe_ito'].colors) plt.rcParams['image.cmap'] = 'okabe_ito' ``` Or, when creating plots, you can pass it explicitly: ::: plot import matplotlib.pyplot as plt colors = plt.colormaps\[\'okabe_ito\'\].colors x = range(5) for i, c in enumerate(colors): plt.plot(x, \[v\*(i+1) for v in x\], color=c, label=f\'line {i}\') plt.legend() plt.show() ::: --- # `PatchCollection` legends now supported [.PatchCollection]{.title-ref} instances now properly display in legends when given a label. Previously, labels on [\~.PatchCollection]{.title-ref} objects were ignored by the legend system, requiring users to create manual legend entries. ::: {.plot include-source="true" alt="The legend entry displays a rectangle matching the visual properties (colors, line styles, line widths) of the first patch in the collection."} import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.collections import PatchCollection fig, ax = plt.subplots() patches = \[mpatches.Circle((0, 0), 0.1), mpatches.Rectangle((0.5, 0.5), 0.2, 0.3)\] pc = PatchCollection(patches, facecolor=\'blue\', edgecolor=\'black\', label=\'My patches\') ax.add_collection(pc) ax.legend() \# Now displays the label \"My patches\" plt.show() ::: This fix resolves `23998`{.interpreted-text role="ghissue"}. --- # Adding labels to pie chart wedges The new [\~.Axes.pie_label]{.title-ref} method adds a label to each wedge in a pie chart created with [\~.Axes.pie]{.title-ref}. It can take - a list of strings, similar to the existing *labels* parameter of [\~.Axes.pie]{.title-ref} - a format string similar to the existing *autopct* parameter of [\~.Axes.pie]{.title-ref} except that it uses the [str.format]{.title-ref} method and it can handle absolute values as well as fractions/percentages For more examples, see `/gallery/pie_and_polar_charts/pie_label`{.interpreted-text role="doc"}. ::: {.plot include-source="true" alt="A pie chart with three labels on each wedge, showing a food type, number, and fraction associated with the wedge."} import matplotlib.pyplot as plt data = \[36, 24, 8, 12\] labels = \[\'spam\', \'eggs\', \'bacon\', \'sausage\'\] fig, ax = plt.subplots() pie = ax.pie(data) ax.pie_label(pie, labels, distance=1.1) ax.pie_label(pie, \'{frac:.1%}\', distance=0.7) ax.pie_label(pie, \'{absval:d}\', distance=0.4) ::: --- # Figures can be attached to and removed from pyplot Figures can now be attached to and removed from management through pyplot, which in the background also means a less strict coupling to backends. In particular, standalone figures (created with the [.Figure]{.title-ref} constructor) can now be registered with the [.pyplot]{.title-ref} module by calling `plt.figure(fig)`. This allows to show them with `plt.show()` as you would do with any figure created with pyplot factory methods such as `plt.figure()` or `plt.subplots()`. When closing a shown figure window, the related figure is reset to the standalone state, i.e. it\'s not visible to pyplot anymore, but if you still hold a reference to it, you can continue to work with it (e.g. do `fig.savefig()`, or re-add it to pyplot with `plt.figure(fig)` and then show it again). The following is now possible - though the example is exaggerated to show what\'s possible. In practice, you\'ll stick with much simpler versions for better consistency : import matplotlib.pyplot as plt from matplotlib.figure import Figure # Create a standalone figure fig = Figure() ax = fig.add_subplot() ax.plot([1, 2, 3], [4, 5, 6]) # Register it with pyplot plt.figure(fig) # Modify the figure through pyplot plt.xlabel("x label") # Show the figure plt.show() # Close the figure window through the GUI # Continue to work on the figure fig.savefig("my_figure.png") ax.set_ylabel("y label") # Re-register the figure and show it again plt.figure(fig) plt.show() Technical detail: Standalone figures use [.FigureCanvasBase]{.title-ref} as canvas. This is replaced by a backend-dependent subclass when registering with pyplot, and is reset to [.FigureCanvasBase]{.title-ref} when the figure is closed. [.Figure.savefig]{.title-ref} uses the current canvas to save the figure (if possible). Since [.FigureCanvasBase]{.title-ref} can not render the figure, when saving the figure, it will fallback to a suitable canvas subclass, e.g. [.FigureCanvasAgg]{.title-ref} for raster outputs such as png. Any Agg-based backend will create the same file output. However, there may be slight differences for non-Agg backends; e.g. if you use \"GTK4Cairo\" as interactive backend, `fig.savefig("file.png")` may create a slightly different image depending on whether the figure is registered with pyplot or not. In general, you should not store a reference to the canvas, but rather always obtain it from the figure with `fig.canvas`. This will return the current canvas, which is either the original [.FigureCanvasBase]{.title-ref} or a backend-dependent subclass, depending on whether the figure is registered with pyplot or not. Additionally, the swapping of the canvas currently does not play well with blitting of matplotlib widgets; in such cases either deactivate blitting or do not continue to use the figure (e.g. saving it after closing the window). --- # Zooming using mouse wheel `Ctrl+MouseWheel` can be used to zoom in the plot windows. Additionally, `x+MouseWheel` zooms only the x-axis and `y+MouseWheel` zooms only the y-axis. The zoom focusses on the mouse pointer. With `Ctrl`, the axes aspect ratio is kept; with `x` or `y`, only the respective axis is scaled. Zooming is currently only supported on rectilinear Axes. --- # Separated `hatchcolor` from `edgecolor` When the *hatchcolor* parameter is specified, it will be used for the hatch. If it is not specified, it will fall back to using `hatch.color`{.interpreted-text role="rc"}. The special value \'edge\' uses the patch edgecolor, with a fallback to `patch.edgecolor`{.interpreted-text role="rc"} if the patch edgecolor is \'none\'. Previously, hatch colors were the same as edge colors, with a fallback to `hatch.color`{.interpreted-text role="rc"} if the patch did not have an edge color. ::: {.plot include-source="true" alt="Four Rectangle patches, each displaying the color of hatches in different specifications of edgecolor and hatchcolor. Top left has hatchcolor='black' representing the default value when both hatchcolor and edgecolor are not set, top right has edgecolor='blue' and hatchcolor='black' which remains when the edgecolor is set again, bottom left has edgecolor='red' and hatchcolor='orange' on explicit specification and bottom right has edgecolor='green' and hatchcolor='green' when the hatchcolor is not set."} import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.patches import Rectangle fig, ax = plt.subplots() \# In this case, hatchcolor is orange patch1 = Rectangle((0.1, 0.1), 0.3, 0.3, edgecolor=\'red\', linewidth=2, hatch=\'//\', hatchcolor=\'orange\') ax.add_patch(patch1) \# When hatchcolor is not specified, it matches edgecolor \# In this case, hatchcolor is green patch2 = Rectangle((0.6, 0.1), 0.3, 0.3, edgecolor=\'green\', linewidth=2, hatch=\'//\', facecolor=\'none\') ax.add_patch(patch2) \# If both hatchcolor and edgecolor are not specified \# it will default to the \'patch.edgecolor\' rcParam, which is black by default \# In this case, hatchcolor is black patch3 = Rectangle((0.1, 0.6), 0.3, 0.3, hatch=\'//\') ax.add_patch(patch3) \# When using [hatch.color]{.title-ref} in the [rcParams]{.title-ref} \# edgecolor will now not overwrite hatchcolor \# In this case, hatchcolor is black with plt.rc_context({\'hatch.color\': \'black\'}): patch4 = Rectangle((0.6, 0.6), 0.3, 0.3, edgecolor=\'blue\', linewidth=2, hatch=\'//\', facecolor=\'none\') \# hatchcolor is black (it uses the [hatch.color]{.title-ref} rcParam value) patch4.set_edgecolor(\'blue\') \# hatchcolor is still black (here, it does not update when edgecolor changes) ax.add_patch(patch4) ax.annotate(\"hatchcolor = \'orange\'\", : xy=(.5, 1.03), xycoords=patch1, ha=\'center\', va=\'bottom\') ax.annotate(\"hatch color unspecifiednedgecolor=\'green\'\", : xy=(.5, 1.03), xycoords=patch2, ha=\'center\', va=\'bottom\') ax.annotate(\"hatch color unspecifiednusing patch.edgecolor\", : xy=(.5, 1.03), xycoords=patch3, ha=\'center\', va=\'bottom\') ax.annotate(\"hatch.color=\'black\'\", : xy=(.5, 1.03), xycoords=patch4, ha=\'center\', va=\'bottom\') plt.show() ::: For collections, a sequence of colors can be passed to the *hatchcolor* parameter which will be cycled through for each hatch, similar to *facecolor* and *edgecolor*. Previously, if *edgecolor* was not specified, the hatch color would fall back to `patch.edgecolor`{.interpreted-text role="rc"}, but the alpha value would default to **1.0**, regardless of the alpha value of the collection. This behavior has been changed such that, if both *hatchcolor* and *edgecolor* are not specified, the hatch color will fall back to \'patch.edgecolor\' with the alpha value of the collection. ::: {.plot include-source="true" alt="A random scatter plot with hatches on the markers. The hatches are colored in blue, orange, and green, respectively. After the first three markers, the colors are cycled through again."} import matplotlib.pyplot as plt import numpy as np np.random.seed(19680801) fig, ax = plt.subplots() x = \[29, 36, 41, 25, 32, 70, 62, 58, 66, 80, 58, 68, 62, 37, 48\] y = \[82, 76, 48, 53, 62, 70, 84, 68, 55, 75, 29, 25, 12, 17, 20\] colors = \[\'tab:blue\'\] \* 5 + \[\'tab:orange\'\] \* 5 + \[\'tab:green\'\] \* 5 ax.scatter( : x, y, s=800, hatch=\"xxxx\", hatchcolor=colors, facecolor=\"none\", edgecolor=\"black\", ) plt.show() ::: --- # Six and eight color Petroff color cycles The six and eight color accessible Petroff color cycles are named \'petroff6\' and \'petroff8\'. They compliment the existing \'petroff10\' color cycle, added in [Matplotlib 3.10.0](https://matplotlib.org/stable/users/prev_whats_new/whats_new_3.10.0.html#new-more-accessible-color-cycle) For more details see [Petroff, M. A.: \"Accessible Color Sequences for Data Visualization\"](https://arxiv.org/abs/2107.02270). To load the \'petroff6\' color cycle in place of the default: import matplotlib.pyplot as plt plt.style.use('petroff6') or to load the \'petroff8\' color cycle: import matplotlib.pyplot as plt plt.style.use('petroff8') --- # Callable *valfmt* for `Slider` and `RangeSlider` In addition to the existing %-format string, the *valfmt* parameter of [\~.matplotlib.widgets.Slider]{.title-ref} and [\~.matplotlib.widgets.RangeSlider]{.title-ref} now also accepts a callable of the form `valfmt(val: float) -> str`. --- # Stackplot styling [\~.Axes.stackplot]{.title-ref} now accepts sequences for the style parameters *facecolor*, *edgecolor*, *linestyle*, and *linewidth*, similar to how the *hatch* parameter is already handled. --- # Streamplot integration control Two new options have been added to the [\~.axes.Axes.streamplot]{.title-ref} function that give the user better control of the streamline integration. The first is called `integration_max_step_scale` and multiplies the default max step computed by the integrator. The second is called `integration_max_error_scale` and multiplies the default max error set by the integrator. Values for these parameters between zero and one reduce (tighten) the max step or error to improve streamline accuracy by performing more computation. Values greater than one increase (loosen) the max step or error to reduce computation time at the cost of lower streamline accuracy. The integrator defaults are both hand-tuned values and may not be applicable to all cases, so this allows customizing the behavior to specific use cases. Modifying only `integration_max_step_scale` has proved effective, but it may be useful to control the error as well. --- # Multiple arrows on a streamline A new `num_arrows` argument has been added to [\~matplotlib.axes.Axes.streamplot]{.title-ref} that allows more than one arrow to be added to each streamline: ::: {.plot include-source="true" alt="One chart showing a streamplot. Each streamline has three arrows."} import matplotlib.pyplot as plt import numpy as np w = 3 Y, X = np.mgrid\[-w:w:100j, -w:w:100j\] U = -1 - X\**2 + Y V = 1 + X - Y*\*2 fig, ax = plt.subplots() ax.streamplot(X, Y, U, V, num_arrows=3) plt.show() ::: --- # Resetting the subplot parameters for figure.clear() When calling [.Figure.clear()]{.title-ref} the settings for [.gridspec.SubplotParams]{.title-ref} are restored to the default values. [\~.SubplotParams.to_dict]{.title-ref} is a new method to get the subplot parameters as a dict, and [\~.SubplotParams.reset]{.title-ref} resets the parameters to the defaults. --- # PDF files created with usetex now embed subsets of Type 1 fonts When using the PDF backend with the usetex feature, Matplotlib calls TeX to render the text and formulas in the figure. The fonts that get used are usually \"Type 1\" fonts. They used to be embedded in full but are now limited to the glyphs that are actually used in the figure. This reduces the size of the resulting PDF files. --- # `borderpad` accepts a tuple for separate x/y padding The `borderpad` parameter used for placing anchored artists (such as inset axes) now accepts a tuple of `(x_pad, y_pad)`. This allows for specifying separate padding values for the horizontal and vertical directions, providing finer control over placement. For example, when placing an inset in a corner, one might want horizontal padding to avoid overlapping with the main plot\'s axis labels, but no vertical padding to keep the inset flush with the plot area edge. Example usage with `~mpl_toolkits.axes_grid1.inset_locator.inset_axes`{.interpreted-text role="func"}: ``` python ax_inset = inset_axes( ax, width="30%", height="30%", loc='upper left', borderpad=(4, 0)) ``` --- # `violin_stats` simpler *method* parameter The *method* parameter of [\~.cbook.violin_stats]{.title-ref} may now be specified as tuple of strings, and has a new default `("GaussianKDE", "scott")`. Calling [\~.cbook.violin_stats]{.title-ref} followed by [\~.Axes.violin]{.title-ref} is therefore now equivalent to calling [\~.Axes.violinplot]{.title-ref}. ::: {.plot include-source="true" alt="Example showing violin_stats followed by violin gives the same result as violinplot"} import matplotlib.pyplot as plt from matplotlib.cbook import violin_stats import numpy as np rng = np.random.default_rng(19680801) data = rng.normal(size=(10, 3)) fig, (ax1, ax2) = plt.subplots(ncols=2, layout=\'constrained\', figsize=(6.4, 3.5)) \# Create the violin plot in one step ax1.violinplot(data) ax1.set_title(\'One Step\') \# Process the data and then create the violin plot vstats = violin_stats(data) ax2.violin(vstats) ax2.set_title(\'Two Steps\') plt.show() ::: --- # `violinplot` now accepts color arguments [\~.Axes.violinplot]{.title-ref} and [\~.Axes.violin]{.title-ref} now accept `facecolor` and `linecolor` as input arguments. This means that users can set the color of violinplots as they make them, rather than setting the color of individual objects afterwards. It is possible to pass a single color to be used for all violins, or pass a sequence of colors. --- # WebAgg scroll capture control The WebAgg backend now provides the ability to capture scroll events to prevent page scrolling when interacting with plots. This can be enabled or disabled via the new [.FigureCanvasWebAggCore.set_capture_scroll]{.title-ref} and [.FigureCanvasWebAggCore.get_capture_scroll]{.title-ref} methods. --- # `xtick` and `ytick` rotation modes A new feature has been added for handling rotation of xtick and ytick labels more intuitively. The new [rotation modes \]{.title-ref} \"xtick\" and \"ytick\" automatically adjust the alignment of rotated tick labels, so that the text points towards their anchor point, i.e. ticks. This works for all four sides of the plot (bottom, top, left, right), reducing the need for manual adjustments when rotating labels. ::: {.plot include-source="true" alt="Example of rotated xtick and ytick labels."} import matplotlib.pyplot as plt fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(7, 3.5), layout=\'constrained\') pos = range(5) labels = \[\'label\'\] \* 5 ax1.set_xticks(pos, labels, rotation=-45, rotation_mode=\'xtick\') ax1.set_yticks(pos, labels, rotation=45, rotation_mode=\'ytick\') ax2.xaxis.tick_top() ax2.set_xticks(pos, labels, rotation=-45, rotation_mode=\'xtick\') ax2.yaxis.tick_right() ax2.set_yticks(pos, labels, rotation=45, rotation_mode=\'ytick\') plt.show() ::: --- # Consistent zoom boxes Zooming now has a consistent dashed box style across all backends. --- ::: redirect-from /users/next_whats_new ::: # Next what\'s new? {#whats-new} ::: ifconfig releaselevel == \'dev\' ::: {.toctree glob="" maxdepth="1"} next_whats_new/\* ::: ::: --- ::: redirect-from /users/prev_whats_new/changelog ::: # List of changes to Matplotlib prior to 2015 {#old_changelog} This is a list of the changes made to Matplotlib from 2003 to 2015. For more recent changes, please refer to the `/release/release_notes`{.interpreted-text role="doc"}. 2015-11-16 : Levels passed to contour(f) and tricontour(f) must be in increasing order. 2015-10-21 : Added TextBox widget 2015-10-21 : Added get_ticks_direction() 2015-02-27 : Added the rcParam \'image.composite_image\' to permit users to decide whether they want the vector graphics backends to combine all images within a set of axes into a single composite image. (If images do not get combined, users can open vector graphics files in Adobe Illustrator or Inkscape and edit each image individually.) 2015-02-19 : Rewrite of C++ code that calculates contours to add support for corner masking. This is controlled by the \'corner_mask\' keyword in plotting commands \'contour\' and \'contourf\'. - IMT 2015-01-23 : Text bounding boxes are now computed with advance width rather than ink area. This may result in slightly different placement of text. 2014-10-27 : Allowed selection of the backend using the `MPLBACKEND`{.interpreted-text role="envvar"} environment variable. Added documentation on backend selection methods. 2014-09-27 : Overhauled [.colors.LightSource]{.title-ref}. Added [.LightSource.hillshade]{.title-ref} to allow the independent generation of illumination maps. Added new types of blending for creating more visually appealing shaded relief plots (e.g. `blend_mode="overlay"`, etc, in addition to the legacy \"hsv\" mode). 2014-06-10 : Added Colorbar.remove() 2014-06-07 : Fixed bug so radial plots can be saved as ps in py3k. 2014-06-01 : Changed the fmt kwarg of errorbar to support the mpl convention that \"none\" means \"don\'t draw it\", and to default to the empty string, so that plotting of data points is done with the plot() function defaults. Deprecated use of the None object in place \"none\". 2014-05-22 : Allow the linscale keyword parameter of symlog scale to be smaller than one. 2014-05-20 : Added logic in FontManager to invalidate font-cache if font-family rcparams have changed. 2014-05-16 : Fixed the positioning of multi-line text in the PGF backend. 2014-05-14 : Added Axes.add_image() as the standard way to add AxesImage instances to Axes. This improves the consistency with add_artist(), add_collection(), add_container(), add_line(), add_patch(), and add_table(). 2014-05-02 : Added colorblind-friendly colormap, named \'Wistia\'. 2014-04-27 : Improved input clean up in Axes.{h\|v}lines Coerce input into a 1D ndarrays (after dealing with units). 2014-04-27 : removed un-needed cast to float in stem 2014-04-23 : Updated references to \"ipython -pylab\" The preferred method for invoking pylab is now using the \"%pylab\" magic. -Chris G. 2014-04-22 : Added (re-)generate a simple automatic legend to \"Figure Options\" dialog of the Qt4Agg backend. 2014-04-22 : Added an example showing the difference between interpolation = \'none\' and interpolation = \'nearest\' in [\~.Axes.imshow]{.title-ref} when saving vector graphics files. 2014-04-22 : Added violin plotting functions. See [.Axes.violinplot]{.title-ref}, [.Axes.violin]{.title-ref}, [.cbook.violin_stats]{.title-ref} and [.mlab.GaussianKDE]{.title-ref} for details. 2014-04-10 : Fixed the triangular marker rendering error. The \"Up\" triangle was rendered instead of \"Right\" triangle and vice-versa. 2014-04-08 : Fixed a bug in parasite_axes.py by making a list out of a generator at line 263. 2014-04-02 : Added `clipon=False` to patch creation of wedges and shadows in [\~.Axes.pie]{.title-ref}. 2014-02-25 : In backend_qt4agg changed from using update -\> repaint under windows. See comment in source near `self._priv_update` for longer explanation. 2014-03-27 : Added tests for pie ccw parameter. Removed pdf and svg images from tests for pie linewidth parameter. 2014-03-24 : Changed the behaviour of axes to not ignore leading or trailing patches of height 0 (or width 0) while calculating the x and y axis limits. Patches having both height == 0 and width == 0 are ignored. 2014-03-24 : Added bool kwarg (manage_xticks) to boxplot to enable/disable the management of the xlimits and ticks when making a boxplot. Default in True which maintains current behavior by default. 2014-03-23 : Fixed a bug in projections/polar.py by making sure that the theta value being calculated when given the mouse coordinates stays within the range of 0 and 2 \* pi. 2014-03-22 : Added the keyword arguments wedgeprops and textprops to pie. Users can control the wedge and text properties of the pie in more detail, if they choose. 2014-03-17 : Bug was fixed in append_axes from the AxesDivider class would not append axes in the right location with respect to the reference locator axes 2014-03-13 : Add parameter \'clockwise\' to function pie, True by default. 2014-02-28 : Added \'origin\' kwarg to [\~.Axes.spy]{.title-ref} 2014-02-27 : Implemented separate horizontal/vertical axes padding to the ImageGrid in the AxesGrid toolkit 2014-02-27 : Allowed markevery property of matplotlib.lines.Line2D to be, an int numpy fancy index, slice object, or float. The float behaviour turns on markers at approximately equal display-coordinate-distances along the line. 2014-02-25 : In backend_qt4agg changed from using update -\> repaint under windows. See comment in source near `self._priv_update` for longer explanation. 2014-01-02 : [\~.Axes.triplot]{.title-ref} now returns the artist it adds and support of line and marker kwargs has been improved. GBY 2013-12-30 : Made streamplot grid size consistent for different types of density argument. A 30x30 grid is now used for both density=1 and density=(1, 1). 2013-12-03 : Added a pure boxplot-drawing method that allow a more complete customization of boxplots. It takes a list of dicts contains stats. Also created a function ([.cbook.boxplot_stats]{.title-ref}) that generates the stats needed. 2013-11-28 : Added qhull extension module to perform Delaunay triangulation more robustly than before. It is used by tri.Triangulation (and hence all pyplot.tri\* methods) and mlab.griddata. Deprecated matplotlib.delaunay module. - IMT 2013-11-05 : Add power-law normalization method. This is useful for, e.g., showing small populations in a \"hist2d\" histogram. 2013-10-27 : Added get_rlabel_position and set_rlabel_position methods to PolarAxes to control angular position of radial tick labels. 2013-10-06 : Add stride-based functions to mlab for easy creation of 2D arrays with less memory. 2013-10-06 : Improve window and detrend functions in mlab, particular support for 2D arrays. 2013-10-06 : Improve performance of all spectrum-related mlab functions and plots. 2013-10-06 : Added support for magnitude, phase, and angle spectrums to axes.specgram, and support for magnitude, phase, angle, and complex spectrums to mlab-specgram. 2013-10-06 : Added magnitude_spectrum, angle_spectrum, and phase_spectrum plots, as well as magnitude_spectrum, angle_spectrum, phase_spectrum, and complex_spectrum functions to mlab 2013-07-12 : Added support for datetime axes to 2d plots. Axis values are passed through Axes.convert_xunits/Axes.convert_yunits before being used by contour/contourf, pcolormesh and pcolor. 2013-07-12 : Allowed matplotlib.dates.date2num, matplotlib.dates.num2date, and matplotlib.dates.datestr2num to accept n-d inputs. Also factored in support for n-d arrays to matplotlib.dates.DateConverter and matplotlib.units.Registry. 2013-06-26 : Refactored the axes module: the axes module is now a folder, containing the following submodule: - \_subplots.py, containing all the subplots helper methods - \_base.py, containing several private methods and a new \_AxesBase class. This \_AxesBase class contains all the methods that are not directly linked to plots of the \"old\" Axes - \_axes.py contains the Axes class. This class now inherits from \_AxesBase: it contains all \"plotting\" methods and labelling methods. This refactoring should not affect the API. Only private methods are not importable from the axes module anymore. 2013-05-18 : Added support for arbitrary rasterization resolutions to the SVG backend. Previously the resolution was hard coded to 72 dpi. Now the backend class takes a image_dpi argument for its constructor, adjusts the image bounding box accordingly and forwards a magnification factor to the image renderer. The code and results now resemble those of the PDF backend. - MW 2013-05-08 : Changed behavior of hist when given stacked=True and normed=True. Histograms are now stacked first, then the sum is normalized. Previously, each histogram was normalized, then they were stacked. 2013-04-25 : Changed all instances of: from matplotlib import MatplotlibDeprecationWarning as mplDeprecation to: from cbook import mplDeprecation and removed the import into the matplotlib namespace in \_\_init\_\_.py - Thomas Caswell 2013-04-15 : Added \'axes.xmargin\' and \'axes.ymargin\' to rpParams to set default margins on auto-scaling. - TAC 2013-04-16 : Added patheffect support for Line2D objects. -JJL 2013-03-31 : Added support for arbitrary unstructured user-specified triangulations to Axes3D.tricontour\[f\] - Damon McDougall 2013-03-19 : Added support for passing *linestyle* kwarg to [\~.Axes.step]{.title-ref} so all [\~.Axes.plot]{.title-ref} kwargs are passed to the underlying [\~.Axes.plot]{.title-ref} call. -TAC 2013-02-25 : Added classes CubicTriInterpolator, UniformTriRefiner, TriAnalyzer to matplotlib.tri module. - GBy 2013-01-23 : Add \'savefig.directory\' to rcParams to remember and fill in the last directory saved to for figure save dialogs - Martin Spacek 2013-01-13 : Add eventplot method to axes and pyplot and EventCollection class to collections. 2013-01-08 : Added two extra titles to axes which are flush with the left and right edges of the plot respectively. Andrew Dawson 2013-01-07 : Add framealpha keyword argument to legend - PO 2013-01-16 : Till Stensitzki added a baseline feature to stackplot 2012-12-22 : Added classes for interpolation within triangular grids (LinearTriInterpolator) and to find the triangles in which points lie (TrapezoidMapTriFinder) to matplotlib.tri module. - IMT 2012-12-05 : Added MatplotlibDeprecationWarning class for signaling deprecation. Matplotlib developers can use this class as follows: from matplotlib import MatplotlibDeprecationWarning as mplDeprecation In light of the fact that Python builtin DeprecationWarnings are ignored by default as of Python 2.7, this class was put in to allow for the signaling of deprecation, but via UserWarnings which are not ignored by default. - PI 2012-11-27 : Added the *mtext* parameter for supplying matplotlib.text.Text instances to RendererBase.draw_tex and RendererBase.draw_text. This allows backends to utilize additional text attributes, like the alignment of text elements. -pwuertz 2012-11-26 : deprecate matplotlib/mpl.py, which was used only in pylab.py and is now replaced by the more suitable `import matplotlib as mpl`. - PI 2012-11-25 : Make rc_context available via pyplot interface - PI 2012-11-16 : plt.set_cmap no longer throws errors if there is not already an active colorable artist, such as an image, and just sets up the colormap to use from that point forward. - PI 2012-11-16 : Added the function \_get_rbga_face, which is identical to \_get_rbg_face except it return a (r,g,b,a) tuble, to line2D. Modified Line2D.draw to use \_get_rbga_face to get the markerface color so that any alpha set by markerfacecolor will respected. - Thomas Caswell 2012-11-13 : Add a symmetric log normalization class to colors.py. Also added some tests for the normalization class. Till Stensitzki 2012-11-12 : Make axes.stem take at least one argument. Uses a default range(n) when the first arg not provided. Damon McDougall 2012-11-09 : Make plt.subplot() without arguments act as subplot(111) - PI 2012-11-08 : Replaced plt.figure and plt.subplot calls by the newer, more convenient single call to plt.subplots() in the documentation examples - PI 2012-10-05 : Add support for saving animations as animated GIFs. - JVDP 2012-08-11 : Fix path-closing bug in patches.Polygon, so that regardless of whether the path is the initial one or was subsequently set by set_xy(), get_xy() will return a closed path if and only if get_closed() is True. Thanks to Jacob Vanderplas. - EF 2012-08-05 : When a norm is passed to contourf, either or both of the vmin, vmax attributes of that norm are now respected. Formerly they were respected only if both were specified. In addition, vmin and/or vmax can now be passed to contourf directly as kwargs. - EF 2012-07-24 : Contourf handles the extend kwarg by mapping the extended ranges outside the normed 0-1 range so that they are handled by colormap colors determined by the set_under and set_over methods. Previously the extended ranges were mapped to 0 or 1 so that the \"under\" and \"over\" colormap colors were ignored. This change also increases slightly the color contrast for a given set of contour levels. - EF 2012-06-24 : Make use of mathtext in tick labels configurable - DSD 2012-06-05 : Images loaded through PIL are now ordered correctly - CG 2012-06-02 : Add new Axes method and pyplot function, hist2d. - PO 2012-05-31 : Remove support for \'cairo.\\' style of backend specification. Deprecate \'cairo.format\' and \'savefig.extension\' rcParams and replace with \'savefig.format\'. - Martin Spacek 2012-05-29 : pcolormesh now obeys the passed in \"edgecolor\" kwarg. To support this, the \"shading\" argument to pcolormesh now only takes \"flat\" or \"gouraud\". To achieve the old \"faceted\" behavior, pass \"edgecolors=\'k\'\". - MGD 2012-05-22 : Added radius kwarg to pie charts. - HH 2012-05-22 : Collections now have a setting \"offset_position\" to select whether the offsets are given in \"screen\" coordinates (default, following the old behavior) or \"data\" coordinates. This is currently used internally to improve the performance of hexbin. As a result, the \"draw_path_collection\" backend methods have grown a new argument \"offset_position\". - MGD 2012-05-04 : Add a new argument to pie charts - startingangle - that allows one to specify the angle offset for the first wedge of the chart. - EP 2012-05-03 : symlog scale now obeys the logarithmic base. Previously, it was completely ignored and always treated as base e. - MGD 2012-05-03 : Allow linscalex/y keyword to symlog scale that allows the size of the linear portion relative to the logarithmic portion to be adjusted. - MGD 2012-04-14 : Added new plot style: stackplot. This new feature supports stacked area plots. - Damon McDougall 2012-04-06 : When path clipping changes a LINETO to a MOVETO, it also changes any CLOSEPOLY command to a LINETO to the initial point. This fixes a problem with pdf and svg where the CLOSEPOLY would then draw a line to the latest MOVETO position instead of the intended initial position. - JKS 2012-03-27 : Add support to ImageGrid for placing colorbars only at one edge of each column/row. - RMM 2012-03-07 : Refactor movie writing into useful classes that make use of pipes to write image data to ffmpeg or mencoder. Also improve settings for these and the ability to pass custom options. - RMM 2012-02-29 : errorevery keyword added to errorbar to enable errorbar subsampling. fixes issue #600. 2012-02-28 : Added plot_trisurf to the mplot3d toolkit. This supports plotting three dimensional surfaces on an irregular grid. - Damon McDougall 2012-01-23 : The radius labels in polar plots no longer use a fixed padding, but use a different alignment depending on the quadrant they are in. This fixes numerical problems when (rmax - rmin) gets too small. - MGD 2012-01-08 : Add axes.streamplot to plot streamlines of a velocity field. Adapted from Tom Flannaghan streamplot implementation. -TSY 2011-12-29 : ps and pdf markers are now stroked only if the line width is nonzero for consistency with agg, fixes issue #621. - JKS 2011-12-27 : Work around an EINTR bug in some versions of subprocess. - JKS 2011-10-25 : added support for operatorname to mathtext, including the ability to insert spaces, such as \$operatorname{arg,max}\$ - PI 2011-08-18 : Change api of Axes.get_tightbbox and add an optional keyword parameter *call_axes_locator*. - JJL 2011-07-29 : A new rcParam \"axes.formatter.use_locale\" was added, that, when True, will use the current locale to format tick labels. This means that, for example, in the fr_FR locale, \',\' will be used as a decimal separator. -MGD 2011-07-15 : The set of markers available in the plot() and scatter() commands has been unified. In general, this gives more options to both than were previously available, however, there is one backward-incompatible change to the markers in scatter: > \"d\" used to mean \"diamond\", it now means \"narrow diamond\". > \"D\" can be used for a \"diamond\". -MGD 2011-07-13 : Fix numerical problems in symlog scale, particularly when linthresh \<= 1.0. Symlog plots may look different if one was depending on the old broken behavior - MGD 2011-07-10 : Fixed argument handling error in tripcolor/triplot/tricontour, issue #203. - IMT 2011-07-08 : Many functions added to mplot3d.axes3d to bring Axes3D objects more feature-parity with regular Axes objects. Significant revisions to the documentation as well. - BVR 2011-07-07 : Added compatibility with IPython strategy for picking a version of Qt4 support, and an rcParam for making the choice explicitly: backend.qt4. - EF 2011-07-07 : Modified AutoMinorLocator to improve automatic choice of the number of minor intervals per major interval, and to allow one to specify this number via a kwarg. - EF 2011-06-28 : 3D versions of scatter, plot, plot_wireframe, plot_surface, bar3d, and some other functions now support empty inputs. - BVR 2011-06-22 : Add set_theta_offset, set_theta_direction and set_theta_zero_location to polar axes to control the location of 0 and directionality of theta. - MGD 2011-06-22 : Add axes.labelweight parameter to set font weight to axis labels - MGD. 2011-06-20 : Add pause function to pyplot. - EF 2011-06-16 : Added *bottom* keyword parameter for the stem command. Also, implemented a legend handler for the stem plot. - JJL 2011-06-16 : Added legend.frameon rcParams. - Mike Kaufman 2011-05-31 : Made backend_qt4 compatible with PySide . - Gerald Storer 2011-04-17 : Disable keyboard auto-repeat in qt4 backend by ignoring key events resulting from auto-repeat. This makes constrained zoom/pan work. - EF 2011-04-14 : interpolation=\"nearest\" always interpolate images. A new mode \"none\" is introduced for no interpolation - JJL 2011-04-03 : Fixed broken pick interface to AsteriskCollection objects used by scatter. - EF 2011-04-01 : The plot directive Sphinx extension now supports all of the features in the Numpy fork of that extension. These include doctest formatting, an \'include-source\' option, and a number of new configuration options. - MGD 2011-03-29 : Wrapped ViewVCCachedServer definition in a factory function. This class now inherits from urllib2.HTTPSHandler in order to fetch data from github, but HTTPSHandler is not defined if python was built without SSL support. -DSD 2011-03-10 : Update pytz version to 2011c, thanks to Simon Cross. - JKS 2011-03-06 : Add standalone tests.py test runner script. - JKS 2011-03-06 : Set edgecolor to \'face\' for scatter asterisk-type symbols; this fixes a bug in which these symbols were not responding to the c kwarg. The symbols have no face area, so only the edgecolor is visible. - EF 2011-02-27 : Support libpng version 1.5.x; suggestion by Michael Albert. Changed installation specification to a minimum of libpng version 1.2. - EF 2011-02-20 : clabel accepts a callable as an fmt kwarg; modified patch by Daniel Hyams. - EF 2011-02-18 : scatter(\[\], \[\]) is now valid. Also fixed issues with empty collections -BVR 2011-02-07 : Quick workaround for dviread bug #3175113 - JKS 2011-02-05 : Add cbook memory monitoring for Windows, using tasklist. - EF 2011-02-05 : Speed up Normalize and LogNorm by using in-place operations and by using float32 for float32 inputs and for ints of 2 bytes or shorter; based on patch by Christoph Gohlke. - EF 2011-02-04 : Changed imshow to use rgba as uint8 from start to finish, instead of going through an intermediate step as double precision; thanks to Christoph Gohlke. - EF 2011-01-13 : Added zdir and offset arguments to contourf3d to bring contourf3d in feature parity with contour3d. - BVR 2011-01-04 : Tag 1.0.1 for release at r8896 2011-01-03 : Added display of ticker offset to 3d plots. - BVR 2011-01-03 : Turn off tick labeling on interior subplots for pyplots.subplots when sharex/sharey is True. - JDH 2010-12-29 : Implement axes_divider.HBox and VBox. -JJL 2010-11-22 : Fixed error with Hammer projection. - BVR 2010-11-12 : Fixed the placement and angle of axis labels in 3D plots. - BVR 2010-11-07 : New rc parameters examples.download and examples.directory allow bypassing the download mechanism in get_sample_data. - JKS 2010-10-04 : Fix JPEG saving bug: only accept the kwargs documented by PIL for JPEG files. - JKS 2010-09-15 : Remove unused \_wxagg extension and numerix.h. - EF 2010-08-25 : Add new framework for doing animations with examples.- RM 2010-08-21 : Remove unused and inappropriate methods from Tick classes: set_view_interval, get_minpos, and get_data_interval are properly found in the Axis class and don\'t need to be duplicated in XTick and YTick. - EF 2010-08-21 : Change Axis.set_view_interval() so that when updating an existing interval, it respects the orientation of that interval, and can enlarge but not reduce the interval. This fixes a bug in which Axis.set_ticks would change the view limits of an inverted axis. Whether set_ticks should be affecting the viewLim at all remains an open question. - EF 2010-08-16 : Handle NaN\'s correctly in path analysis routines. Fixes a bug where the best location for a legend was not calculated correctly when the line contains NaNs. - MGD 2010-08-14 : Fix bug in patch alpha handling, and in bar color kwarg - EF 2010-08-12 : Removed all traces of numerix module after 17 months of deprecation warnings. - EF 2010-08-05 : Added keyword arguments \'thetaunits\' and \'runits\' for polar plots. Fixed PolarAxes so that when it set default Formatters, it marked them as such. Fixed semilogx and semilogy to no longer blindly reset the ticker information on the non-log axis. Axes.arrow can now accept unitized data. - JRE 2010-08-03 : Add support for MPLSETUPCFG variable for custom setup.cfg filename. Used by sage buildbot to build an mpl w/ no gui support - JDH 2010-08-01 : Create directory specified by MPLCONFIGDIR if it does not exist. - ADS 2010-07-20 : Return Qt4\'s default cursor when leaving the canvas - DSD 2010-07-06 : Tagging for mpl 1.0 at r8502 2010-07-05 : Added Ben Root\'s patch to put 3D plots in arbitrary axes, allowing you to mix 3d and 2d in different axes/subplots or to have multiple 3D plots in one figure. See examples/mplot3d/subplot3d_demo.py - JDH 2010-07-05 : Preferred kwarg names in set_xlim are now \'left\' and \'right\'; in set_ylim, \'bottom\' and \'top\'; original kwargs are still accepted without complaint. -EF 2010-07-05 : TkAgg and FltkAgg backends are now consistent with other interactive backends: when used in scripts from the command line (not from ipython -pylab), show blocks, and can be called more than once. - EF 2010-07-02 : Modified CXX/WrapPython.h to fix \"swab bug\" on solaris so mpl can compile on Solaris with CXX6 in the trunk. Closes tracker bug 3022815 - JDH 2010-06-30 : Added autoscale convenience method and corresponding pyplot function for simplified control of autoscaling; and changed axis, set_xlim, and set_ylim so that by default, they turn off the autoscaling on the relevant axis or axes. Therefore one can call set_xlim before plotting a line, for example, and the limits will be retained. - EF 2010-06-20 : Added Axes.tick_params and corresponding pyplot function to control tick and tick label appearance after an Axes has been created. - EF 2010-06-09 : Allow Axes.grid to control minor gridlines; allow Axes.grid and Axis.grid to control major and minor gridlines in the same method call. - EF 2010-06-06 : Change the way we do split/dividend adjustments in finance.py to handle dividends and fix the zero division bug reported in sf bug 2949906 and 2123566. Note that volume is not adjusted because the Yahoo CSV does not distinguish between share split and dividend adjustments making it near impossible to get volume adjustment right (unless we want to guess based on the size of the adjustment or scrape the html tables, which we don\'t) - JDH 2010-06-06 : Updated dateutil to 1.5 and pytz to 2010h. 2010-06-02 : Add error_kw kwarg to Axes.bar(). - EF 2010-06-01 : Fix pcolormesh() and QuadMesh to pass on kwargs as appropriate. - RM 2010-05-18 : Merge mpl_toolkits.gridspec into the main tree. - JJL 2010-05-04 : Improve backend_qt4 so it displays figures with the correct size - DSD 2010-04-20 : Added generic support for connecting to a timer for events. This adds TimerBase, TimerGTK, TimerQT, TimerWx, and TimerTk to the backends and a new_timer() method to each backend\'s canvas to allow ease of creating a new timer. - RM 2010-04-20 : Added margins() Axes method and pyplot function. - EF 2010-04-18 : update the axes_grid documentation. -JJL 2010-04-18 : Control MaxNLocator parameters after instantiation, and via Axes.locator_params method, with corresponding pyplot function. -EF 2010-04-18 : Control ScalarFormatter offsets directly and via the Axes.ticklabel_format() method, and add that to pyplot. -EF 2010-04-16 : Add a close_event to the backends. -RM 2010-04-06 : modify axes_grid examples to use axes_grid1 and axisartist. -JJL 2010-04-06 : rebase axes_grid using axes_grid1 and axisartist modules. -JJL 2010-04-06 : axes_grid toolkit is split into two separate modules, axes_grid1 and axisartist. -JJL 2010-04-05 : Speed up import: import pytz only if and when it is needed. It is not needed if the rc timezone is UTC. - EF 2010-04-03 : Added color kwarg to Axes.hist(), based on work by Jeff Klukas. - EF 2010-03-24 : refactor colorbar code so that no cla() is necessary when mappable is changed. -JJL 2010-03-22 : fix incorrect rubber band during the zoom mode when mouse leaves the axes. -JJL 2010-03-21 : x/y key during the zoom mode only changes the x/y limits. -JJL 2010-03-20 : Added pyplot.sca() function suggested by JJL. - EF 2010-03-20 : Added conditional support for new Tooltip API in gtk backend. - EF 2010-03-20 : Changed plt.fig_subplot() to plt.subplots() after discussion on list, and changed its API to return axes as a numpy object array (with control of dimensions via squeeze keyword). FP. 2010-03-13 : Manually brought in commits from branch: ------------------------------------------------------------------------ r8191 | leejjoon | 2010-03-13 17:27:57 -0500 (Sat, 13 Mar 2010) | 1 line fix the bug that handles for scatter are incorrectly set when dpi!=72. Thanks to Ray Speth for the bug report. 2010-03-03 : Manually brought in commits from branch via diff/patch (svnmerge is broken): ------------------------------------------------------------------------ r8175 | leejjoon | 2010-03-03 10:03:30 -0800 (Wed, 03 Mar 2010) | 1 line fix arguments of allow_rasterization.draw_wrapper ------------------------------------------------------------------------ r8174 | jdh2358 | 2010-03-03 09:15:58 -0800 (Wed, 03 Mar 2010) | 1 line added support for favicon in docs build ------------------------------------------------------------------------ r8173 | jdh2358 | 2010-03-03 08:56:16 -0800 (Wed, 03 Mar 2010) | 1 line applied Mattias get_bounds patch ------------------------------------------------------------------------ r8172 | jdh2358 | 2010-03-03 08:31:42 -0800 (Wed, 03 Mar 2010) | 1 line fix svnmerge download instructions ------------------------------------------------------------------------ r8171 | jdh2358 | 2010-03-03 07:47:48 -0800 (Wed, 03 Mar 2010) | 1 line 2010-02-25 : add annotation_demo3.py that demonstrates new functionality. -JJL 2010-02-25 : refactor Annotation to support arbitrary Transform as xycoords or textcoords. Also, if a tuple of two coordinates is provided, they are interpreted as coordinates for each x and y position. -JJL 2010-02-24 : Added pyplot.fig_subplot(), to create a figure and a group of subplots in a single call. This offers an easier pattern than manually making figures and calling add_subplot() multiple times. FP 2010-02-17 : Added Gokhan\'s and Mattias\' customizable keybindings patch for the toolbar. You can now set the keymap.\* properties in the matplotlibrc file. Newbindings were added for toggling log scaling on the x-axis. JDH 2010-02-16 : Committed TJ\'s filled marker patch for leftbottomfull filled markers. See examples/pylab_examples/filledmarker_demo.py. JDH 2010-02-11 : Added \'bootstrap\' option to boxplot. This allows bootstrap estimates of median confidence intervals. Based on an initial patch by Paul Hobson. -ADS 2010-02-06 : Added setup.cfg \"basedirlist\" option to override setting in setupext.py \"basedir\" dictionary; added \"gnu0\" platform requested by Benjamin Drung. -EF 2010-02-06 : Added \'xy\' scaling option to EllipseCollection. - EF 2010-02-03 : Made plot_directive use a custom PlotWarning category, so that warnings can be turned into fatal errors easily if desired. - FP 2010-01-29 : Added draggable method to Legend to allow mouse drag placement. Thanks Adam Fraser. JDH 2010-01-25 : Fixed a bug reported by Olle Engdegard, when using histograms with stepfilled and log=True - MM 2010-01-16 : Upgraded CXX to 6.1.1 - JDH 2009-01-16 : Don\'t create minor ticks on top of existing major ticks. Patch by Neil Crighton. -ADS 2009-01-16 : Ensure three minor ticks always drawn (SF# 2924245). Patch by Neil Crighton. -ADS 2010-01-16 : Applied patch by Ian Thomas to fix two contouring problems: now contourf handles interior masked regions, and the boundaries of line and filled contours coincide. - EF 2009-01-11 : The color of legend patch follows the rc parameters axes.facecolor and axes.edgecolor. -JJL 2009-01-11 : adjustable of Axes can be \"box-forced\" which allow sharing axes. -JJL 2009-01-11 : Add add_click and pop_click methods in BlockingContourLabeler. -JJL 2010-01-03 : Added rcParams\[\'axes.color_cycle\'\] - EF 2010-01-03 : Added Pierre\'s qt4 formlayout editor and toolbar button - JDH 2009-12-31 : Add support for using math text as marker symbols (Thanks to tcb) - MGD 2009-12-31 : Commit a workaround for a regression in PyQt4-4.6.{0,1} - DSD 2009-12-22 : Fix cmap data for gist_earth_r, etc. -JJL 2009-12-20 : spines: put spines in data coordinates, add set_bounds() call. -ADS 2009-12-18 : Don\'t limit notch size in boxplot to q1-q3 range, as this is effectively making the data look better than it is. - ADS 2009-12-18 : mlab.prctile handles even-length data, such that the median is the mean of the two middle values. - ADS 2009-12-15 : Add raw-image (unsampled) support for the ps backend. - JJL 2009-12-14 : Add patch_artist kwarg to boxplot, but keep old default. Convert boxplot_demo2.py to use the new patch_artist. - ADS 2009-12-06 : axes_grid: reimplemented AxisArtist with FloatingAxes support. Added new examples. - JJL 2009-12-01 : Applied Laurent Dufrechou\'s patch to improve blitting with the qt4 backend - DSD 2009-11-13 : The pdf backend now allows changing the contents of a pdf file\'s information dictionary via PdfPages.infodict. - JKS 2009-11-12 : font_manager.py should no longer cause EINTR on Python 2.6 (but will on the 2.5 version of subprocess). Also the fc-list command in that file was fixed so now it should actually find the list of fontconfig fonts. - JKS 2009-11-10 : Single images, and all images in renderers with option_image_nocomposite (i.e. agg, macosx and the svg backend when rcParams\[\'svg.image_noscale\'\] is True), are now drawn respecting the zorder relative to other artists. (Note that there may now be inconsistencies across backends when more than one image is drawn at varying zorders, but this change introduces correct behavior for the backends in which it\'s easy to do so.) 2009-10-21 : Make AutoDateLocator more configurable by adding options to control the maximum and minimum number of ticks. Also add control of the intervals to be used for ticking. This does not change behavior but opens previously hard-coded behavior to runtime modification\`. - RMM 2009-10-19 : Add \"path_effects\" support for Text and Patch. See examples/pylab_examples/patheffect_demo.py -JJL 2009-10-19 : Add \"use_clabeltext\" option to clabel. If True, clabels will be created with ClabelText class, which recalculates rotation angle of the label during the drawing time. -JJL 2009-10-16 : Make AutoDateFormatter actually use any specified timezone setting.This was only working correctly when no timezone was specified. - RMM 2009-09-27 : Beginnings of a capability to test the pdf backend. - JKS 2009-09-27 : Add a savefig.extension rcparam to control the default filename extension used by savefig. - JKS ------------------------------------------------------------------------ 2009-09-21 : Tagged for release 0.99.1 2009-09-20 : Fix usetex spacing errors in pdf backend. - JKS 2009-09-20 : Add Sphinx extension to highlight IPython console sessions, originally authored (I think) by Michael Droetboom. - FP 2009-09-20 : Fix off-by-one error in dviread.Tfm, and additionally protect against exceptions in case a dvi font is missing some metrics. - JKS 2009-09-15 : Implement draw_text and draw_tex method of backend_base using the textpath module. Implement draw_tex method of the svg backend. - JJL 2009-09-15 : Don\'t fail on AFM files containing floating-point bounding boxes - JKS 2009-09-13 : AxesGrid : add modified version of colorbar. Add colorbar location howto. -JJL 2009-09-07 : AxesGrid : implemented axisline style. Added a demo examples/axes_grid/demo_axisline_style.py- JJL 2009-09-04 : Make the textpath class as a separate module (textpath.py). Add support for mathtext and tex.- JJL 2009-09-01 : Added support for Gouraud interpolated triangles. pcolormesh now accepts shading=\'gouraud\' as an option. - MGD 2009-08-29 : Added matplotlib.testing package, which contains a Nose plugin and a decorator that lets tests be marked as KnownFailures - ADS 2009-08-20 : Added scaled dict to AutoDateFormatter for customized scales - JDH 2009-08-15 : Pyplot interface: the current image is now tracked at the figure and axes level, addressing tracker item 1656374. - EF 2009-08-15 : Docstrings are now manipulated with decorators defined in a new module, docstring.py, thanks to Jason Coombs. - EF 2009-08-14 : Add support for image filtering for agg back end. See the example demo_agg_filter.py. -JJL 2009-08-09 : AnnotationBbox added. Similar to Annotation, but works with OffsetBox instead of Text. See the example demo_annotation_box.py. -JJL 2009-08-07 : BboxImage implemented. Two examples, demo_bboximage.py and demo_ribbon_box.py added. - JJL 2009-08-07 : In an effort to simplify the backend API, all clipping rectangles and paths are now passed in using GraphicsContext objects, even on collections and images. Therefore: draw_path_collection(self, master_transform, cliprect, clippath, clippath_trans, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds, urls) becomes: draw_path_collection(self, gc, master_transform, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds, urls) draw_quad_mesh(self, master_transform, cliprect, clippath, clippath_trans, meshWidth, meshHeight, coordinates, offsets, offsetTrans, facecolors, antialiased, showedges) becomes: draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight, coordinates, offsets, offsetTrans, facecolors, antialiased, showedges) draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None) becomes: draw_image(self, gc, x, y, im) - MGD 2009-08-06 : Tagging the 0.99.0 release at svn r7397 - JDH - fixed an alpha colormapping bug posted on sf 2832575 - fix typo in axes_divider.py. use nanmin, nanmax in angle_helper.py (patch by Christoph Gohlke) - remove dup gui event in enter/leave events in gtk - lots of fixes for os x binaries (Thanks Russell Owen) - attach gtk events to mpl events \-- fixes sf bug 2816580 - applied sf patch 2815064 (middle button events for wx) and patch 2818092 (resize events for wx) - fixed boilerplate.py so it doesn\'t break the ReST docs. - removed a couple of cases of mlab.load - fixed rec2csv win32 file handle bug from sf patch 2831018 - added two examples from Josh Hemann: examples/pylab_examples/barchart_demo2.py and examples/pylab_examples/boxplot_demo2.py - handled sf bugs 2831556 and 2830525; better bar error messages and backend driver configs - added miktex win32 patch from sf patch 2820194 - apply sf patches 2830233 and 2823885 for osx setup and 64 bit; thanks Michiel 2009-08-04 : Made cbook.get_sample_data make use of the ETag and Last-Modified headers of mod_dav_svn. - JKS 2009-08-03 : Add PathCollection; modify contourf to use complex paths instead of simple paths with cuts. - EF 2009-08-03 : Fixed boilerplate.py so it doesn\'t break the ReST docs. - JKS 2009-08-03 : pylab no longer provides a load and save function. These are available in matplotlib.mlab, or you can use numpy.loadtxt and numpy.savetxt for text files, or np.save and np.load for binary numpy arrays. - JDH 2009-07-31 : Added cbook.get_sample_data for urllib enabled fetching and caching of data needed for examples. See examples/misc/sample_data_demo.py - JDH 2009-07-31 : Tagging 0.99.0.rc1 at 7314 - MGD 2009-07-30 : Add set_cmap and register_cmap, and improve get_cmap, to provide convenient handling of user-generated colormaps. Reorganized \_cm and cm modules. - EF 2009-07-28 : Quiver speed improved, thanks to tip by Ray Speth. -EF 2009-07-27 : Simplify argument handling code for plot method. -EF 2009-07-25 : Allow \"plot(1, 2, \'r\*\')\" to work. - EF 2009-07-22 : Added an \'interp\' keyword to griddata so the faster linear interpolation method can be chosen. Default is \'nn\', so default behavior (using natural neighbor method) is unchanged (JSW) 2009-07-22 : Improved boilerplate.py so that it generates the correct signatures for pyplot functions. - JKS 2009-07-19 : Fixed the docstring of Axes.step to reflect the correct meaning of the kwargs \"pre\" and \"post\" - See SF bug https://sourceforge.net/tracker/index.php?func=detail&aid=2823304&group_id=80706&atid=560720 - JDH 2009-07-18 : Fix support for hatches without color fills to pdf and svg backends. Add an example of that to hatch_demo.py. - JKS 2009-07-17 : Removed fossils from swig version of agg backend. - EF 2009-07-14 : initial submission of the annotation guide. -JJL 2009-07-14 : axes_grid : minor improvements in anchored_artists and inset_locator. -JJL 2009-07-14 : Fix a few bugs in ConnectionStyle algorithms. Add ConnectionPatch class. -JJL 2009-07-11 : Added a fillstyle Line2D property for half filled markers \-- see examples/pylab_examples/fillstyle_demo.py JDH 2009-07-08 : Attempt to improve performance of qt4 backend, do not call qApp.processEvents while processing an event. Thanks Ole Streicher for tracking this down - DSD 2009-06-24 : Add withheader option to mlab.rec2csv and changed use_mrecords default to False in mlab.csv2rec since this is partially broken - JDH 2009-06-24 : backend_agg.draw_marker quantizes the main path (as in the draw_path). -JJL 2009-06-24 : axes_grid: floating axis support added. - JJL 2009-06-14 : Add new command line options to backend_driver.py to support running only some directories of tests - JKS 2009-06-13 : partial cleanup of mlab and its importation in pylab - EF 2009-06-13 : Introduce a rotation_mode property for the Text artist. See examples/pylab_examples/demo_text_rotation_mode.py -JJL 2009-06-07 : add support for bz2 files per sf support request 2794556 - JDH 2009-06-06 : added a properties method to the artist and inspector to return a dict mapping property name -\> value; see sf feature request 2792183 - JDH 2009-06-06 : added Neil\'s auto minor tick patch; sf patch #2789713 - JDH 2009-06-06 : do not apply alpha to rgba color conversion if input is already rgba - JDH 2009-06-03 : axes_grid : Initial check-in of curvelinear grid support. See examples/axes_grid/demo_curvelinear_grid.py - JJL 2009-06-01 : Add set_color method to Patch - EF 2009-06-01 : Spine is now derived from Patch - ADS 2009-06-01 : use cbook.is_string_like() instead of isinstance() for spines - ADS 2009-06-01 : cla() support for spines - ADS 2009-06-01 : Removed support for gtk \< 2.4. - EF 2009-05-29 : Improved the animation_blit_qt4 example, which was a mix of the object-oriented and pylab interfaces. It is now strictly object-oriented -DSD 2009-05-28 : Fix axes_grid toolkit to work with spine patch by ADS. - JJL 2009-05-28 : Applied fbianco\'s patch to handle scroll wheel events in the qt4 backend -DSD 2009-05-26 : Add support for \"axis spines\" to have arbitrary location. -ADS 2009-05-20 : Add an empty matplotlibrc to the tests/ directory so that running tests will use the default set of rcparams rather than the user\'s config. - RMM 2009-05-19 : Axis.grid(): allow use of which=\'major,minor\' to have grid on major and minor ticks. -ADS 2009-05-18 : Make psd(), csd(), and cohere() wrap properly for complex/two-sided versions, like specgram() (SF #2791686) - RMM 2009-05-18 : Fix the linespacing bug of multiline text (#1239682). See examples/pylab_examples/multiline.py -JJL 2009-05-18 : Add *annotation_clip* attr. for text.Annotation class. If True, annotation is only drawn when the annotated point is inside the axes area. -JJL 2009-05-17 : Fix bug(#2749174) that some properties of minor ticks are not conserved -JJL 2009-05-17 : applied Michiel\'s sf patch 2790638 to turn off gtk event loop in setupext for pygtk\>=2.15.10 - JDH 2009-05-17 : applied Michiel\'s sf patch 2792742 to speed up Cairo and macosx collections; speedups can be 20x. Also fixes some bugs in which gc got into inconsistent state ------------------------------------------------------------------------ 2008-05-17 : Release 0.98.5.3 at r7107 from the branch - JDH 2009-05-13 : An optional offset and bbox support in restore_bbox. Add animation_blit_gtk2.py. -JJL 2009-05-13 : psfrag in backend_ps now uses baseline-alignment when preview.sty is used ((default is bottom-alignment). Also, a small API improvement in OffsetBox-JJL 2009-05-13 : When the x-coordinate of a line is monotonically increasing, it is now automatically clipped at the stage of generating the transformed path in the draw method; this greatly speeds up zooming and panning when one is looking at a short segment of a long time series, for example. - EF 2009-05-11 : aspect=1 in log-log plot gives square decades. -JJL 2009-05-08 : clabel takes new kwarg, rightside_up; if False, labels will not be flipped to keep them rightside-up. This allows the use of clabel to make streamfunction arrows, as requested by Evan Mason. - EF 2009-05-07 : \'labelpad\' can now be passed when setting x/y labels. This allows controlling the spacing between the label and its axis. - RMM 2009-05-06 : print_ps now uses mixed-mode renderer. Axes.draw rasterize artists whose zorder smaller than rasterization_zorder. -JJL 2009-05-06 : Per-artist Rasterization, originally by Eric Bruning. -JJ 2009-05-05 : Add an example that shows how to make a plot that updates using data from another process. Thanks to Robert Cimrman - RMM 2009-05-05 : Add Axes.get_legend_handles_labels method. - JJL 2009-05-04 : Fix bug that Text.Annotation is still drawn while set to not visible. - JJL 2009-05-04 : Added TJ\'s fill_betweenx patch - JDH 2009-05-02 : Added options to plotfile based on question from Joseph Smidt and patch by Matthias Michler. - EF 2009-05-01 : Changed add_artist and similar Axes methods to return their argument. - EF 2009-04-30 : Incorrect eps bbox for landscape mode fixed - JJL 2009-04-28 : Fixed incorrect bbox of eps output when usetex=True. - JJL 2009-04-24 : Changed use of os.open\* to instead use subprocess.Popen. os.popen\* are deprecated in 2.6 and are removed in 3.0. - RMM 2009-04-20 : Worked on axes_grid documentation. Added axes_grid.inset_locator. - JJL 2009-04-17 : Initial check-in of the axes_grid toolkit. - JJL 2009-04-17 : Added a support for bbox_to_anchor in offsetbox.AnchoredOffsetbox. Improved a documentation. - JJL 2009-04-16 : Fixed a offsetbox bug that multiline texts are not correctly aligned. -JJL 2009-04-16 : Fixed a bug in mixed mode renderer that images produced by an rasterizing backend are placed with incorrect size. - JJL 2009-04-14 : Added Jonathan Taylor\'s Reinier Heeres\' port of John Porters\' mplot3d to svn trunk. Package in mpl_toolkits.mplot3d and demo is examples/mplot3d/demo.py. Thanks Reiner 2009-04-06 : The pdf backend now escapes newlines and linefeeds in strings. Fixes sf bug #2708559; thanks to Tiago Pereira for the report. 2009-04-06 : texmanager.make_dvi now raises an error if LaTeX failed to create an output file. Thanks to Joao Luis Silva for reporting this. - JKS 2009-04-05 : \_png.read_png() reads 12 bit PNGs (patch from Tobias Wood) - ADS 2009-04-04 : Allow log axis scale to clip non-positive values to small positive value; this is useful for errorbars. - EF 2009-03-28 : Make images handle nan in their array argument. A helper, cbook.safe_masked_invalid() was added. - EF 2009-03-25 : Make contour and contourf handle nan in their Z argument. - EF 2009-03-20 : Add AuxTransformBox in offsetbox.py to support some transformation. anchored_text.py example is enhanced and renamed (anchored_artists.py). -JJL 2009-03-20 : Add \"bar\" connection style for annotation - JJL 2009-03-17 : Fix bugs in edge color handling by contourf, found by Jae-Joon Lee. - EF 2009-03-14 : Added \'LightSource\' class to colors module for creating shaded relief maps. shading_example.py added to illustrate usage. - JSW 2009-03-11 : Ensure wx version \>= 2.8; thanks to Sandro Tosi and Chris Barker. - EF 2009-03-10 : Fix join style bug in pdf. - JKS 2009-03-07 : Add pyplot access to figure number list - EF 2009-02-28 : hashing of FontProperties accounts current rcParams - JJL 2009-02-28 : Prevent double-rendering of shared axis in twinx, twiny - EF 2009-02-26 : Add optional bbox_to_anchor argument for legend class - JJL 2009-02-26 : Support image clipping in pdf backend. - JKS 2009-02-25 : Improve tick location subset choice in FixedLocator. - EF 2009-02-24 : Deprecate numerix, and strip out all but the numpy part of the code. - EF 2009-02-21 : Improve scatter argument handling; add an early error message, allow inputs to have more than one dimension. - EF 2009-02-16 : Move plot_directive.py to the installed source tree. Add support for inline code content - MGD 2009-02-16 : Move mathmpl.py to the installed source tree so it is available to other projects. - MGD 2009-02-14 : Added the legend title support - JJL 2009-02-10 : Fixed a bug in backend_pdf so it doesn\'t break when the setting pdf.use14corefonts=True is used. Added test case in unit/test_pdf_use14corefonts.py. - NGR 2009-02-08 : Added a new imsave function to image.py and exposed it in the pyplot interface - GR 2009-02-04 : Some reorganization of the legend code. anchored_text.py added as an example. - JJL 2009-02-04 : Add extent keyword arg to hexbin - ADS 2009-02-04 : Fix bug in mathtext related to dots and ldots - MGD 2009-02-03 : Change default joinstyle to round - MGD 2009-02-02 : Reduce number of marker XObjects in pdf output - JKS 2009-02-02 : Change default resolution on polar plot to 1 - MGD 2009-02-02 : Avoid malloc errors in ttconv for fonts that don\'t have e.g., PostName (a version of Tahoma triggered this) - JKS 2009-01-30 : Remove support for pyExcelerator in exceltools \-- use xlwt instead - JDH 2009-01-29 : Document \'resolution\' kwarg for polar plots. Support it when using pyplot.polar, not just Figure.add_axes. - MGD 2009-01-29 : Rework the nan-handling/clipping/quantizing/simplification framework so each is an independent part of a pipeline. Expose the C++-implementation of all of this so it can be used from all Python backends. Add rcParam \"path.simplify_threshold\" to control the threshold of similarity below which vertices will be removed. 2009-01-26 : Improved tight bbox option of the savefig. - JJL 2009-01-26 : Make curves and NaNs play nice together - MGD 2009-01-21 : Changed the defaults of acorr and xcorr to use usevlines=True, maxlags=10 and normed=True since these are the best defaults 2009-01-19 : Fix bug in quiver argument handling. - EF 2009-01-19 : Fix bug in backend_gtk: don\'t delete nonexistent toolbar. - EF 2009-01-16 : Implement bbox_inches option for savefig. If bbox_inches is \"tight\", try to determine the tight bounding box. - JJL 2009-01-16 : Fix bug in is_string_like so it doesn\'t raise an unnecessary exception. -EF 2009-01-16 : Fix an infinite recursion in the unit registry when searching for a converter for a sequence of strings. Add a corresponding test. - RM 2009-01-16 : Bugfix of C typedef of MPL_Int64 that was failing on Windows XP 64 bit, as reported by George Goussard on numpy mailing list. - ADS 2009-01-16 : Added helper function LinearSegmentedColormap.from_list to facilitate building simple custom colomaps. See examples/pylab_examples/custom_cmap_fromlist.py - JDH 2009-01-16 : Applied Michiel\'s patch for macosx backend to fix rounding bug. Closed sf bug 2508440 - JSW 2009-01-10 : Applied Michiel\'s hatch patch for macosx backend and draw_idle patch for qt. Closes sf patched 2497785 and 2468809 - JDH 2009-01-10 : Fix bug in pan/zoom with log coordinates. - EF 2009-01-06 : Fix bug in setting of dashed negative contours. - EF 2009-01-06 : Be fault tolerant when len(linestyles)\>NLev in contour. - MM 2009-01-06 : Added marginals kwarg to hexbin to plot marginal densities JDH 2009-01-06 : Change user-visible multipage pdf object to PdfPages to avoid accidents with the file-like PdfFile. - JKS 2009-01-05 : Fix a bug in pdf usetex: allow using non-embedded fonts. - JKS 2009-01-05 : optional use of preview.sty in usetex mode. - JJL 2009-01-02 : Allow multipage pdf files. - JKS 2008-12-31 : Improve pdf usetex by adding support for font effects (slanting and extending). - JKS 2008-12-29 : Fix a bug in pdf usetex support, which occurred if the same Type-1 font was used with different encodings, e.g., with Minion Pro and MnSymbol. - JKS 2008-12-20 : fix the dpi-dependent offset of Shadow. - JJL 2008-12-20 : fix the hatch bug in the pdf backend. minor update in docs and example -JJL 2008-12-19 : Add axes_locator attribute in Axes. Two examples are added. - JJL 2008-12-19 : Update Axes.legend documentation. /api/api_changes.rst is also updated to describe changes in keyword parameters. Issue a warning if old keyword parameters are used. - JJL 2008-12-18 : add new arrow style, a line + filled triangles. -JJL ------------------------------------------------------------------------ 2008-12-18 : Re-Released 0.98.5.2 from v0_98_5_maint at r6679 Released 0.98.5.2 from v0_98_5_maint at r6667 2008-12-18 : Removed configobj, experimental traits and doc/mpl_data link - JDH 2008-12-18 : Fix bug where a line with NULL data limits prevents subsequent data limits from calculating correctly - MGD 2008-12-17 : Major documentation generator changes - MGD 2008-12-17 : Applied macosx backend patch with support for path collections, quadmesh, etc\... - JDH 2008-12-17 : fix dpi-dependent behavior of text bbox and arrow in annotate -JJL 2008-12-17 : Add group id support in artist. Two examples which demonstrate svg filter are added. -JJL 2008-12-16 : Another attempt to fix dpi-dependent behavior of Legend. -JJL 2008-12-16 : Fixed dpi-dependent behavior of Legend and fancybox in Text. 2008-12-16 : Added markevery property to Line2D to support subsampling of markers - JDH 2008-12-15 : Removed mpl_data symlink in docs. On platforms that do not support symlinks, these become copies, and the font files are large, so the distro becomes unnecessarily bloated. Keeping the mpl_examples dir because relative links are harder for the plot directive and the \*.py files are not so large. - JDH 2008-12-15 : Fix \$ in non-math text with usetex off. Document differences between usetex on/off - MGD 2008-12-15 : Fix anti-aliasing when auto-snapping - MGD 2008-12-15 : Fix grid lines not moving correctly during pan and zoom - MGD 2008-12-12 : Preparations to eliminate maskedarray rcParams key: its use will now generate a warning. Similarly, importing the obsolete numerix.npyma will generate a warning. - EF 2008-12-12 : Added support for the numpy.histogram() weights parameter to the axes hist() method. Docs taken from numpy - MM 2008-12-12 : Fixed warning in hist() with numpy 1.2 - MM 2008-12-12 : Removed external packages: configobj and enthought.traits which are only required by the experimental traited config and are somewhat out of date. If needed, install them independently, see and 2008-12-12 : Added support to assign labels to histograms of multiple data. - MM ------------------------------------------------------------------------ 2008-12-11 : Released 0.98.5 at svn r6573 2008-12-11 : Use subprocess.Popen instead of os.popen in dviread (Windows problem reported by Jorgen Stenarson) - JKS 2008-12-10 : Added Michael\'s font_manager fix and Jae-Joon\'s figure/subplot fix. Bumped version number to 0.98.5 - JDH ------------------------------------------------------------------------ 2008-12-09 : Released 0.98.4 at svn r6536 2008-12-08 : Added mdehoon\'s native macosx backend from sf patch 2179017 - JDH 2008-12-08 : Removed the prints in the [set]()\*style commands. Return the list of pprinted strings instead - JDH 2008-12-08 : Some of the changes Michael made to improve the output of the property tables in the rest docs broke of made difficult to use some of the interactive doc helpers, e.g., setp and getp. Having all the rest markup in the ipython shell also confused the docstrings. I added a new rc param docstring.hardcopy, to format the docstrings differently for hard copy and other use. The ArtistInspector could use a little refactoring now since there is duplication of effort between the rest out put and the non-rest output - JDH 2008-12-08 : Updated spectral methods (psd, csd, etc.) to scale one-sided densities by a factor of 2 and, optionally, scale all densities by the sampling frequency. This gives better MatLab compatibility. -RM 2008-12-08 : Fixed alignment of ticks in colorbars. -MGD 2008-12-07 : drop the deprecated \"new\" keyword of np.histogram() for numpy 1.2 or later. -JJL 2008-12-06 : Fixed a bug in svg backend that new_figure_manager() ignores keywords arguments such as figsize, etc. -JJL 2008-12-05 : Fixed a bug that the handlelength of the new legend class set too short when numpoints=1 -JJL 2008-12-04 : Added support for data with units (e.g., dates) to Axes.fill_between. -RM 2008-12-04 : Added fancybox keyword to legend. Also applied some changes for better look, including baseline adjustment of the multiline texts so that it is center aligned. -JJL 2008-12-02 : The transmuter classes in the patches.py are reorganized as subclasses of the Style classes. A few more box and arrow styles are added. -JJL 2008-12-02 : Fixed a bug in the new legend class that didn\'t allowed a tuple of coordinate values as loc. -JJL 2008-12-02 : Improve checks for external dependencies, using subprocess (instead of deprecated popen\*) and distutils (for version checking) - DSD 2008-11-30 : Reimplementation of the legend which supports baseline alignment, multi-column, and expand mode. - JJL 2008-12-01 : Fixed histogram autoscaling bug when bins or range are given explicitly (fixes Debian bug 503148) - MM 2008-11-25 : Added rcParam axes.unicode_minus which allows plain hyphen for minus when False - JDH 2008-11-25 : Added scatterpoints support in Legend. patch by Erik Tollerud - JJL 2008-11-24 : Fix crash in log ticking. - MGD 2008-11-20 : Added static helper method BrokenHBarCollection.span_where and Axes/pyplot method fill_between. See examples/pylab/fill_between.py - JDH 2008-11-12 : Add x_isdata and y_isdata attributes to Artist instances, and use them to determine whether either or both coordinates are used when updating dataLim. This is used to fix autoscaling problems that had been triggered by axhline, axhspan, axvline, axvspan. - EF 2008-11-11 : Update the psd(), csd(), cohere(), and specgram() methods of Axes and the csd() cohere(), and specgram() functions in mlab to be in sync with the changes to psd(). In fact, under the hood, these all call the same core to do computations. - RM 2008-11-11 : Add \'pad_to\' and \'sides\' parameters to mlab.psd() to allow controlling of zero padding and returning of negative frequency components, respectively. These are added in a way that does not change the API. - RM 2008-11-10 : Fix handling of c kwarg by scatter; generalize is_string_like to accept numpy and numpy.ma string array scalars. - RM and EF 2008-11-09 : Fix a possible EINTR problem in dviread, which might help when saving pdf files from the qt backend. - JKS 2008-11-05 : Fix bug with zoom to rectangle and twin axes - MGD 2008-10-24 : Added Jae Joon\'s fancy arrow, box and annotation enhancements \-- see examples/pylab_examples/annotation_demo2.py 2008-10-23 : Autoscaling is now supported with shared axes - EF 2008-10-23 : Fixed exception in dviread that happened with Minion - JKS 2008-10-21 : set_xlim, ylim now return a copy of the viewlim array to avoid modify inplace surprises 2008-10-20 : Added image thumbnail generating function matplotlib.image.thumbnail. See examples/misc/image_thumbnail.py - JDH 2008-10-20 : Applied scatleg patch based on ideas and work by Erik Tollerud and Jae-Joon Lee. - MM 2008-10-11 : Fixed bug in pdf backend: if you pass a file object for output instead of a filename, e.g., in a wep app, we now flush the object at the end. - JKS 2008-10-08 : Add path simplification support to paths with gaps. - EF 2008-10-05 : Fix problem with AFM files that don\'t specify the font\'s full name or family name. - JKS 2008-10-04 : Added \'scilimits\' kwarg to Axes.ticklabel_format() method, for easy access to the set_powerlimits method of the major ScalarFormatter. - EF 2008-10-04 : Experimental new kwarg borderpad to replace pad in legend, based on suggestion by Jae-Joon Lee. - EF 2008-09-27 : Allow spy to ignore zero values in sparse arrays, based on patch by Tony Yu. Also fixed plot to handle empty data arrays, and fixed handling of markers in figlegend. - EF 2008-09-24 : Introduce drawstyles for lines. Transparently split linestyles like \'steps\--\' into drawstyle \'steps\' and linestyle \'\--\'. Legends always use drawstyle \'default\'. - MM 2008-09-18 : Fixed quiver and quiverkey bugs (failure to scale properly when resizing) and added additional methods for determining the arrow angles - EF 2008-09-18 : Fix polar interpolation to handle negative values of theta - MGD 2008-09-14 : Reorganized cbook and mlab methods related to numerical calculations that have little to do with the goals of those two modules into a separate module numerical_methods.py Also, added ability to select points and stop point selection with keyboard in ginput and manual contour labeling code. Finally, fixed contour labeling bug. - DMK 2008-09-11 : Fix backtick in Postscript output. - MGD 2008-09-10 : \[ 2089958 \] Path simplification for vector output backends Leverage the simplification code exposed through path_to_polygons to simplify certain well-behaved paths in the vector backends (PDF, PS and SVG). \"path.simplify\" must be set to True in matplotlibrc for this to work. - MGD 2008-09-10 : Add \"filled\" kwarg to Path.intersects_path and Path.intersects_bbox. - MGD 2008-09-07 : Changed full arrows slightly to avoid an xpdf rendering problem reported by Friedrich Hagedorn. - JKS 2008-09-07 : Fix conversion of quadratic to cubic Bezier curves in PDF and PS backends. Patch by Jae-Joon Lee. - JKS 2008-09-06 : Added 5-point star marker to plot command - EF 2008-09-05 : Fix hatching in PS backend - MGD 2008-09-03 : Fix log with base 2 - MGD 2008-09-01 : Added support for bilinear interpolation in NonUniformImage; patch by Gregory Lielens. - EF 2008-08-28 : Added support for multiple histograms with data of different length - MM 2008-08-28 : Fix step plots with log scale - MGD 2008-08-28 : Fix masked arrays with markers in non-Agg backends - MGD 2008-08-28 : Fix clip_on kwarg so it actually works correctly - MGD 2008-08-25 : Fix locale problems in SVG backend - MGD 2008-08-22 : fix quiver so masked values are not plotted - JSW 2008-08-18 : improve interactive pan/zoom in qt4 backend on windows - DSD 2008-08-11 : Fix more bugs in NaN/inf handling. In particular, path simplification (which does not handle NaNs or infs) will be turned off automatically when infs or NaNs are present. Also masked arrays are now converted to arrays with NaNs for consistent handling of masks and NaNs - MGD and EF ------------------------------------------------------------------------ 2008-08-03 : Released 0.98.3 at svn r5947 2008-08-01 : Backported memory leak fixes in \_ttconv.cpp - MGD 2008-07-31 : Added masked array support to griddata. - JSW 2008-07-26 : Added optional C and reduce_C_function arguments to axes.hexbin(). This allows hexbin to accumulate the values of C based on the x,y coordinates and display in hexagonal bins. - ADS 2008-07-24 : Deprecated (raise NotImplementedError) all the mlab2 functions from matplotlib.mlab out of concern that some of them were not clean room implementations. JDH 2008-07-24 : Rewrite of a significant portion of the clabel code (class ContourLabeler) to improve inlining. - DMK 2008-07-22 : Added Barbs polygon collection (similar to Quiver) for plotting wind barbs. Added corresponding helpers to Axes and pyplot as well. (examples/pylab_examples/barb_demo.py shows it off.) - RMM 2008-07-21 : Added scikits.delaunay as matplotlib.delaunay. Added griddata function in matplotlib.mlab, with example (griddata_demo.py) in pylab_examples. griddata function will use mpl_toolkits.\_natgrid if installed. - JSW 2008-07-21 : Re-introduced offset_copy that works in the context of the new transforms. - MGD 2008-07-21 : Committed patch by Ryan May to add get_offsets and set_offsets to Collections base class - EF 2008-07-21 : Changed the \"asarray\" strategy in image.py so that colormapping of masked input should work for all image types (thanks Klaus Zimmerman) - EF 2008-07-20 : Rewrote cbook.delete_masked_points and corresponding unit test to support rgb color array inputs, datetime inputs, etc. - EF 2008-07-20 : Renamed unit/axes_unit.py to cbook_unit.py and modified in accord with Ryan\'s move of delete_masked_points from axes to cbook. - EF 2008-07-18 : Check for nan and inf in axes.delete_masked_points(). This should help hexbin and scatter deal with nans. - ADS 2008-07-17 : Added ability to manually select contour label locations. Also added a waitforbuttonpress function. - DMK 2008-07-17 : Fix bug with NaNs at end of path (thanks, Andrew Straw for the report) -MGD 2008-07-16 : Improve error handling in texmanager, thanks to Ian Henry for reporting -DSD 2008-07-12 : Added support for external backends with the \"module://my_backend\" syntax -JDH 2008-07-11 : Fix memory leak related to shared axes. Grouper should store weak references. - MGD 2008-07-10 : Bugfix: crash displaying fontconfig pattern - MGD 2008-07-10 : Bugfix: \[ 2013963 \] update_datalim_bounds in Axes not works - MGD 2008-07-10 : Bugfix: \[ 2014183 \] multiple imshow() causes gray edges - MGD 2008-07-09 : Fix rectangular axes patch on polar plots bug - MGD 2008-07-09 : Improve mathtext radical rendering - MGD 2008-07-08 : Improve mathtext superscript placement - MGD 2008-07-07 : Fix custom scales in pcolormesh (thanks Matthew Turk) - MGD 2008-07-03 : Implemented findobj method for artist and pyplot - see examples/pylab_examples/findobj_demo.py - JDH 2008-06-30 : Another attempt to fix TextWithDash - DSD 2008-06-30 : Removed Qt4 NavigationToolbar2.destroy \-- it appears to have been unnecessary and caused a bug reported by P. Raybaut - DSD 2008-06-27 : Fixed tick positioning bug - MM 2008-06-27 : Fix dashed text bug where text was at the wrong end of the dash - MGD 2008-06-26 : Fix mathtext bug for expressions like \$[x](){leftarrow}\$ - MGD 2008-06-26 : Fix direction of horizontal/vertical hatches - MGD 2008-06-25 : Figure.figurePatch renamed Figure.patch, Axes.axesPatch renamed Axes.patch, Axes.axesFrame renamed Axes.frame, Axes.get_frame, which returns Axes.patch, is deprecated. Examples and users guide updated - JDH 2008-06-25 : Fix rendering quality of pcolor - MGD ------------------------------------------------------------------------ 2008-06-24 : Released 0.98.2 at svn r5667 - (source only for debian) JDH 2008-06-24 : Added \"transparent\" kwarg to savefig. - MGD 2008-06-24 : Applied Stefan\'s patch to draw a single centered marker over a line with numpoints==1 - JDH 2008-06-23 : Use splines to render circles in scatter plots - MGD ------------------------------------------------------------------------ 2008-06-22 : Released 0.98.1 at revision 5637 2008-06-22 : Removed axes3d support and replaced it with a NotImplementedError for one release cycle 2008-06-21 : fix marker placement bug in backend_ps - DSD 2008-06-20 : \[ 1978629 \] scale documentation missing/incorrect for log - MGD 2008-06-20 : Added closed kwarg to PolyCollection. Fixes bug \[ 1994535 \] still missing lines on graph with svn (r 5548). - MGD 2008-06-20 : Added set/get_closed method to Polygon; fixes error in hist - MM 2008-06-19 : Use relative font sizes (e.g., \'medium\' and \'large\') in rcsetup.py and matplotlibrc.template so that text will be scaled by default when changing rcParams\[\'font.size\'\] - EF 2008-06-17 : Add a generic PatchCollection class that can contain any kind of patch. -MGD 2008-06-13 : Change pie chart label alignment to avoid having labels overwrite the pie -MGD 2008-06-12 : Added some helper functions to the mathtext parser to return bitmap arrays or write pngs to make it easier to use mathtext outside the context of an mpl figure. modified the mathpng sphinxext to use the mathtext png save functionality - see examples/api/mathtext_asarray.py - JDH 2008-06-11 : Use matplotlib.mathtext to render math expressions in online docs - MGD 2008-06-11 : Move PNG loading/saving to its own extension module, and remove duplicate code in \_backend_agg.cpp and \_image.cpp that does the same thing - MGD 2008-06-11 : Numerous mathtext bugfixes, primarily related to dpi-independence - MGD 2008-06-10 : Bar now applies the label only to the first patch only, and sets \'\_[nolegend]()\' for the other patch labels. This lets autolegend work as expected for hist and bar - see https://sourceforge.net/tracker/index.php?func=detail&aid=1986597&group_id=80706&atid=560720 JDH 2008-06-10 : Fix text baseline alignment bug. \[ 1985420 \] Repair of baseline alignment in Text.\_get_layout. Thanks Stan West - MGD 2008-06-09 : Committed Gregor\'s image resample patch to downsampling images with new rcparam image.resample - JDH 2008-06-09 : Don\'t install Enthought.Traits along with matplotlib. For matplotlib developers convenience, it can still be installed by setting an option in setup.cfg while we figure decide if there is a future for the traited config - DSD 2008-06-09 : Added range keyword arg to hist() - MM 2008-06-07 : Moved list of backends to rcsetup.py; made use of lower case for backend names consistent; use validate_backend when importing backends subpackage -EF 2008-06-06 : hist() revision, applied ideas proposed by Erik Tollerud and Olle Engdegard: make histtype=\'step\' unfilled by default and introduce histtype=\'stepfilled\'; use default color cycle; introduce reverse cumulative histogram; new align keyword - MM 2008-06-06 : Fix closed polygon patch and also provide the option to not close the polygon - MGD 2008-06-05 : Fix some dpi-changing-related problems with PolyCollection, as called by Axes.scatter() - MGD 2008-06-05 : Fix image drawing so there is no extra space to the right or bottom - MGD 2006-06-04 : Added a figure title command suptitle as a Figure method and pyplot command \-- see examples/figure_title.py - JDH 2008-06-02 : Added support for log to hist with histtype=\'step\' and fixed a bug for log-scale stacked histograms - MM ------------------------------------------------------------------------ 2008-05-29 : Released 0.98.0 at revision 5314 2008-05-29 : matplotlib.image.imread now no longer always returns RGBA \-- if the image is luminance or RGB, it will return a MxN or MxNx3 array if possible. Also uint8 is no longer always forced to float. 2008-05-29 : Implement path clipping in PS backend - JDH 2008-05-29 : Fixed two bugs in texmanager.py: improved comparison of dvipng versions fixed a bug introduced when get_grey method was added - DSD 2008-05-28 : Fix crashing of PDFs in xpdf and ghostscript when two-byte characters are used with Type 3 fonts - MGD 2008-05-28 : Allow keyword args to configure widget properties as requested in http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722 - JDH 2008-05-28 : Replaced \'-\' with u\'\\u2212\' for minus sign as requested in http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720 2008-05-28 : zero width/height Rectangles no longer influence the autoscaler. Useful for log histograms with empty bins - JDH 2008-05-28 : Fix rendering of composite glyphs in Type 3 conversion (particularly as evidenced in the Eunjin.ttf Korean font) Thanks Jae-Joon Lee for finding this! 2008-05-27 : Rewrote the cm.ScalarMappable callback infrastructure to use cbook.CallbackRegistry rather than custom callback handling. Any users of add_observer/notify of the cm.ScalarMappable should use the cm.ScalarMappable.callbacksSM CallbackRegistry instead. JDH 2008-05-27 : Fix TkAgg build on Ubuntu 8.04 (and hopefully a more general solution for other platforms, too.) 2008-05-24 : Added PIL support for loading images to imread (if PIL is available) - JDH 2008-05-23 : Provided a function and a method for controlling the plot color cycle. - EF 2008-05-23 : Major revision of hist(). Can handle 2D arrays and create stacked histogram plots; keyword \'width\' deprecated and rwidth (relative width) introduced; align=\'edge\' changed to center of bin - MM 2008-05-22 : Added support for ReST-based documentation using Sphinx. Documents are located in doc/, and are broken up into a users guide and an API reference. To build, run the make.py files. Sphinx-0.4 is needed to build generate xml, which will be useful for rendering equations with mathml, use sphinx from svn until 0.4 is released - DSD 2008-05-21 : Fix segfault in TkAgg backend - MGD 2008-05-21 : Fix a \"local variable unreferenced\" bug in plotfile - MM 2008-05-19 : Fix crash when Windows cannot access the registry to determine font path \[Bug 1966974, thanks Patrik Simons\] - MGD 2008-05-16 : removed some unneeded code w/ the python 2.4 requirement. cbook no longer provides compatibility for reversed, enumerate, set or izip. removed lib/subprocess, mpl1, sandbox/units, and the swig code. This stuff should remain on the maintenance branch for archival purposes. JDH 2008-05-16 : Reorganized examples dir - JDH 2008-05-16 : Added \'elinewidth\' keyword arg to errorbar, based on patch by Christopher Brown - MM 2008-05-16 : Added \'cumulative\' keyword arg to hist to plot cumulative histograms. For normed hists, this is normalized to one - MM 2008-05-15 : Fix Tk backend segfault on some machines - MGD 2008-05-14 : Don\'t use stat on Windows (fixes font embedding problem) - MGD 2008-05-09 : Fix /singlequote (\') in Postscript backend - MGD 2008-05-08 : Fix kerning in SVG when embedding character outlines - MGD 2008-05-07 : Switched to future numpy histogram semantic in hist - MM 2008-05-06 : Fix strange colors when blitting in QtAgg and Qt4Agg - MGD 2008-05-05 : pass notify_axes_change to the figure\'s add_axobserver in the qt backends, like we do for the other backends. Thanks Glenn Jones for the report - DSD 2008-05-02 : Added step histograms, based on patch by Erik Tollerud. - MM 2008-05-02 : On PyQt \<= 3.14 there is no way to determine the underlying Qt version. \[1851364\] - MGD 2008-05-02 : Don\'t call sys.exit() when pyemf is not found \[1924199\] - MGD 2008-05-02 : Update \_subprocess.c from upstream Python 2.5.2 to get a few memory and reference-counting-related bugfixes. See bug 1949978. - MGD 2008-04-30 : Added some record array editing widgets for gtk \-- see examples/rec_edit\*.py - JDH 2008-04-29 : Fix bug in mlab.sqrtm - MM 2008-04-28 : Fix bug in SVG text with Mozilla-based viewers (the symbol tag is not supported) - MGD 2008-04-27 : Applied patch by Michiel de Hoon to add hexbin axes method and pyplot function - EF 2008-04-25 : Enforce python \>= 2.4; remove subprocess build - EF 2008-04-25 : Enforce the numpy requirement at build time - JDH 2008-04-24 : Make numpy 1.1 and python 2.3 required when importing matplotlib - EF 2008-04-24 : Fix compilation issues on VS2003 (Thanks Martin Spacek for all the help) -MGD 2008-04-24 : Fix sub/superscripts when the size of the font has been changed - MGD 2008-04-22 : Use \"svg.embed_char_paths\" consistently everywhere - MGD 2008-04-20 : Add support to MaxNLocator for symmetric axis autoscaling. - EF 2008-04-20 : Fix double-zoom bug. - MM 2008-04-15 : Speed up colormapping. - EF 2008-04-12 : Speed up zooming and panning of dense images. - EF 2008-04-11 : Fix global font rcParam setting after initialization time. - MGD 2008-04-11 : Revert commits 5002 and 5031, which were intended to avoid an unnecessary call to draw(). 5002 broke saving figures before show(). 5031 fixed the problem created in 5002, but broke interactive plotting. Unnecessary call to draw still needs resolution - DSD 2008-04-07 : Improve color validation in rc handling, suggested by Lev Givon - EF 2008-04-02 : Allow to use both linestyle definition arguments, \'-\' and \'solid\' etc. in plots/collections - MM 2008-03-27 : Fix saving to Unicode filenames with Agg backend (other backends appear to already work\...) (Thanks, Christopher Barker) - MGD 2008-03-26 : Fix SVG backend bug that prevents copying and pasting in Inkscape (thanks Kaushik Ghose) - MGD 2008-03-24 : Removed an unnecessary call to draw() in the backend_qt\* mouseReleaseEvent. Thanks to Ted Drain - DSD 2008-03-23 : Fix a pdf backend bug which sometimes caused the outermost gsave to not be balanced with a grestore. - JKS 2008-03-20 : Fixed a minor bug in ContourSet.\_process_linestyles when len(linestyles)==Nlev - MM 2008-03-19 : Changed ma import statements to \"from numpy import ma\"; this should work with past and future versions of numpy, whereas \"import numpy.ma as ma\" will work only with numpy \>= 1.05, and \"import numerix.npyma as ma\" is obsolete now that maskedarray is replacing the earlier implementation, as of numpy 1.05. 2008-03-14 : Removed an apparently unnecessary call to FigureCanvasAgg.draw in backend_qt\*agg. Thanks to Ted Drain - DSD 2008-03-10 : Workaround a bug in backend_qt4agg\'s blitting due to a buffer width/bbox width mismatch in \_backend_agg\'s copy_from_bbox - DSD 2008-02-29 : Fix class Wx toolbar pan and zoom functions (Thanks Jeff Peery) - MGD 2008-02-16 : Added some new rec array functionality to mlab (rec_summarize, rec2txt and rec_groupby). See examples/rec_groupby_demo.py. Thanks to Tim M for rec2txt. 2008-02-12 : Applied Erik Tollerud\'s span selector patch - JDH 2008-02-11 : Update plotting() doc string to refer to getp/setp. - JKS 2008-02-10 : Fixed a problem with square roots in the pdf backend with usetex. - JKS 2008-02-08 : Fixed minor \_\_str\_\_ bugs so getp(gca()) works. - JKS 2008-02-05 : Added getters for title, xlabel, ylabel, as requested by Brandon Kieth - EF 2008-02-05 : Applied Gael\'s ginput patch and created examples/ginput_demo.py - JDH 2008-02-03 : Expose interpnames, a list of valid interpolation methods, as an AxesImage class attribute. - EF 2008-02-03 : Added BoundaryNorm, with examples in colorbar_only.py and image_masked.py. - EF 2008-02-03 : Force dpi=72 in pdf backend to fix picture size bug. - JKS 2008-02-01 : Fix doubly-included font problem in Postscript backend - MGD 2008-02-01 : Fix reference leak in ft2font Glyph objects. - MGD 2008-01-31 : Don\'t use unicode strings with usetex by default - DSD 2008-01-31 : Fix text spacing problems in PDF backend with *some* fonts, such as STIXGeneral. 2008-01-31 : Fix sqrt with radical number (broken by making \[ and \] work below) - MGD 2008-01-27 : Applied Martin Teichmann\'s patch to improve the Qt4 backend. Uses Qt\'s builtin toolbars and statusbars. See bug 1828848 - DSD 2008-01-10 : Moved toolkits to mpl_toolkits, made mpl_toolkits a namespace package -JSWHIT 2008-01-10 : Use setup.cfg to set the default parameters (tkagg, numpy) when building windows installers - DSD 2008-01-10 : Fix bug displaying \[ and \] in mathtext - MGD 2008-01-10 : Fix bug when displaying a tick value offset with scientific notation. (Manifests itself as a warning that the times symbol cannot be found). -MGD 2008-01-10 : Use setup.cfg to set the default parameters (tkagg, numpy) when building windows installers - DSD ------------------------------------------------------------------------ 2008-01-06 : Released 0.91.2 at revision 4802 2007-12-26 : Reduce too-late use of matplotlib.use() to a warning instead of an exception, for backwards compatibility - EF 2007-12-25 : Fix bug in errorbar, identified by Noriko Minakawa - EF 2007-12-25 : Changed masked array importing to work with the upcoming numpy 1.05 (now the maskedarray branch) as well as with earlier versions. - EF 2007-12-16 : rec2csv saves doubles without losing precision. Also, it does not close filehandles passed in open. - JDH,ADS 2007-12-13 : Moved rec2gtk to matplotlib.toolkits.gtktools and rec2excel to matplotlib.toolkits.exceltools - JDH 2007-12-12 : Support alpha-blended text in the Agg and Svg backends - MGD 2007-12-10 : Fix SVG text rendering bug. - MGD 2007-12-10 : Increase accuracy of circle and ellipse drawing by using an 8-piece bezier approximation, rather than a 4-piece one. Fix PDF, SVG and Cairo backends so they can draw paths (meaning ellipses as well). - MGD 2007-12-07 : Issue a warning when drawing an image on a non-linear axis. - MGD 2007-12-06 : let widgets.Cursor initialize to the lower x and y bounds rather than 0,0, which can cause havoc for dates and other transforms - DSD 2007-12-06 : updated references to mpl data directories for py2exe - DSD 2007-12-06 : fixed a bug in rcsetup, see bug 1845057 - DSD 2007-12-05 : Fix how fonts are cached to avoid loading the same one multiple times. (This was a regression since 0.90 caused by the refactoring of font_manager.py) - MGD 2007-12-05 : Support arbitrary rotation of usetex text in Agg backend. - MGD 2007-12-04 : Support \'\|\' as a character in mathtext - MGD ------------------------------------------------------------------------ 2007-11-27 : Released 0.91.1 at revision 4517 ------------------------------------------------------------------------ 2007-11-27 : Released 0.91.0 at revision 4478 2007-11-13 : All backends now support writing to a file-like object, not just a regular file. savefig() can be passed a file-like object in place of a file path. - MGD 2007-11-13 : Improved the default backend selection at build time: SVG -\> Agg -\> TkAgg -\> WXAgg -\> GTK -\> GTKAgg. The last usable backend in this progression will be chosen in the default config file. If a backend is defined in setup.cfg, that will be the default backend - DSD 2007-11-13 : Improved creation of default config files at build time for traited config package - DSD 2007-11-12 : Exposed all the build options in setup.cfg. These options are read into a dict called \"options\" by setupext.py. Also, added \"-mpl\" tags to the version strings for packages provided by matplotlib. Versions provided by mpl will be identified and updated on subsequent installs - DSD 2007-11-12 : Added support for STIX fonts. A new rcParam, mathtext.fontset, can be used to choose between: \'cm\' : The TeX/LaTeX Computer Modern fonts \'stix\' : The STIX fonts (see stixfonts.org) \'stixsans\' : The STIX fonts, using sans-serif glyphs by default \'custom\' : A generic Unicode font, in which case the mathtext font must be specified using mathtext.bf, mathtext.it, mathtext.sf etc. Added a new example, stix_fonts_demo.py to show how to access different fonts and unusual symbols. - MGD 2007-11-12 : Options to disable building backend extension modules moved from setup.py to setup.cfg - DSD 2007-11-09 : Applied Martin Teichmann\'s patch 1828813: a QPainter is used in paintEvent, which has to be destroyed using the method end(). If matplotlib raises an exception before the call to end - and it does if you feed it with bad data - this method end() is never called and Qt4 will start spitting error messages 2007-11-09 : Moved pyparsing back into matplotlib namespace. Don\'t use system pyparsing, API is too variable from one release to the next - DSD 2007-11-08 : Made pylab use straight numpy instead of oldnumeric by default - EF 2007-11-08 : Added additional record array utilities to mlab (rec2excel, rec2gtk, rec_join, rec_append_field, rec_drop_field) - JDH 2007-11-08 : Updated pytz to version 2007g - DSD 2007-11-08 : Updated pyparsing to version 1.4.8 - DSD 2007-11-08 : Moved csv2rec to recutils and added other record array utilities - JDH 2007-11-08 : If available, use existing pyparsing installation - DSD 2007-11-07 : Removed old enthought.traits from lib/matplotlib, added Gael Varoquaux\'s enthought.traits-2.6b1, which is stripped of setuptools. The package is installed to site-packages if not already available - DSD 2007-11-05 : Added easy access to minor tick properties; slight mod of patch by Pierre G-M - EF 2007-11-02 : Committed Phil Thompson\'s patch 1599876, fixes to Qt4Agg backend and qt4 blitting demo - DSD 2007-11-02 : Committed Phil Thompson\'s patch 1599876, fixes to Qt4Agg backend and qt4 blitting demo - DSD 2007-10-31 : Made log color scale easier to use with contourf; automatic level generation now works. - EF 2007-10-29 : TRANSFORMS REFACTORING The primary goal of this refactoring was to make it easier to extend matplotlib to support new kinds of projections. This is primarily an internal improvement, and the possible user-visible changes it allows are yet to come. The transformation framework was completely rewritten in Python (with Numpy). This will make it easier to add news kinds of transformations without writing C/C++ code. Transforms are composed into a \'transform tree\', made of transforms whose value depends on other transforms (their children). When the contents of children change, their parents are automatically updated to reflect those changes. To do this an \"invalidation\" method is used: when children change, all of their ancestors are marked as \"invalid\". When the value of a transform is accessed at a later time, its value is recomputed only if it is invalid, otherwise a cached value may be used. This prevents unnecessary recomputations of transforms, and contributes to better interactive performance. The framework can be used for both affine and non-affine transformations. However, for speed, we want use the backend renderers to perform affine transformations whenever possible. Therefore, it is possible to perform just the affine or non-affine part of a transformation on a set of data. The affine is always assumed to occur after the non-affine. For any transform: full transform == non-affine + affine Much of the drawing has been refactored in terms of compound paths. Therefore, many methods have been removed from the backend interface and replaced with a handful to draw compound paths. This will make updating the backends easier, since there is less to update. It also should make the backends more consistent in terms of functionality. User visible changes: - POLAR PLOTS: Polar plots are now interactively zoomable, and the r-axis labels can be interactively rotated. Straight line segments are now interpolated to follow the curve of the r-axis. - Non-rectangular clipping works in more backends and with more types of objects. - Sharing an axis across figures is now done in exactly the same way as sharing an axis between two axes in the same figure: fig1 = figure() fig2 = figure() ax1 = fig1.add_subplot(111) ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1) - linestyles now include steps-pre, steps-post and steps-mid. The old step still works and is equivalent to step-pre. - Multiple line styles may be provided to a collection. See API_CHANGES for more low-level information about this refactoring. 2007-10-24 : Added ax kwarg to Figure.colorbar and pyplot.colorbar - EF 2007-10-19 : Removed a gsave/grestore pair surrounding \_draw_ps, which was causing a loss graphics state info (see \"EPS output problem - scatter & edgecolors\" on mpl-dev, 2007-10-29) - DSD 2007-10-15 : Fixed a bug in patches.Ellipse that was broken for aspect=\'auto\'. Scale free ellipses now work properly for equal and auto on Agg and PS, and they fall back on a polygonal approximation for nonlinear transformations until we convince ourselves that the spline approximation holds for nonlinear transformations. Added unit/ellipse_compare.py to compare spline with vertex approx for both aspects. JDH 2007-10-05 : remove generator expressions from texmanager and mpltraits. generator expressions are not supported by python-2.3 - DSD 2007-10-01 : Made matplotlib.use() raise an exception if called after backends has been imported. - EF 2007-09-30 : Modified update\* methods of Bbox and Interval so they work with reversed axes. Prior to this, trying to set the ticks on a reversed axis failed with an uninformative error message. - EF 2007-09-30 : Applied patches to axes3d to fix index error problem - EF 2007-09-24 : Applied Eike Welk\'s patch reported on mpl-dev on 2007-09-22 Fixes a bug with multiple plot windows in the qt backend, ported the changes to backend_qt4 as well - DSD 2007-09-21 : Changed cbook.reversed to yield the same result as the python reversed builtin - DSD 2007-09-13 : The usetex support in the pdf backend is more usable now, so I am enabling it. - JKS 2007-09-12 : Fixed a Axes.bar unit bug - JDH 2007-09-10 : Made skiprows=1 the default on csv2rec - JDH 2007-09-09 : Split out the plotting part of pylab and put it in pyplot.py; removed numerix from the remaining pylab.py, which imports everything from pyplot.py. The intention is that apart from cleanups, the result of importing from pylab is nearly unchanged, but there is the new alternative of importing from pyplot to get the state-engine graphics without all the numeric functions. Numpified examples; deleted two that were obsolete; modified some to use pyplot. - EF 2007-09-08 : Eliminated gd and paint backends - EF 2007-09-06 : .bmp file format is now longer an alias for .raw 2007-09-07 : Added clip path support to pdf backend. - JKS 2007-09-06 : Fixed a bug in the embedding of Type 1 fonts in PDF. Now it doesn\'t crash Preview.app. - JKS 2007-09-06 : Refactored image saving code so that all GUI backends can save most image types. See FILETYPES for a matrix of backends and their supported file types. Backend canvases should no longer write their own print_figure() method \-- instead they should write a print_xxx method for each filetype they can output and add an entry to their class-scoped filetypes dictionary. - MGD 2007-09-05 : Fixed Qt version reporting in setupext.py - DSD 2007-09-04 : Embedding Type 1 fonts in PDF, and thus usetex support via dviread, sort of works. To test, enable it by renaming \_draw_tex to draw_tex. - JKS 2007-09-03 : Added ability of errorbar show limits via caret or arrowhead ends on the bars; patch by Manual Metz. - EF 2007-09-03 : Created type1font.py, added features to AFM and FT2Font (see API_CHANGES), started work on embedding Type 1 fonts in pdf files. - JKS 2007-09-02 : Continued work on dviread.py. - JKS 2007-08-16 : Added a set_extent method to AxesImage, allow data extent to be modified after initial call to imshow - DSD 2007-08-14 : Fixed a bug in pyqt4 subplots-adjust. Thanks to Xavier Gnata for the report and suggested fix - DSD 2007-08-13 : Use pickle to cache entire fontManager; change to using font_manager module-level function findfont wrapper for the fontManager.findfont method - EF 2007-08-11 : Numpification and cleanup of mlab.py and some examples - EF 2007-08-06 : Removed mathtext2 2007-07-31 : Refactoring of distutils scripts. - Will not fail on the entire build if an optional Python package (e.g., Tkinter) is installed but its development headers are not (e.g., tk-devel). Instead, it will continue to build all other extensions. - Provide an overview at the top of the output to display what dependencies and their versions were found, and (by extension) what will be built. - Use pkg-config, when available, to find freetype2, since this was broken on Mac OS-X when using MacPorts in a non- standard location. 2007-07-30 : Reorganized configuration code to work with traited config objects. The new config system is located in the matplotlib.config package, but it is disabled by default. To enable it, set NEWCONFIG=True in matplotlib.\_\_init\_\_.py. The new configuration system will still use the old matplotlibrc files by default. To switch to the experimental, traited configuration, set USE_TRAITED_CONFIG=True in config.\_\_init\_\_.py. 2007-07-29 : Changed default pcolor shading to flat; added aliases to make collection kwargs agree with setter names, so updating works; related minor cleanups. Removed quiver_classic, scatter_classic, pcolor_classic. - EF 2007-07-26 : Major rewrite of mathtext.py, using the TeX box layout model. There is one (known) backward incompatible change. The font commands (cal, rm, it, tt) now behave as TeX does: they are in effect until the next font change command or the end of the grouping. Therefore uses of \$cal{R}\$ should be changed to \${cal R}\$. Alternatively, you may use the new LaTeX-style font commands (mathcal, mathrm, mathit, mathtt) which do affect the following group, e.g., \$mathcal{R}\$. Other new features include: - Math may be interspersed with non-math text. Any text with an even number of \$\'s (non-escaped) will be sent to the mathtext parser for layout. - Sub/superscripts are less likely to accidentally overlap. - Support for sub/superscripts in either order, e.g., \$x\^i_j\$ and \$x_j\^i\$ are equivalent. - Double sub/superscripts (e.g., \$x_i_j\$) are considered ambiguous and raise an exception. Use braces to disambiguate. - \$frac{x}{y}\$ can be used for displaying fractions. - \$sqrt\[3\]{x}\$ can be used to display the radical symbol with a root number and body. - \$left(frac{x}{y}right)\$ may be used to create parentheses and other delimiters that automatically resize to the height of their contents. - Spacing around operators etc. is now generally more like TeX. - Added support (and fonts) for boldface (bf) and sans-serif (sf) symbols. - Log-like function name shortcuts are supported. For example, \$sin(x)\$ may be used instead of \${rm sin}(x)\$ - Limited use of kerning for the easy case (same font) Behind the scenes, the pyparsing.py module used for doing the math parsing was updated to the latest stable version (1.4.6). A lot of duplicate code was refactored out of the Font classes. - MGD 2007-07-19 : completed numpification of most trivial cases - NN 2007-07-19 : converted non-numpy relicts throughout the code - NN 2007-07-19 : replaced the Python code in numerix/ by a minimal wrapper around numpy that explicitly mentions all symbols that need to be addressed for further numpification - NN 2007-07-18 : make usetex respect changes to rcParams. texmanager used to only configure itself when it was created, now it reconfigures when rcParams are changed. Thank you Alexander Schmolck for contributing a patch - DSD 2007-07-17 : added validation to setting and changing rcParams - DSD 2007-07-17 : bugfix segfault in transforms module. Thanks Ben North for the patch. - ADS 2007-07-16 : clean up some code in ticker.ScalarFormatter, use unicode to render multiplication sign in offset ticklabel - DSD 2007-07-16 : fixed a formatting bug in ticker.ScalarFormatter\'s scientific notation (10\^0 was being rendered as 10 in some cases) - DSD 2007-07-13 : Add MPL_isfinite64() and MPL_isinf64() for testing doubles in (the now misnamed) MPL_isnan.h. - ADS 2007-07-13 : The matplotlib.\_isnan module removed (use numpy.isnan) - ADS 2007-07-13 : Some minor cleanups in \_transforms.cpp - ADS 2007-07-13 : Removed the rest of the numerix extension code detritus, numpified axes.py, and cleaned up the imports in axes.py - JDH 2007-07-13 : Added legend.loc as configurable option that could in future default to \'best\'. - NN 2007-07-12 : Bugfixes in mlab.py to coerce inputs into numpy arrays. -ADS 2007-07-11 : Added linespacing kwarg to text.Text - EF 2007-07-11 : Added code to store font paths in SVG files. - MGD 2007-07-10 : Store subset of TTF font as a Type 3 font in PDF files. - MGD 2007-07-09 : Store subset of TTF font as a Type 3 font in PS files. - MGD 2007-07-09 : Applied Paul\'s pick restructure pick and add pickers, sourceforge patch 1749829 - JDH 2007-07-09 : Applied Allan\'s draw_lines agg optimization. JDH 2007-07-08 : Applied Carl Worth\'s patch to fix cairo draw_arc - SC 2007-07-07 : fixed bug 1712099: xpdf distiller on windows - DSD 2007-06-30 : Applied patches to tkagg, gtk, and wx backends to reduce memory leakage. Patches supplied by Mike Droettboom; see tracker numbers 1745400, 1745406, 1745408. Also made unit/memleak_gui.py more flexible with command-line options. - EF 2007-06-30 : Split defaultParams into separate file rcdefaults (together with validation code). Some heavy refactoring was necessary to do so, but the overall behavior should be the same as before. - NN 2007-06-27 : Added MPLCONFIGDIR for the default location for mpl data and configuration. useful for some apache installs where HOME is not writable. Tried to clean up the logic in \_get_config_dir to support non-writable HOME where are writable HOME/.matplotlib already exists - JDH 2007-06-27 : Fixed locale bug reported at http://sourceforge.net/tracker/index.php?func=detail&aid=1744154&group_id=80706&atid=560720 by adding a cbook.unicode_safe function - JDH 2007-06-27 : Applied Micheal\'s tk savefig bugfix described at http://sourceforge.net/tracker/index.php?func=detail&aid=1716732&group_id=80706&atid=560720 Thanks Michael! 2007-06-27 : Patch for get_py2exe_datafiles() to work with new directory layout. (Thanks Tocer and also Werner Bruhin.) -ADS 2007-06-27 : Added a scroll event to the mpl event handling system and implemented it for backends GTK\* \-- other backend users/developers/maintainers, please add support for your backend. - JDH 2007-06-25 : Changed default to clip=False in colors.Normalize; modified ColorbarBase for easier colormap display - EF 2007-06-13 : Added maskedarray option to rc, numerix - EF 2007-06-11 : Python 2.5 compatibility fix for mlab.py - EF 2007-06-10 : In matplotlibrc file, use \'dashed\' \| \'solid\' instead of a pair of floats for contour.negative_linestyle - EF 2007-06-08 : Allow plot and fill fmt string to be any mpl string colorspec - EF 2007-06-08 : Added gnuplot file plotfile function to pylab \-- see examples/plotfile_demo.py - JDH 2007-06-07 : Disable build of numarray and Numeric extensions for internal MPL use and the numerix layer. - ADS 2007-06-07 : Added csv2rec to matplotlib.mlab to support automatically converting csv files to record arrays using type introspection, and turned on native datetime support using the new units support in matplotlib.dates. See examples/loadrec.py ! JDH 2007-06-07 : Simplified internal code of \_auto_legend_data - NN 2007-06-04 : Added labeldistance arg to Axes.pie to control the raidal distance of the wedge labels - JDH 2007-06-03 : Turned mathtext in SVG into single \ with multiple \ objects (easier to edit in inkscape). - NN ------------------------------------------------------------------------ 2007-06-02 : Released 0.90.1 at revision 3352 2007-06-02 : Display only meaningful labels when calling legend() without args. - NN 2007-06-02 : Have errorbar follow the color cycle even if line is not plotted. Suppress plotting of errorbar caps for capsize=0. - NN 2007-06-02 : Set markers to same alpha value as line. - NN 2007-06-02 : Fix mathtext position in svg backend. - NN 2007-06-01 : Deprecate Numeric and numarray for use as numerix. Props to Travis \-- job well done. - ADS 2007-05-18 : Added LaTeX unicode support. Enable with the \'text.latex.unicode\' rcParam. This requires the ucs and inputenc LaTeX packages. - ADS 2007-04-23 : Fixed some problems with polar \-- added general polygon clipping to clip the lines and grids to the polar axes. Added support for set_rmax to easily change the maximum radial grid. Added support for polar legend -JDH 2007-04-16 : Added Figure.autofmt_xdate to handle adjusting the bottom and rotating the tick labels for date plots when the ticks often overlap - JDH 2007-04-09 : Beginnings of usetex support for pdf backend. -JKS 2007-04-07 : Fixed legend/LineCollection bug. Added label support to collections. - EF 2007-04-06 : Removed deprecated support for a float value as a gray-scale; now it must be a string, like \'0.5\'. Added alpha kwarg to ColorConverter.to_rgba_list. - EF 2007-04-06 : Fixed rotation of ellipses in pdf backend (sf bug #1690559) -JKS 2007-04-04 : More matshow tweaks; documentation updates; new method set_bounds() for formatters and locators. - EF 2007-04-02 : Fixed problem with imshow and matshow of integer arrays; fixed problems with changes to color autoscaling. - EF 2007-04-01 : Made image color autoscaling work correctly with a tracking colorbar; norm.autoscale now scales unconditionally, while norm.autoscale_None changes only None-valued vmin, vmax. - EF 2007-03-31 : Added a qt-based subplot-adjustment dialog - DSD 2007-03-30 : Fixed a bug in backend_qt4, reported on mpl-dev - DSD 2007-03-26 : Removed colorbar_classic from figure.py; fixed bug in Figure.clear() in which \_axobservers was not getting cleared. Modernization and cleanups. - EF 2007-03-26 : Refactored some of the units support \-- units now live in the respective x and y Axis instances. See also API_CHANGES for some alterations to the conversion interface. JDH 2007-03-25 : Fix masked array handling in quiver.py for numpy. (Numeric and numarray support for masked arrays is broken in other ways when using quiver. I didn\'t pursue that.) - ADS 2007-03-23 : Made font_manager.py close opened files. - JKS 2007-03-22 : Made imshow default extent match matshow - EF 2007-03-22 : Some more niceties for xcorr \-- a maxlags option, normed now works for xcorr as well as axorr, usevlines is supported, and a zero correlation hline is added. See examples/xcorr_demo.py. Thanks Sameer for the patch. - JDH 2007-03-21 : Axes.vlines and Axes.hlines now create and returns a LineCollection, not a list of lines. This is much faster. The kwarg signature has changed, so consult the docs. Modified Axes.errorbar which uses vlines and hlines. See API_CHANGES; the return signature for these three functions is now different 2007-03-20 : Refactored units support and added new examples - JDH 2007-03-19 : Added Mike\'s units patch - JDH 2007-03-18 : Matshow as an Axes method; test version matshow1() in pylab; added \'integer\' Boolean kwarg to MaxNLocator initializer to force ticks at integer locations. - EF 2007-03-17 : Preliminary support for clipping to paths agg - JDH 2007-03-17 : Text.set_text() accepts anything convertible with \'%s\' - EF 2007-03-14 : Add masked-array support to hist. - EF 2007-03-03 : Change barh to take a kwargs dict and pass it to bar. Fixes sf bug #1669506. 2007-03-02 : Add rc parameter pdf.inheritcolor, which disables all color-setting operations in the pdf backend. The idea is that you include the resulting file in another program and set the colors (both stroke and fill color) there, so you can use the same pdf file for e.g., a paper and a presentation and have them in the surrounding color. You will probably not want to draw figure and axis frames in that case, since they would be filled in the same color. - JKS 2007-02-26 : Prevent building \_wxagg.so with broken Mac OS X wxPython. - ADS 2007-02-23 : Require setuptools for Python 2.3 - ADS 2007-02-22 : WXAgg accelerator updates - KM WXAgg\'s C++ accelerator has been fixed to use the correct wxBitmap constructor. The backend has been updated to use new wxPython functionality to provide fast blit() animation without the C++ accelerator. This requires wxPython 2.8 or later. Previous versions of wxPython can use the C++ accelerator or the old pure Python routines. setup.py no longer builds the C++ accelerator when wxPython \>= 2.8 is present. The blit() method is now faster regardless of which agg/wxPython conversion routines are used. 2007-02-21 : Applied the PDF backend patch by Nicolas Grilly. This impacts several files and directories in matplotlib: - Created the directory lib/matplotlib/mpl-data/fonts/pdfcorefonts, holding AFM files for the 14 PDF core fonts. These fonts are embedded in every PDF viewing application. - setup.py: Added the directory pdfcorefonts to package_data. - lib/matplotlib/\_\_init\_\_.py: Added the default parameter \'pdf.use14corefonts\'. When True, the PDF backend uses only the 14 PDF core fonts. - lib/matplotlib/afm.py: Added some keywords found in recent AFM files. Added a little workaround to handle Euro symbol. - lib/matplotlib/fontmanager.py: Added support for the 14 PDF core fonts. These fonts have a dedicated cache (file pdfcorefont.cache), not the same as for other AFM files (file .afmfont.cache). Also cleaned comments to conform to CODING_GUIDE. - lib/matplotlib/backends/backend_pdf.py: Added support for 14 PDF core fonts. Fixed some issues with incorrect character widths and encodings (works only for the most common encoding, WinAnsiEncoding, defined by the official PDF Reference). Removed parameter \'dpi\' because it causes alignment issues. -JKS (patch by Nicolas Grilly) 2007-02-17 : Changed ft2font.get_charmap, and updated all the files where get_charmap is mentioned - ES 2007-02-13 : Added barcode demo- JDH 2007-02-13 : Added binary colormap to cm - JDH 2007-02-13 : Added twiny to pylab - JDH 2007-02-12 : Moved data files into lib/matplotlib so that setuptools\' develop mode works. Re-organized the mpl-data layout so that this source structure is maintained in the installation. (i.e., the \'fonts\' and \'images\' sub-directories are maintained in site-packages.) Suggest removing site-packages/matplotlib/mpl-data and \~/.matplotlib/ttffont.cache before installing - ADS 2007-02-07 : Committed Rob Hetland\'s patch for qt4: remove references to text()/latin1(), plus some improvements to the toolbar layout - DSD ------------------------------------------------------------------------ 2007-02-06 : Released 0.90.0 at revision 3003 2007-01-22 : Extended the new picker API to text, patches and patch collections. Added support for user customizable pick hit testing and attribute tagging of the PickEvent - Details and examples in examples/pick_event_demo.py - JDH 2007-01-16 : Begun work on a new pick API using the mpl event handling framework. Artists will define their own pick method with a configurable epsilon tolerance and return pick attrs. All artists that meet the tolerance threshold will fire a PickEvent with artist dependent attrs; e.g., a Line2D can set the indices attribute that shows the indices into the line that are within epsilon of the pick point. See examples/pick_event_demo.py. The implementation of pick for the remaining Artists remains to be done, but the core infrastructure at the level of event handling is in place with a proof-of-concept implementation for Line2D - JDH 2007-01-16 : src/\_image.cpp: update to use Py_ssize_t (for 64-bit systems). Use return value of fread() to prevent warning messages - SC. 2007-01-15 : src/\_image.cpp: combine buffer_argb32() and buffer_bgra32() into a new method color_conv(format) - SC 2007-01-14 : backend_cairo.py: update draw_arc() so that examples/arctest.py looks correct - SC 2007-01-12 : backend_cairo.py: enable clipping. Update draw_image() so that examples/contour_demo.py looks correct - SC 2007-01-12 : backend_cairo.py: fix draw_image() so that examples/image_demo.py now looks correct - SC 2007-01-11 : Added Axes.xcorr and Axes.acorr to plot the cross correlation of x vs. y or the autocorrelation of x. pylab wrappers also provided. See examples/xcorr_demo.py - JDH 2007-01-10 : Added \"Subplot.label_outer\" method. It will set the visibility of the ticklabels so that yticklabels are only visible in the first column and xticklabels are only visible in the last row - JDH 2007-01-02 : Added additional kwarg documentation - JDH 2006-12-28 : Improved error message for nonpositive input to log transform; added log kwarg to bar, barh, and hist, and modified bar method to behave sensibly by default when the ordinate has a log scale. (This only works if the log scale is set before or by the call to bar, hence the utility of the log kwarg.) - EF 2006-12-27 : backend_cairo.py: update draw_image() and \_draw_mathtext() to work with numpy - SC 2006-12-20 : Fixed xpdf dependency check, which was failing on windows. Removed ps2eps dependency check. - DSD 2006-12-19 : Added Tim Leslie\'s spectral patch - JDH 2006-12-17 : Added rc param \'axes.formatter.limits\' to control the default threshold for switching to scientific notation. Added convenience method Axes.ticklabel_format() for turning scientific notation on or off on either or both axes. - EF 2006-12-16 : Added ability to turn control scientific notation in ScalarFormatter - EF 2006-12-16 : Enhanced boxplot to handle more flexible inputs - EF 2006-12-13 : Replaced calls to where() in colors.py with much faster clip() and putmask() calls; removed inappropriate uses of getmaskorNone (which should be needed only very rarely); all in response to profiling by David Cournapeau. Also fixed bugs in my 2-D array support from 12-09. - EF 2006-12-09 : Replaced spy and spy2 with the new spy that combines marker and image capabilities - EF 2006-12-09 : Added support for plotting 2-D arrays with plot: columns are plotted as in Matlab - EF 2006-12-09 : Added linewidth kwarg to bar and barh; fixed arg checking bugs - EF 2006-12-07 : Made pcolormesh argument handling match pcolor; fixed kwarg handling problem noted by Pierre GM - EF 2006-12-06 : Made pcolor support vector X and/or Y instead of requiring 2-D arrays - EF 2006-12-05 : Made the default Artist.\_transform None (rather than invoking identity_transform for each artist only to have it overridden later). Use artist.get_transform() rather than artist.\_transform, even in derived classes, so that the default transform will be created lazily as needed -JDH 2006-12-03 : Added LogNorm to colors.py as illustrated by examples/pcolor_log.py, based on suggestion by Jim McDonald. Colorbar modified to handle LogNorm. Norms have additional \"inverse\" method. - EF 2006-12-02 : Changed class names in colors.py to match convention: normalize -\> Normalize, no_norm -\> NoNorm. Old names are still available. Changed \_\_init\_\_.py rc defaults to match those in matplotlibrc - EF 2006-11-22 : Fixed bug in [set]()\*lim that I had introduced on 11-15 - EF 2006-11-22 : Added examples/clippedline.py, which shows how to clip line data based on view limits \-- it also changes the marker style when zoomed in - JDH 2006-11-21 : Some spy bug-fixes and added precision arg per Robert C\'s suggestion - JDH 2006-11-19 : Added semi-automatic docstring generation detailing all the kwargs that functions take using the artist introspection tools; e.g., \'help text now details the scatter kwargs that control the Text properties - JDH 2006-11-17 : Removed obsolete scatter_classic, leaving a stub to raise NotImplementedError; same for pcolor_classic - EF 2006-11-15 : Removed obsolete pcolor_classic - EF 2006-11-15 : Fixed 1588908 reported by Russel Owen; factored nonsingular method out of ticker.py, put it into transforms.py as a function, and used it in set_xlim and set_ylim. - EF 2006-11-14 : Applied patch 1591716 by Ulf Larssen to fix a bug in apply_aspect. Modified and applied patch 1594894 by mdehoon to fix bugs and improve formatting in lines.py. Applied patch 1573008 by Greg Willden to make psd etc. plot full frequency range for complex inputs. - EF 2006-11-14 : Improved the ability of the colorbar to track changes in corresponding image, pcolor, or contourf. - EF 2006-11-11 : Fixed bug that broke Numeric compatibility; added support for alpha to colorbar. The alpha information is taken from the mappable object, not specified as a kwarg. - EF 2006-11-05 : Added broken_barh function for making a sequence of horizontal bars broken by gaps \-- see examples/broken_barh.py 2006-11-05 : Removed lineprops and markerprops from the Annotation code and replaced them with an arrow configurable with kwarg arrowprops. See examples/annotation_demo.py - JDH 2006-11-02 : Fixed a pylab subplot bug that was causing axes to be deleted with hspace or wspace equals zero in subplots_adjust - JDH 2006-10-31 : Applied axes3d patch 1587359 http://sourceforge.net/tracker/index.php?func=detail&aid=1587359&group_id=80706&atid=560722 JDH ------------------------------------------------------------------------ 2006-10-26 : Released 0.87.7 at revision 2835 2006-10-25 : Made \"tiny\" kwarg in Locator.nonsingular much smaller - EF 2006-10-17 : Closed sf bug 1562496 update line props dash/solid/cap/join styles - JDH 2006-10-17 : Complete overhaul of the annotations API and example code - See matplotlib.text.Annotation and examples/annotation_demo.py JDH 2006-10-12 : Committed Manuel Metz\'s StarPolygon code and examples/scatter_star_poly.py - JDH 2006-10-11 : commented out all default values in matplotlibrc.template Default values should generally be taken from defaultParam in \_\_init\_\_.py - the file matplotlib should only contain those values that the user wants to explicitly change from the default. (see thread \"marker color handling\" on matplotlib-devel) 2006-10-10 : Changed default comment character for load to \'#\' - JDH 2006-10-10 : deactivated rcfile-configurability of markerfacecolor and markeredgecolor. Both are now hardcoded to the special value \'auto\' to follow the line color. Configurability at run-time (using function arguments) remains functional. - NN 2006-10-07 : introduced dummy argument magnification=1.0 to FigImage.make_image to satisfy unit test figimage_demo.py The argument is not yet handled correctly, which should only show up when using non-standard DPI settings in PS backend, introduced by patch #1562394. - NN 2006-10-06 : add backend-agnostic example: simple3d.py - NN 2006-09-29 : fix line-breaking for SVG-inline images (purely cosmetic) - NN 2006-09-29 : reworked set_linestyle and set_marker markeredgecolor and markerfacecolor now default to a special value \"auto\" that keeps the color in sync with the line color further, the intelligence of axes.plot is cleaned up, improved and simplified. Complete compatibility cannot be guaranteed, but the new behavior should be much more predictable (see patch #1104615 for details) -NN 2006-09-29 : changed implementation of clip-path in SVG to work around a limitation in inkscape - NN 2006-09-29 : added two options to matplotlibrc: - svg.image_inline - svg.image_noscale see patch #1533010 for details - NN 2006-09-29 : axes.py: cleaned up kwargs checking - NN 2006-09-29 : setup.py: cleaned up setup logic - NN 2006-09-29 : setup.py: check for required pygtk versions, fixes bug #1460783 - SC ------------------------------------------------------------------------ 2006-09-27 : Released 0.87.6 at revision 2783 2006-09-24 : Added line pointers to the Annotation code, and a pylab interface. See matplotlib.text.Annotation, examples/annotation_demo.py and examples/annotation_demo_pylab.py - JDH 2006-09-18 : mathtext2.py: The SVG backend now supports the same things that the AGG backend does. Fixed some bugs with rendering, and out of bounds errors in the AGG backend - ES. Changed the return values of math_parse_s_ft2font_svg to support lines (fractions etc.) 2006-09-17 : Added an Annotation class to facilitate annotating objects and an examples file examples/annotation_demo.py. I want to add dash support as in TextWithDash, but haven\'t decided yet whether inheriting from TextWithDash is the right base class or if another approach is needed - JDH ------------------------------------------------------------------------ 2006-09-05 : Released 0.87.5 at revision 2761 2006-09-04 : Added nxutils for some numeric add-on extension code \-- specifically a better/more efficient inside polygon tester (see unit/[inside_poly]()\*.py) -JDH 2006-09-04 : Made bitstream fonts the rc default - JDH 2006-08-31 : Fixed alpha-handling bug in ColorConverter, affecting collections in general and contour/contourf in particular. - EF 2006-08-30 : ft2font.cpp: Added draw_rect_filled method (now used by mathtext2 to draw the fraction bar) to FT2Font - ES 2006-08-29 : setupext.py: wrap calls to tk.getvar() with str(). On some systems, getvar returns a Tcl_Obj instead of a string - DSD 2006-08-28 : mathtext2.py: Sub/superscripts can now be complex (i.e. fractions etc.). The demo is also updated - ES 2006-08-28 : font_manager.py: Added /usr/local/share/fonts to list of X11 font directories - DSD 2006-08-28 : mathtext2.py: Initial support for complex fractions. Also, rendering is now completely separated from parsing. The sub/superscripts now work better. Updated the mathtext2_demo.py - ES 2006-08-27 : qt backends: don\'t create a QApplication when backend is imported, do it when the FigureCanvasQt is created. Simplifies applications where mpl is embedded in qt. Updated embedding_in_qt\* examples - DSD 2006-08-27 : mathtext2.py: Now the fonts are searched in the OS font dir and in the mpl-data dir. Also env is not a dict anymore. - ES 2006-08-26 : minor changes to \_\_init\_\_.py, mathtex2_demo.py. Added matplotlibrc key \"mathtext.mathtext2\" (removed the key \"mathtext2\") - ES 2006-08-21 : mathtext2.py: Initial support for fractions Updated the mathtext2_demo.py \_mathtext_data.py: removed \"\" from the unicode dicts mathtext.py: Minor modification (because of \_mathtext_data.py)- ES 2006-08-20 : Added mathtext2.py: Replacement for mathtext.py. Supports \_ \^, rm, cal etc., sin, cos etc., unicode, recursive nestings, inline math mode. The only backend currently supported is Agg \_\_init\_\_.py: added new rc params for mathtext2 added mathtext2_demo.py example - ES 2006-08-19 : Added embedding_in_qt4.py example - DSD 2006-08-11 : Added scale free Ellipse patch for Agg - CM 2006-08-10 : Added converters to and from julian dates to matplotlib.dates (num2julian and julian2num) - JDH 2006-08-08 : Fixed widget locking so multiple widgets could share the event handling -JDH 2006-08-07 : Added scale free Ellipse patch to SVG and PS - CM 2006-08-05 : Re-organized imports in numerix for numpy 1.0b2 \-- TEO 2006-08-04 : Added draw_markers to PDF backend. - JKS 2006-08-01 : Fixed a bug in postscript\'s rendering of dashed lines - DSD 2006-08-01 : figure.py: savefig() update docstring to add support for \'format\' argument. backend_cairo.py: print_figure() add support \'format\' argument. - SC 2006-07-31 : Don\'t let postscript\'s xpdf distiller compress images - DSD 2006-07-31 : Added shallowcopy() methods to all Transformations; removed copy_bbox_transform and copy_bbox_transform_shallow from transforms.py; added offset_copy() function to transforms.py to facilitate positioning artists with offsets. See examples/transoffset.py. - EF 2006-07-31 : Don\'t let postscript\'s xpdf distiller compress images - DSD 2006-07-29 : Fixed numerix polygon bug reported by Nick Fotopoulos. Added inverse_numerix_xy() transform method. Made autoscale_view() preserve axis direction (e.g., increasing down).- EF 2006-07-28 : Added shallow bbox copy routine for transforms \-- mainly useful for copying transforms to apply offset to. - JDH 2006-07-28 : Added resize method to FigureManager class for Qt and Gtk backend - CM 2006-07-28 : Added subplots_adjust button to Qt backend - CM 2006-07-26 : Use numerix more in collections. Quiver now handles masked arrays. - EF 2006-07-22 : Fixed bug #1209354 - DSD 2006-07-22 : make scatter() work with the kwarg \"color\". Closes bug 1285750 - DSD 2006-07-20 : backend_cairo.py: require pycairo 1.2.0. print_figure() update to output SVG using cairo. 2006-07-19 : Added blitting for Qt4Agg - CM 2006-07-19 : Added lasso widget and example examples/lasso_demo.py - JDH 2006-07-18 : Added blitting for QtAgg backend - CM 2006-07-17 : Fixed bug #1523585: skip nans in semilog plots - DSD 2006-07-12 : Add support to render the scientific notation label over the right-side y-axis - DSD ------------------------------------------------------------------------ 2006-07-11 : Released 0.87.4 at revision 2558 2006-07-07 : Fixed a usetex bug with older versions of latex - DSD 2006-07-07 : Add compatibility for NumPy 1.0 - TEO 2006-06-29 : Added a Qt4Agg backend. Thank you James Amundson - DSD 2006-06-26 : Fixed a usetex bug. On Windows, usetex will process postscript output in the current directory rather than in a temp directory. This is due to the use of spaces and tildes in windows paths, which cause problems with latex. The subprocess module is no longer used. - DSD 2006-06-22 : Various changes to bar(), barh(), and hist(). Added \'edgecolor\' keyword arg to bar() and barh(). The x and y args in barh() have been renamed to width and bottom respectively, and their order has been swapped to maintain a (position, value) order ala matlab. left, height, width and bottom args can now all be scalars or sequences. barh() now defaults to edge alignment instead of center alignment. Added a keyword arg \'align\' to bar(), barh() and hist() that controls between edge or center bar alignment. Fixed ignoring the rcParams\[\'patch.facecolor\'\] for bar color in bar() and barh(). Fixed ignoring the rcParams\[\'lines.color\'\] for error bar color in bar() and barh(). Fixed a bug where patches would be cleared when error bars were plotted if rcParams\[\'axes.hold\'\] was False. - MAS 2006-06-22 : Added support for numerix 2-D arrays as alternatives to a sequence of (x,y) tuples for specifying paths in collections, quiver, contour, pcolor, transforms. Fixed contour bug involving setting limits for colormapping. Added numpy-style all() to numerix. - EF 2006-06-20 : Added custom FigureClass hook to pylab interface - see examples/custom_figure_class.py 2006-06-16 : Added colormaps from gist (gist_earth, gist_stern, gist_rainbow, gist_gray, gist_yarg, gist_heat, gist_ncar) - JW 2006-06-16 : Added a pointer to parent in figure canvas so you can access the container with fig.canvas.manager. Useful if you want to set the window title, e.g., in gtk fig.canvas.manager.window.set_title, though a GUI neutral method would be preferable JDH 2006-06-16 : Fixed colorbar.py to handle indexed colors (i.e., norm = no_norm()) by centering each colored region on its index. - EF 2006-06-15 : Added scalex and scaley to Axes.autoscale_view to support selective autoscaling just the x or y axis, and supported these command in plot so you can say plot(something, scaley=False) and just the x axis will be autoscaled. Modified axvline and axhline to support this, so for example axvline will no longer autoscale the y axis. JDH 2006-06-13 : Fix so numpy updates are backward compatible - TEO 2006-06-12 : Updated numerix to handle numpy restructuring of oldnumeric - TEO 2006-06-12 : Updated numerix.fft to handle numpy restructuring Added ImportError to numerix.linear_algebra for numpy -TEO 2006-06-11 : Added quiverkey command to pylab and Axes, using QuiverKey class in quiver.py. Changed pylab and Axes to use quiver2 if possible, but drop back to the newly-renamed quiver_classic if necessary. Modified examples/quiver_demo.py to illustrate the new quiver and quiverkey. Changed LineCollection implementation slightly to improve compatibility with PolyCollection. - EF 2006-06-11 : Fixed a usetex bug for windows, running latex on files with spaces in their names or paths was failing - DSD 2006-06-09 : Made additions to numerix, changes to quiver to make it work with all numeric flavors. - EF 2006-06-09 : Added quiver2 function to pylab and method to axes, with implementation via a Quiver class in quiver.py. quiver2 will replace quiver before the next release; it is placed alongside it initially to facilitate testing and transition. See also examples/quiver2_demo.py. - EF 2006-06-08 : Minor bug fix to make ticker.py draw proper minus signs with usetex - DSD ------------------------------------------------------------------------ 2006-06-06 : Released 0.87.3 at revision 2432 2006-05-30 : More partial support for polygons with outline or fill, but not both. Made LineCollection inherit from ScalarMappable. - EF 2006-05-29 : Yet another revision of aspect-ratio handling. - EF 2006-05-27 : Committed a patch to prevent stroking zero-width lines in the svg backend -DSD 2006-05-24 : Fixed colorbar positioning bug identified by Helge Avlesen, and improved the algorithm; added a \'pad\' kwarg to control the spacing between colorbar and parent axes. - EF 2006-05-23 : Changed color handling so that collection initializers can take any mpl color arg or sequence of args; deprecated float as grayscale, replaced by string representation of float. - EF 2006-05-19 : Fixed bug: plot failed if all points were masked - EF 2006-05-19 : Added custom symbol option to scatter - JDH 2006-05-18 : New example, multi_image.py; colorbar fixed to show offset text when the ScalarFormatter is used; FixedFormatter augmented to accept and display offset text. - EF 2006-05-14 : New colorbar; old one is renamed to colorbar_classic. New colorbar code is in colorbar.py, with wrappers in figure.py and pylab.py. Fixed aspect-handling bug reported by Michael Mossey. Made backend_bases.draw_quad_mesh() run.- EF 2006-05-08 : Changed handling of end ranges in contourf: replaced \"clip-ends\" kwarg with \"extend\". See docstring for details. -EF 2006-05-08 : Added axisbelow to rc - JDH 2006-05-08 : If using PyGTK require version 2.2+ - SC 2006-04-19 : Added compression support to PDF backend, controlled by new pdf.compression rc setting. - JKS 2006-04-19 : Added Jouni\'s PDF backend 2006-04-18 : Fixed a bug that caused agg to not render long lines 2006-04-16 : Masked array support for pcolormesh; made pcolormesh support the same combinations of X,Y,C dimensions as pcolor does; improved (I hope) description of grid used in pcolor, pcolormesh. - EF 2006-04-14 : Reorganized axes.py - EF 2006-04-13 : Fixed a bug Ryan found using usetex with sans-serif fonts and exponential tick labels - DSD 2006-04-11 : Refactored backend_ps and backend_agg to prevent module-level texmanager imports. Now these imports only occur if text.usetex rc setting is true -DSD 2006-04-10 : Committed changes required for building mpl on win32 platforms with visual studio. This allows wxpython blitting for fast animations. - CM 2006-04-10 : Fixed an off-by-one bug in Axes.change_geometry. 2006-04-10 : Fixed bug in pie charts where wedge wouldn\'t have label in legend. Submitted by Simon Hildebrandt. - ADS 2006-05-06 : Usetex makes temporary latex and dvi files in a temporary directory, rather than in the user\'s current working directory - DSD 2006-04-05 : Applied Ken\'s wx deprecation warning patch closing sf patch #1465371 - JDH 2006-04-05 : Added support for the new API in the postscript backend. Allows values to be masked using nan\'s, and faster file creation - DSD 2006-04-05 : Use python\'s subprocess module for usetex calls to external programs. subprocess catches when they exit abnormally so an error can be raised. -DSD 2006-04-03 : Fixed the bug in which widgets would not respond to events. This regressed the twinx functionality, so I also updated subplots_adjust to update axes that share an x or y with a subplot instance. - CM 2006-04-02 : Moved PBox class to transforms and deleted pbox.py; made pylab axis command a thin wrapper for Axes.axis; more tweaks to aspect-ratio handling; fixed Axes.specgram to account for the new imshow default of unit aspect ratio; made contour set the Axes.dataLim. - EF 2006-03-31 : Fixed the Qt \"Underlying C/C++ object deleted\" bug. - JRE 2006-03-31 : Applied Vasily Sulatskov\'s Qt Navigation Toolbar enhancement. - JRE 2006-03-31 : Ported Norbert\'s rewriting of Halldor\'s stineman_interp algorithm to make it numerix compatible and added code to matplotlib.mlab. See examples/interp_demo.py - JDH 2006-03-30 : Fixed a bug in aspect ratio handling; blocked potential crashes when panning with button 3; added axis(\'image\') support. - EF 2006-03-28 : More changes to aspect ratio handling; new PBox class in new file pbox.py to facilitate resizing and repositioning axes; made PolarAxes maintain unit aspect ratio. - EF 2006-03-23 : Refactored TextWithDash class to inherit from, rather than delegate to, the Text class. Improves object inspection and closes bug \# 1357969 - DSD 2006-03-22 : Improved aspect ratio handling, including pylab interface. Interactive resizing, pan, zoom of images and plots (including panels with a shared axis) should work. Additions and possible refactoring are still likely. -EF 2006-03-21 : Added another colorbrewer colormap (RdYlBu) - JSWHIT 2006-03-21 : Fixed tickmarks for logscale plots over very large ranges. Closes bug \# 1232920 - DSD 2006-03-21 : Added Rob Knight\'s arrow code; see examples/arrow_demo.py - JDH 2006-03-20 : Added support for masking values with nan\'s, using ADS\'s isnan module and the new API. Works for \*Agg backends - DSD 2006-03-20 : Added contour.negative_linestyle rcParam - ADS 2006-03-20 : Added \_isnan extension module to test for nan with Numeric - ADS 2006-03-17 : Added Paul and Alex\'s support for faceting with quadmesh in sf patch 1411223 - JDH 2006-03-17 : Added Charle Twardy\'s pie patch to support colors=None. Closes sf patch 1387861 - JDH 2006-03-17 : Applied sophana\'s patch to support overlapping axes with toolbar navigation by toggling activation with the \'a\' key. Closes sf patch 1432252 - JDH 2006-03-17 : Applied Aarre\'s linestyle patch for backend EMF; closes sf patch 1449279 -JDH 2006-03-17 : Applied Jordan Dawe\'s patch to support kwarg properties for grid lines in the grid command. Closes sf patch 1451661 - JDH 2006-03-17 : Center postscript output on page when using usetex - DSD 2006-03-17 : subprocess module built if Python \<2.4 even if subprocess can be imported from an egg - ADS 2006-03-17 : Added \_subprocess.c from Python upstream and hopefully enabled building (without breaking) on Windows, although not tested. - ADS 2006-03-17 : Updated subprocess.py to latest Python upstream and reverted name back to subprocess.py - ADS 2006-03-16 : Added John Porter\'s 3D handling code ------------------------------------------------------------------------ 2006-03-16 : Released 0.87.2 at revision 2150 2006-03-15 : Fixed bug in MaxNLocator revealed by . The main change is that Locator.nonsingular now adjusts vmin and vmax if they are nearly the same, not just if they are equal. A new kwarg, \"tiny\", sets the threshold. - EF 2006-03-14 : Added import of compatibility library for newer numpy linear_algebra - TEO 2006-03-12 : Extended \"load\" function to support individual columns and moved \"load\" and \"save\" into matplotlib.mlab so they can be used outside of pylab \-- see examples/load_converter.py - JDH 2006-03-12 : Added AutoDateFormatter and AutoDateLocator submitted by James Evans. Try the load_converter.py example for a demo. - ADS 2006-03-11 : Added subprocess module from python-2.4 - DSD 2006-03-11 : Fixed landscape orientation support with the usetex option. The backend_ps print_figure method was getting complicated, I added a \_print_figure_tex method to maintain some degree of sanity - DSD 2006-03-11 : Added \"papertype\" savefig kwarg for setting postscript papersizes. papertype and ps.papersize rc setting can also be set to \"auto\" to autoscale pagesizes - DSD 2006-03-09 : Apply P-J\'s patch to make pstoeps work on windows patch report \# 1445612 -DSD 2006-03-09 : Make backend rc parameter case-insensitive - DSD 2006-03-07 : Fixed bug in backend_ps related to C0-C6 papersizes, which were causing problems with postscript viewers. Supported page sizes include letter, legal, ledger, A0-A10, and B0-B10 - DSD ------------------------------------------------------------------------ 2006-03-07 : Released 0.87.1 2006-03-04 : backend_cairo.py: fix get_rgb() bug reported by Keith Briggs. Require pycairo 1.0.2. Support saving png to file-like objects. - SC 2006-03-03 : Fixed pcolor handling of vmin, vmax - EF 2006-03-02 : improve page sizing with usetex with the latex geometry package. Closes bug \# 1441629 - DSD 2006-03-02 : Fixed dpi problem with usetex png output. Accepted a modified version of patch \# 1441809 - DSD 2006-03-01 : Fixed axis(\'scaled\') to deal with case xmax \< xmin - JSWHIT 2006-03-01 : Added reversed colormaps (with \'\_r\' appended to name) - JSWHIT 2006-02-27 : Improved eps bounding boxes with usetex - DSD 2006-02-27 : Test svn commit, again! 2006-02-27 : Fixed two dependency checking bugs related to usetex on Windows - DSD 2006-02-27 : Made the rc deprecation warnings a little more human readable. 2006-02-26 : Update the previous gtk.main_quit() bug fix to use gtk.main_level() - SC 2006-02-24 : Implemented alpha support in contour and contourf - EF 2006-02-22 : Fixed gtk main quit bug when quit was called before mainloop. - JDH 2006-02-22 : Small change to colors.py to workaround apparent bug in numpy masked array module - JSWHIT 2006-02-22 : Fixed bug in ScalarMappable.to_rgba() reported by Ray Jones, and fixed incorrect fix found by Jeff Whitaker - EF ------------------------------------------------------------------------ 2006-02-22 : Released 0.87 2006-02-21 : Fixed portrait/landscape orientation in postscript backend - DSD 2006-02-21 : Fix bug introduced in yesterday\'s bug fix - SC 2006-02-20 : backend_gtk.py FigureCanvasGTK.draw(): fix bug reported by David Tremouilles - SC 2006-02-20 : Remove the \"pygtk.require(\'2.4\')\" error from examples/embedding_in_gtk2.py - SC 2006-02-18 : backend_gtk.py FigureCanvasGTK.draw(): simplify to use (rather than duplicate) the expose_event() drawing code - SC 2006-02-12 : Added stagger or waterfall plot capability to LineCollection; illustrated in examples/collections.py. - EF 2006-02-11 : Massive cleanup of the usetex code in the postscript backend. Possibly fixed the clipping issue users were reporting with older versions of ghostscript - DSD 2006-02-11 : Added autolim kwarg to axes.add_collection. Changed collection get_verts() methods accordingly. - EF 2006-02-09 : added a temporary rc parameter text.dvipnghack, to allow Mac users to get nice results with the usetex option. - DSD 2006-02-09 : Fixed a bug related to setting font sizes with the usetex option. - DSD 2006-02-09 : Fixed a bug related to usetex\'s latex code. - DSD 2006-02-09 : Modified behavior of font.size rc setting. You should define font.size in pts, which will set the \"medium\" or default fontsize. Special text sizes like axis labels or tick labels can be given relative font sizes like small, large, x-large, etc. and will scale accordingly. - DSD 2006-02-08 : Added py2exe specific datapath check again. Also added new py2exe helper function get_py2exe_datafiles for use in py2exe setup.py scripts. - CM 2006-02-02 : Added box function to pylab 2006-02-02 : Fixed a problem in setupext.py, tk library formatted in unicode caused build problems - DSD 2006-02-01 : Dropped TeX engine support in usetex to focus on LaTeX. - DSD 2006-01-29 : Improved usetex option to respect the serif, sans-serif, monospace, and cursive rc settings. Removed the font.latex.package rc setting, it is no longer required - DSD 2006-01-29 : Fixed tex\'s caching to include font.family rc information - DSD 2006-01-29 : Fixed subpixel rendering bug in \*Agg that was causing uneven gridlines -JDH 2006-01-28 : Added fontcmd to backend_ps\'s RendererPS.draw_tex, to support other font families in eps output - DSD 2006-01-28 : Added MaxNLocator to ticker.py, and changed contour.py to use it by default. - EF 2006-01-28 : Added fontcmd to backend_ps\'s RendererPS.draw_tex, to support other font families in eps output - DSD 2006-01-27 : Buffered reading of matplotlibrc parameters in order to allow \'verbose\' settings to be processed first (allows verbose.report during rc validation process) - DSD 2006-01-27 : Removed setuptools support from setup.py and created a separate setupegg.py file to replace it. - CM 2006-01-26 : Replaced the ugly datapath logic with a cleaner approach from . Overrides the install_data command. - CM 2006-01-24 : Don\'t use character typecodes in cntr.c \-\-- changed to use defined typenumbers instead. - TEO 2006-01-24 : Fixed some bugs in usetex\'s and ps.usedistiller\'s dependency 2006-01-24 : Added masked array support to scatter - EF 2006-01-24 : Fixed some bugs in usetex\'s and ps.usedistiller\'s dependency checking - DSD ------------------------------------------------------------------------ 2006-01-24 : Released 0.86.2 2006-01-20 : Added a converters dict to pylab load to convert selected columns to float \-- especially useful for files with date strings, uses a datestr2num converter - JDH 2006-01-20 : Added datestr2num to matplotlib dates to convert a string or sequence of strings to a matplotlib datenum 2006-01-18 : Added quadrilateral pcolormesh patch 1409190 by Alex Mont and Paul Kienzle \-- this is \*Agg only for now. See examples/quadmesh_demo.py - JDH 2006-01-18 : Added Jouni\'s boxplot patch - JDH 2006-01-18 : Added comma delimiter for pylab save - JDH 2006-01-12 : Added Ryan\'s legend patch - JDH 2006-01-12 : Fixed numpy / numeric to use .dtype.char to keep in SYNC with numpy SVN ------------------------------------------------------------------------ 2006-01-11 : Released 0.86.1 2006-01-11 : Fixed setup.py for win32 build and added rc template to the MANIFEST.in 2006-01-10 : Added xpdf distiller option. matplotlibrc ps.usedistiller can now be none, false, ghostscript, or xpdf. Validation checks for dependencies. This needs testing, but the xpdf option should produce the highest-quality output and small file sizes - DSD 2006-01-10 : For the usetex option, backend_ps now does all the LaTeX work in the os\'s temp directory - DSD 2006-01-10 : Added checks for usetex dependencies. - DSD ------------------------------------------------------------------------ 2006-01-09 : Released 0.86 2006-01-04 : Changed to support numpy (new name for scipy_core) - TEO 2006-01-04 : Added Mark\'s scaled axes patch for shared axis 2005-12-28 : Added Chris Barker\'s build_wxagg patch - JDH 2005-12-27 : Altered numerix/scipy to support new scipy package structure - TEO 2005-12-20 : Fixed Jame\'s Boyles date tick reversal problem - JDH 2005-12-20 : Added Jouni\'s rc patch to support lists of keys to set on - JDH 2005-12-12 : Updated pyparsing and mathtext for some speed enhancements (Thanks Paul McGuire) and minor fixes to scipy numerix and setuptools 2005-12-12 : Matplotlib data is now installed as package_data in the matplotlib module. This gets rid of checking the many possibilities in matplotlib.\_get_data_path() - CM 2005-12-11 : Support for setuptools/pkg_resources to build and use matplotlib as an egg. Still allows matplotlib to exist using a traditional distutils install. -ADS 2005-12-03 : Modified setup to build matplotlibrc based on compile time findings. It will set numerix in the order of scipy, numarray, Numeric depending on which are founds, and backend as in preference order GTKAgg, WXAgg, TkAgg, GTK, Agg, PS 2005-12-03 : Modified scipy patch to support Numeric, scipy and numarray Some work remains to be done because some of the scipy imports are broken if only the core is installed. e.g., apparently we need from scipy.basic.fftpack import \* rather than from scipy.fftpack import \* 2005-12-03 : Applied some fixes to Nicholas Young\'s nonuniform image patch 2005-12-01 : Applied Alex Gontmakher hatch patch - PS only for now 2005-11-30 : Added Rob McMullen\'s EMF patch 2005-11-30 : Added Daishi\'s patch for scipy 2005-11-30 : Fixed out of bounds draw markers segfault in agg 2005-11-28 : Got TkAgg blitting working 100% (cross fingers) correctly. - CM 2005-11-27 : Multiple changes in cm.py, colors.py, figure.py, image.py, contour.py, contour_demo.py; new \_cm.py, examples/image_masked.py. 1. Separated the color table data from cm.py out into a new file, \_cm.py, to make it easier to find the actual code in cm.py and to add new colormaps. Also added some line breaks to the color data dictionaries. Everything from \_cm.py is imported by cm.py, so the split should be transparent. 2. Enabled automatic generation of a colormap from a list of colors in contour; see modified examples/contour_demo.py. 3. Support for imshow of a masked array, with the ability to specify colors (or no color at all) for masked regions, and for regions that are above or below the normally mapped region. See examples/image_masked.py. 4. In support of the above, added two new classes, ListedColormap, and no_norm, to colors.py, and modified the Colormap class to include common functionality. Added a clip kwarg to the normalize class. Reworked color handling in contour.py, especially in the ContourLabeller mixin. - EF 2005-11-25 : Changed text.py to ensure color is hashable. EF ------------------------------------------------------------------------ 2005-11-16 : Released 0.85 2005-11-16 : Changed the default linewidth in rc to 1.0 2005-11-16 : Replaced agg_to_gtk_drawable with pure pygtk pixbuf code in backend_gtkagg. When the equivalent is doe for blit, the agg extension code will no longer be needed 2005-11-16 : Added a maxdict item to cbook to prevent caches from growing w/o bounds 2005-11-15 : Fixed a colorup/colordown reversal bug in finance.py \-- Thanks Gilles 2005-11-15 : Applied Jouni K Steppanen\'s boxplot patch SF patch#1349997 - JDH 2005-11-09 : added axisbelow attr for Axes to determine whether ticks and such are above or below the actors 2005-11-08 : Added Nicolas\' irregularly spaced image patch 2005-11-08 : Deprecated HorizontalSpanSelector and replaced with SpanSelection that takes a third arg, direction. The new SpanSelector supports horizontal and vertical span selection, and the appropriate min/max is returned. - CM 2005-11-08 : Added lineprops dialog for gtk 2005-11-03 : Added FIFOBuffer class to mlab to support real time feeds and examples/fifo_buffer.py 2005-11-01 : Contributed Nickolas Young\'s patch for afm mathtext to support mathtext based upon the standard postscript Symbol font when ps.usetex = True. 2005-10-26 : Added support for scatter legends - thanks John Gill 2005-10-20 : Fixed image clipping bug that made some tex labels disappear. JDH 2005-10-14 : Removed sqrt from dvipng 1.6 alpha channel mask. 2005-10-14 : Added width kwarg to hist function 2005-10-10 : Replaced all instances of os.rename with shutil.move 2005-10-05 : Added Michael Brady\'s ydate patch 2005-10-04 : Added rkern\'s texmanager patch 2005-09-25 : contour.py modified to use a single ContourSet class that handles filled contours, line contours, and labels; added keyword arg (clip_ends) to contourf. Colorbar modified to work with new ContourSet object; if the ContourSet has lines rather than polygons, the colorbar will follow suit. Fixed a bug introduced in 0.84, in which contourf(\...,colors=\...) was broken - EF ------------------------------------------------------------------------ 2005-09-19 : Released 0.84 2005-09-14 : Added a new \'resize_event\' which triggers a callback with a backend_bases.ResizeEvent object - JDH 2005-09-14 : font_manager.py: removed chkfontpath from x11FontDirectory() - SC 2005-09-14 : Factored out auto date locator/formatter factory code into matplotlib.date.date_ticker_factory; applies John Bryne\'s quiver patch. 2005-09-13 : Added Mark\'s axes positions history patch #1286915 2005-09-09 : Added support for auto canvas resizing with: fig.set_figsize_inches(9,5,forward=True) # inches OR: fig.resize(400,300) # pixels 2005-09-07 : figure.py: update Figure.draw() to use the updated renderer.draw_image() so that examples/figimage_demo.py works again. examples/stock_demo.py: remove data_clipping (which no longer exists) - SC 2005-09-06 : Added Eric\'s tick.direction patch: in or out in rc 2005-09-06 : Added Martin\'s rectangle selector widget 2005-09-04 : Fixed a logic err in text.py that was preventing rgxsuper from matching -JDH 2005-08-29 : Committed Ken\'s wx blit patch #1275002 2005-08-26 : colorbar modifications - now uses contourf instead of imshow so that colors used by contourf are displayed correctly. Added two new keyword args (cspacing and clabels) that are only relevant for ContourMappable images -JSWHIT 2005-08-24 : Fixed a PS image bug reported by Darren - JDH 2005-08-23 : colors.py: change hex2color() to accept unicode strings as well as normal strings. Use isinstance() instead of types.IntType etc - SC 2005-08-16 : removed data_clipping line and rc property - JDH 2005-08-22 : backend_svg.py: Remove redundant \"x=0.0 y=0.0\" from svg element. Increase svg version from 1.0 to 1.1. Add viewBox attribute to svg element to allow SVG documents to scale-to-fit into an arbitrary viewport - SC 2005-08-16 : Added Eric\'s dot marker patch - JDH 2005-08-08 : Added blitting/animation for TkAgg - CM 2005-08-05 : Fixed duplicate tickline bug - JDH 2005-08-05 : Fixed a GTK animation bug that cropped up when doing animations in gtk//gtkagg canvases that had widgets packed above them 2005-08-05 : Added Clovis Goldemberg patch to the tk save dialog 2005-08-04 : Removed origin kwarg from backend.draw_image. origin is handled entirely by the frontend now. 2005-07-03 : Fixed a bug related to TeX commands in backend_ps 2005-08-03 : Fixed SVG images to respect upper and lower origins. 2005-08-03 : Added flipud method to image and removed it from to_str. 2005-07-29 : Modified figure.figaspect to take an array or number; modified backend_svg to write utf-8 - JDH 2005-07-30 : backend_svg.py: embed png image files in svg rather than linking to a separate png file, fixes bug #1245306 (thanks to Norbert Nemec for the patch) - SC ------------------------------------------------------------------------ 2005-07-29 : Released 0.83.2 2005-07-27 : Applied SF patch 1242648: minor rounding error in IndexDateFormatter in dates.py 2005-07-27 : Applied sf patch 1244732: Scale axis such that circle looks like circle -JDH 2005-07-29 : Improved message reporting in texmanager and backend_ps - DSD 2005-07-28 : backend_gtk.py: update FigureCanvasGTK.draw() (needed due to the recent expose_event() change) so that examples/anim.py works in the usual way - SC 2005-07-26 : Added new widgets Cursor and HorizontalSpanSelector to matplotlib.widgets. See examples/widgets/cursor.py and examples/widgets/span_selector.py - JDH 2005-07-26 : added draw event to mpl event hierarchy \-- triggered on figure.draw 2005-07-26 : backend_gtk.py: allow \'f\' key to toggle window fullscreen mode 2005-07-26 : backend_svg.py: write \"\<\.../\>\" elements all on one line and remove surplus spaces - SC 2005-07-25 : backend_svg.py: simplify code by deleting GraphicsContextSVG and RendererSVG.new_gc(), and moving the gc.get_capstyle() code into RendererSVG.\_get_gc_props_svg() - SC 2005-07-24 : backend_gtk.py: call FigureCanvasBase.motion_notify_event() on all motion-notify-events, not just ones where a modifier key or button has been pressed (fixes bug report from Niklas Volbers) - SC 2005-07-24 : backend_gtk.py: modify print_figure() use own pixmap, fixing problems where print_figure() overwrites the display pixmap. return False from all button/key etc events - to allow the event to propagate further - SC 2005-07-23 : backend_gtk.py: change expose_event from using set_back_pixmap(); clear() to draw_drawable() - SC 2005-07-23 : backend_gtk.py: removed pygtk.require() matplotlib/\_\_init\_\_.py: delete \'FROZEN\' and \'McPLError\' which are no longer used - SC 2005-07-22 : backend_gdk.py: removed pygtk.require() - SC 2005-07-21 : backend_svg.py: Remove unused imports. Remove methods doc strings which just duplicate the docs from backend_bases.py. Rename draw_mathtext to \_draw_mathtext. - SC 2005-07-17 : examples/embedding_in_gtk3.py: new example demonstrating placing a FigureCanvas in a gtk.ScrolledWindow - SC 2005-07-14 : Fixed a Windows related bug (#1238412) in texmanager - DSD 2005-07-11 : Fixed color kwarg bug, setting color=1 or 0 caused an exception - DSD 2005-07-07 : Added Eric\'s MA set_xdata Line2D fix - JDH 2005-07-06 : Made HOME/.matplotlib the new config dir where the matplotlibrc file, the ttf.cache, and the tex.cache live. The new default filenames in .matplotlib have no leading dot and are not hidden. e.g., the new names are matplotlibrc tex.cache ttffont.cache. This is how ipython does it so it must be right. If old files are found, a warning is issued and they are moved to the new location. Also fixed texmanager to put all files, including temp files in \~/.matplotlib/tex.cache, which allows you to usetex in non-writable dirs. 2005-07-05 : Fixed bug #1231611 in subplots adjust layout. The problem was that the text caching mechanism was not using the transformation affine in the key. - JDH 2005-07-05 : Fixed default backend import problem when using API (SF bug \# 1209354 -see API_CHANGES for more info - JDH 2005-07-04 : backend_gtk.py: require PyGTK version 2.0.0 or higher - SC 2005-06-30 : setupext.py: added numarray_inc_dirs for building against numarray when not installed in standard location - ADS 2005-06-27 : backend_svg.py: write figure width, height as int, not float. Update to fix some of the pychecker warnings - SC 2005-06-23 : Updated examples/agg_test.py to demonstrate curved paths and fills - JDH 2005-06-21 : Moved some texmanager and backend_agg tex caching to class level rather than instance level - JDH 2005-06-20 : setupext.py: fix problem where \_nc_backend_gdk is installed to the wrong directory - SC 2005-06-19 : Added 10.4 support for CocoaAgg. - CM 2005-06-18 : Move Figure.get_width_height() to FigureCanvasBase and return int instead of float. - SC 2005-06-18 : Applied Ted Drain\'s QtAgg patch: 1) Changed the toolbar to be a horizontal bar of push buttons instead of a QToolbar and updated the layout algorithms in the main window accordingly. This eliminates the ability to drag and drop the toolbar and detach it from the window. 2) Updated the resize algorithm in the main window to show the correct size for the plot widget as requested. This works almost correctly right now. It looks to me like the final size of the widget is off by the border of the main window but I haven\'t figured out a way to get that information yet. We could just add a small margin to the new size but that seems a little hacky. 3) Changed the x/y location label to be in the toolbar like the Tk backend instead of as a status line at the bottom of the widget. 4) Changed the toolbar pixmaps to use the ppm files instead of the png files. I noticed that the Tk backend buttons looked much nicer and it uses the ppm files so I switched them. 2005-06-17 : Modified the gtk backend to not queue mouse motion events. This allows for live updates when dragging a slider. - CM 2005-06-17 : Added starter CocoaAgg backend. Only works on OS 10.3 for now and requires PyObjC. (10.4 is high priority) - CM 2005-06-17 : Upgraded pyparsing and applied Paul McGuire\'s suggestions for speeding things up. This more than doubles the speed of mathtext in my simple tests. JDH 2005-06-16 : Applied David Cooke\'s subplot make_key patch ------------------------------------------------------------------------ ## 0.82 (2005-06-15) 2005-06-15 : Added subplot config tool to GTK\* backends \-- note you must now import the NavigationToolbar2 from your backend of choice rather than from backend_gtk because it needs to know about the backend specific canvas \-- see examples/embedding_in_gtk2.py. Ditto for wx backend \-- see examples/embedding_in_wxagg.py 2005-06-15 : backend_cairo.py: updated to use pycairo 0.5.0 - SC 2005-06-14 : Wrote some GUI neutral widgets (Button, Slider, RadioButtons, CheckButtons) in matplotlib.widgets. See examples/widgets/\*.py - JDH 2005-06-14 : Exposed subplot parameters as rc vars and as the fig SubplotParams instance subplotpars. See figure.SubplotParams, figure.Figure.subplots_adjust and the pylab method subplots_adjust and examples/subplots_adjust.py . Also added a GUI neutral widget for adjusting subplots, see examples/subplot_toolbar.py - JDH 2005-06-13 : Exposed cap and join style for lines with new rc params and line properties: lines.dash_joinstyle : miter # miter|round|bevel lines.dash_capstyle : butt # butt|round|projecting lines.solid_joinstyle : miter # miter|round|bevel lines.solid_capstyle : projecting # butt|round|projecting 2005-06-13 : Added kwargs to Axes init 2005-06-13 : Applied Baptiste\'s tick patch - JDH 2005-06-13 : Fixed rc alias \'l\' bug reported by Fernando by removing aliases for mainlevel rc options. - JDH 2005-06-10 : Fixed bug #1217637 in ticker.py - DSD 2005-06-07 : Fixed a bug in texmanager.py: .aux files not being removed - DSD 2005-06-08 : Added Sean Richard\'s hist binning fix \-- see API_CHANGES - JDH 2005-06-07 : Fixed a bug in texmanager.py: .aux files not being removed - DSD ------------------------------------------------------------------------ ## 0.81 (2005-06-07) 2005-06-06 : Added autoscale_on prop to axes 2005-06-06 : Added Nick\'s picker \"among\" patch - JDH 2005-06-05 : Fixed a TeX/LaTeX font discrepancy in backend_ps. - DSD 2005-06-05 : Added a ps.distill option in rc settings. If True, postscript output will be distilled using ghostscript, which should trim the file size and allow it to load more quickly. Hopefully this will address the issue of large ps files due to font definitions. Tested with gnu-ghostscript-8.16. - DSD 2005-06-03 : Improved support for tex handling of text in backend_ps. - DSD 2005-06-03 : Added rc options to render text with tex or latex, and to select the latex font package. - DSD 2005-06-03 : Fixed a bug in ticker.py causing a ZeroDivisionError 2005-06-02 : backend_gtk.py remove DBL_BUFFER, add line to expose_event to try to fix pygtk 2.6 redraw problem - SC 2005-06-01 : The default behavior of ScalarFormatter now renders scientific notation and large numerical offsets in a label at the end of the axis. - DSD 2005-06-01 : Added Nicholas\' frombyte image patch - JDH 2005-05-31 : Added vertical TeX support for agg - JDH 2005-05-31 : Applied Eric\'s cntr patch - JDH 2005-05-27 : Finally found the pesky agg bug (which Maxim was kind enough to fix within hours) that was causing a segfault in the win32 cached marker drawing. Now windows users can get the enormous performance benefits of cached markers w/o those occasional pesy screenshots. - JDH 2005-05-27 : Got win32 build system working again, using a more recent version of gtk and pygtk in the win32 build, gtk 2.6 from (you will also need libpng12.dll to use these). I haven\'t tested whether this binary build of mpl for win32 will work with older gtk runtimes, so you may need to upgrade. 2005-05-27 : Fixed bug where 2nd wxapp could be started if using wxagg backend. - ADS 2005-05-26 : Added Daishi text with dash patch \-- see examples/dashtick.py 2005-05-26 : Moved backend_latex functionality into backend_ps. If text.usetex=True, the PostScript backend will use LaTeX to generate the .ps or .eps file. Ghostscript is required for eps output. - DSD 2005-05-24 : Fixed alignment and color issues in latex backend. - DSD 2005-05-21 : Fixed raster problem for small rasters with dvipng \-- looks like it was a premultiplied alpha problem - JDH 2005-05-20 : Added linewidth and faceted kwarg to scatter to control edgewidth and color. Also added autolegend patch to inspect line segments. 2005-05-18 : Added Orsay and JPL qt fixes - JDH 2005-05-17 : Added a psfrag latex backend \-- some alignment issues need to be worked out. Run with -dLaTeX and a *.tex file and*.eps file are generated. latex and dvips the generated latex file to get ps output. Note xdvi *does* not work, you must generate ps.- JDH 2005-05-13 : Added Florent Rougon\'s Axis set_label1 patch 2005-05-17 : pcolor optimization, fixed bug in previous pcolor patch - JSWHIT 2005-05-16 : Added support for masked arrays in pcolor - JSWHIT 2005-05-12 : Started work on TeX text for antigrain using pngdvi \-- see examples/tex_demo.py and the new module matplotlib.texmanager. Rotated text not supported and rendering small glyphs is not working right yet. But large fontsizes and/or high dpi saved figs work great. 2005-05-10 : New image resize options interpolation options. New values for the interp kwarg are > \'nearest\', \'bilinear\', \'bicubic\', \'spline16\', > \'spline36\', \'hanning\', \'hamming\', \'hermite\', \'kaiser\', > \'quadric\', \'catrom\', \'gaussian\', \'bessel\', \'mitchell\', > \'sinc\', \'lanczos\', \'blackman\' See help(imshow) for details, particularly the interpolation, filternorm and filterrad kwargs 2005-05-10 : Applied Eric\'s contour mem leak fixes - JDH 2005-05-10 : Extended python agg wrapper and started implementing backend_agg2, an agg renderer based on the python wrapper. This will be more flexible and easier to extend than the current backend_agg. See also examples/agg_test.py - JDH 2005-05-09 : Added Marcin\'s no legend patch to exclude lines from the autolegend builder: plot(x, y, label='nolegend') 2005-05-05 : Upgraded to agg23 2005-05-05 : Added newscalarformatter_demo.py to examples. -DSD 2005-05-04 : Added NewScalarFormatter. Improved formatting of ticklabels, scientific notation, and the ability to plot large numbers with small ranges, by determining a numerical offset. See ticker.NewScalarFormatter for more details. -DSD 2005-05-03 : Added the option to specify a delimiter in pylab.load -DSD 2005-04-28 : Added Darren\'s line collection example 2005-04-28 : Fixed aa property in agg - JDH 2005-04-27 : Set postscript page size in .matplotlibrc - DSD 2005-04-26 : Added embedding in qt example. - JDH 2005-04-14 : Applied Michael Brady\'s qt backend patch: 1) fix a bug where keyboard input was grabbed by the figure and not released 2) turn on cursor changes 3) clean up a typo and commented-out print statement. - JDH 2005-04-14 : Applied Eric Firing\'s masked data lines patch and contour patch. Support for masked arrays has been added to the plot command and to the Line2D object. Only the valid points are plotted. A \"valid_only\" kwarg was added to the get_xdata() and get_ydata() methods of Line2D; by default it is False, so that the original data arrays are returned. Setting it to True returns the plottable points. - see examples/masked_demo.py - JDH 2005-04-13 : Applied Tim Leslie\'s arrow key event handling patch - JDH ------------------------------------------------------------------------ ## 0.80 2005-04-11 : Applied a variant of rick\'s xlim/ylim/axis patch. These functions now take kwargs to let you selectively alter only the min or max if desired. e.g., xlim(xmin=2) or axis(ymax=3). They always return the new lim. - JDH 2005-04-11 : Incorporated Werner\'s wx patch \-- wx backend should be compatible with wxpython2.4 and recent versions of 2.5. Some early versions of wxpython 2.5 will not work because there was a temporary change in the dc API that was rolled back to make it 2.4 compliant 2005-04-11 : modified tkagg show so that new figure window pops up on call to figure 2005-04-11 : fixed wxapp init bug 2005-04-02 : updated backend_ps.draw_lines, draw_markers for use with the new API - DSD 2005-04-01 : Added editable polygon example ------------------------------------------------------------------------ ## 0.74 (2005-03-31) 2005-03-30 : Fixed and added checks for floating point inaccuracy in ticker.Base - DSD 2005-03-30 : updated /ellipse definition in backend_ps.py to address bug #1122041 - DSD 2005-03-29 : Added unicode support for Agg and PS - JDH 2005-03-28 : Added Jarrod\'s svg patch for text - JDH 2005-03-28 : Added Ludal\'s arrow and quiver patch - JDH 2005-03-28 : Added label kwarg to Axes to facilitate forcing the creation of new Axes with otherwise identical attributes 2005-03-28 : Applied boxplot and OSX font search patches 2005-03-27 : Added ft2font NULL check to fix Japanese font bug - JDH 2005-03-27 : Added sprint legend patch plus John Gill\'s tests and fix \-- see examples/legend_auto.py - JDH ------------------------------------------------------------------------ ## 0.73.1 (2005-03-19) 2005-03-19 : Reverted wxapp handling because it crashed win32 - JDH 2005-03-18 : Add .number attribute to figure objects returned by figure() - FP ------------------------------------------------------------------------ ## 0.73 (2005-03-18) 2005-03-16 : Fixed labelsep bug 2005-03-16 : Applied Darren\'s ticker fix for small ranges - JDH 2005-03-16 : Fixed tick on horiz colorbar - JDH 2005-03-16 : Added Japanese winreg patch - JDH 2005-03-15 : backend_gtkagg.py: changed to use double buffering, this fixes the problem reported Joachim Berdal Haga - \"Parts of plot lagging from previous frame in animation\". Tested with anim.py and it makes no noticeable difference to performance (23.7 before, 23.6 after) - SC 2005-03-14 : add src/\_backend_gdk.c extension to provide a substitute function for pixbuf.get_pixels_array(). Currently pixbuf.get_pixels_array() only works with Numeric, and then only works if pygtk has been compiled with Numeric support. The change provides a function pixbuf_get_pixels_array() which works with Numeric and numarray and is always available. It means that backend_gtk should be able to display images and mathtext in all circumstances. - SC 2005-03-11 : Upgraded CXX to 5.3.1 2005-03-10 : remove GraphicsContextPS.set_linestyle() and GraphicsContextSVG.set_linestyle() since they do no more than the base class GraphicsContext.set_linestyle() - SC 2005-03-09 : Refactored contour functionality into dedicated module 2005-03-09 : Added Eric\'s contourf updates and Nadia\'s clabel functionality 2005-03-09 : Moved colorbar to figure.Figure to expose it for API developers - JDH 2005-03-09 : backend_cairo.py: implemented draw_markers() - SC 2005-03-09 : cbook.py: only use enumerate() (the python version) if the builtin version is not available. Add new function \'izip\' which is set to itertools.izip if available and the python equivalent if not available. - SC 2005-03-07 : backend_gdk.py: remove PIXELS_PER_INCH from points_to_pixels(), but still use it to adjust font sizes. This allows the GTK version of line_styles.py to more closely match GTKAgg, previously the markers were being drawn too large. - SC 2005-03-01 : Added Eric\'s contourf routines 2005-03-01 : Added start of proper agg SWIG wrapper. I would like to expose agg functionality directly a the user level and this module will serve that purpose eventually, and will hopefully take over most of the functionality of the current \_image and \_backend_agg modules. - JDH 2005-02-28 : Fixed polyfit / polyval to convert input args to float arrays - JDH 2005-02-25 : Add experimental feature to backend_gtk.py to enable/disable double buffering (DBL_BUFFER=True/False) - SC 2005-02-24 : colors.py change ColorConverter.to_rgb() so it always returns rgb (and not rgba), allow cnames keys to be cached, change the exception raised from RuntimeError to ValueError (like hex2color()) hex2color() use a regular expression to check the color string is valid - SC 2005-02-23 : Added rc param ps.useafm so backend ps can use native afm fonts or truetype. afme breaks mathtext but causes much smaller font sizes and may result in images that display better in some contexts (e.g., pdfs incorporated into latex docs viewed in acrobat reader). I would like to extend this approach to allow the user to use truetype only for mathtext, which should be easy. 2005-02-23 : Used sequence protocol rather than tuple in agg collection drawing routines for greater flexibility - JDH ------------------------------------------------------------------------ ## 0.72.1 (2005-02-22) 2005-02-21 : fixed linestyles for collections \-- contour now dashes for levels \<0 2005-02-21 : fixed ps color bug - JDH 2005-02-15 : fixed missing qt file 2005-02-15 : banished error_msg and report_error. Internal backend methods like error_msg_gtk are preserved. backend writers, check your backends, and diff against 0.72 to make sure I did the right thing! - JDH 2005-02-14 : Added enthought traits to matplotlib tree - JDH ------------------------------------------------------------------------ ## 0.72 (2005-02-14) 2005-02-14 : fix bug in cbook alltrue() and onetrue() - SC 2005-02-11 : updated qtagg backend from Ted - JDH 2005-02-11 : matshow fixes for figure numbering, return value and docs - FP 2005-02-09 : new zorder example for fine control in zorder_demo.py - FP 2005-02-09 : backend renderer draw_lines now has transform in backend, as in draw_markers; use numerix in \_backend_agg, added small line optimization to agg 2005-02-09 : subplot now deletes axes that it overlaps 2005-02-08 : Added transparent support for gzipped files in load/save - Fernando Perez (FP from now on). 2005-02-08 : Small optimizations in PS backend. They may have a big impact for large plots, otherwise they don\'t hurt - FP 2005-02-08 : Added transparent support for gzipped files in load/save - Fernando Perez (FP from now on). 2005-02-07 : Added newstyle path drawing for markers - only implemented in agg currently - JDH 2005-02-05 : Some superscript text optimizations for ticking log plots 2005-02-05 : Added some default key press events to pylab figures: \'g\' toggles grid -JDH 2005-02-05 : Added some support for handling log switching for lines that have nonpos data - JDH 2005-02-04 : Added Nadia\'s contour patch - contour now has matlab compatible syntax; this also fixed an unequal sized contour array bug- JDH 2005-02-04 : Modified GTK backends to allow the FigureCanvas to be resized smaller than its original size - SC 2005-02-02 : Fixed a bug in dates mx2num - JDH 2005-02-02 : Incorporated Fernando\'s matshow - JDH 2005-02-01 : Added Fernando\'s figure num patch, including experimental support for pylab backend switching, LineCOllection.color warns, savefig now a figure method, fixed a close(fig) bug - JDH 2005-01-31 : updated datalim in contour - JDH 2005-01-30 : Added backend_qtagg.py provided by Sigve Tjora - SC 2005-01-28 : Added tk.inspect rc param to .matplotlibrc. IDLE users should set tk.pythoninspect:True and interactive:True and backend:TkAgg 2005-01-28 : Replaced examples/interactive.py with an updated script from Fernando Perez - SC 2005-01-27 : Added support for shared x or y axes. See examples/shared_axis_demo.py and examples/ganged_plots.py 2005-01-27 : Added Lee\'s patch for missing symbols leq and LEFTbracket to \_mathtext_data - JDH 2005-01-26 : Added Baptiste\'s two scales patch \-- see help(twinx) in the pylab interface for more info. See also examples/two_scales.py 2005-01-24 : Fixed a mathtext parser bug that prevented font changes in sub/superscripts - JDH 2005-01-24 : Fixed contour to work w/ interactive changes in colormaps, clim, etc - JDH ------------------------------------------------------------------------ ## 0.71 (2005-01-21) 2005-01-21 : Refactored numerix to solve vexing namespace issues - JDH 2005-01-21 : Applied Nadia\'s contour bug fix - JDH 2005-01-20 : Made some changes to the contour routine - particularly region=1 seems t fix a lot of the zigzag strangeness. Added colormaps as default for contour - JDH 2005-01-19 : Restored builtin names which were overridden (min, max, abs, round, and sum) in pylab. This is a potentially significant change for those who were relying on an array version of those functions that previously overrode builtin function names. - ADS 2005-01-18 : Added accents to mathtext: hat, breve, grave, bar, acute, tilde, vec, dot, ddot. All of them have the same syntax, e.g., to make an overbar you do bar{o} or to make an o umlaut you do ddot{o}. The shortcuts are also provided, e.g., \"o \'e \`e \~n .x \^y - JDH 2005-01-18 : Plugged image resize memory leaks - JDH 2005-01-18 : Fixed some mathtext parser problems relating to superscripts 2005-01-17 : Fixed a yticklabel problem for colorbars under change of clim - JDH 2005-01-17 : Cleaned up Destroy handling in wx reducing memleak/fig from approx 800k to approx 6k- JDH 2005-01-17 : Added kappa to latex_to_bakoma - JDH 2005-01-15 : Support arbitrary colorbar axes and horizontal colorbars - JDH 2005-01-15 : Fixed colormap number of colors bug so that the colorbar has the same discretization as the image - JDH 2005-01-15 : Added Nadia\'s x,y contour fix - JDH 2005-01-15 : backend_cairo: added PDF support which requires pycairo 0.1.4. Its not usable yet, but is ready for when the Cairo PDF backend matures - SC 2005-01-15 : Added Nadia\'s x,y contour fix 2005-01-12 : Fixed set clip_on bug in artist - JDH 2005-01-11 : Reverted pythoninspect in tkagg - JDH 2005-01-09 : Fixed a backend_bases event bug caused when an event is triggered when location is None - JDH 2005-01-07 : Add patch from Stephen Walton to fix bug in pylab.load() when the % character is included in a comment. - ADS 2005-01-07 : Added markerscale attribute to Legend class. This allows the marker size in the legend to be adjusted relative to that in the plot. - ADS 2005-01-06 : Add patch from Ben Vanhaeren to make the FigureManagerGTK vbox a public attribute - SC ------------------------------------------------------------------------ 2004-12-30 : Release 0.70 2004-12-28 : Added coord location to key press and added a examples/picker_demo.py 2004-12-28 : Fixed coords notification in wx toolbar - JDH 2004-12-28 : Moved connection and disconnection event handling to the FigureCanvasBase. Backends now only need to connect one time for each of the button press, button release and key press/release functions. The base class deals with callbacks and multiple connections. This fixes flakiness on some backends (tk, wx) in the presence of multiple connections and/or disconnect - JDH 2004-12-27 : Fixed PS mathtext bug where color was not set - Jochen please verify correct - JDH 2004-12-27 : Added Shadow class and added shadow kwarg to legend and pie for shadow effect - JDH 2004-12-27 : Added pie charts and new example/pie_demo.py 2004-12-23 : Fixed an agg text rotation alignment bug, fixed some text kwarg processing bugs, and added examples/text_rotation.py to explain and demonstrate how text rotations and alignment work in matplotlib. - JDH ------------------------------------------------------------------------ ## 0.65.1 (2004-12-22) 2004-12-22 : Fixed colorbar bug which caused colorbar not to respond to changes in colormap in some instances - JDH 2004-12-22 : Refactored NavigationToolbar in tkagg to support app embedding , init now takes (canvas, window) rather than (canvas, figman) - JDH 2004-12-21 : Refactored axes and subplot management - removed add_subplot and add_axes from the FigureManager. classic toolbar updates are done via an observer pattern on the figure using add_axobserver. Figure now maintains the axes stack (for gca) and supports axes deletion. Ported changes to GTK, Tk, Wx, and FLTK. Please test! Added delaxes - JDH 2004-12-21 : Lots of image optimizations - 4x performance boost over 0.65 JDH 2004-12-20 : Fixed a figimage bug where the axes is shown and modified tkagg to move the destroy binding into the show method. 2004-12-18 : Minor refactoring of NavigationToolbar2 to support embedding in an application - JDH 2004-12-14 : Added linestyle to collections (currently broken) - JDH 2004-12-14 : Applied Nadia\'s setupext patch to fix libstdc++ link problem with contour and solaris -JDH 2004-12-14 : A number of pychecker inspired fixes, including removal of True and False from cbook which I erroneously thought was needed for python2.2 - JDH 2004-12-14 : Finished porting doc strings for set introspection. Used silent_list for many get funcs that return lists. JDH 2004-12-13 : dates.py: removed all timezone() calls, except for UTC - SC ------------------------------------------------------------------------ ## 0.65 (2004-12-13) 2004-12-13 : colors.py: rgb2hex(), hex2color() made simpler (and faster), also rgb2hex() - added round() instead of integer truncation hex2color() - changed 256.0 divisor to 255.0, so now \'#ffffff\' becomes (1.0,1.0,1.0) not (0.996,0.996,0.996) - SC 2004-12-11 : Added ion and ioff to pylab interface - JDH 2004-12-11 : backend_template.py: delete FigureCanvasTemplate.realize() - most backends don\'t use it and its no longer needed backend_ps.py, backend_svg.py: delete show() and draw_if_interactive() -they are not needed for image backends backend_svg.py: write direct to file instead of StringIO - SC 2004-12-10 : Added zorder to artists to control drawing order of lines, patches and text in axes. See examples/zoder_demo.py - JDH 2004-12-10 : Fixed colorbar bug with scatter - JDH 2004-12-10 : Added Nadia Dencheva \<\> contour code - JDH 2004-12-10 : backend_cairo.py: got mathtext working - SC 2004-12-09 : Added Norm Peterson\'s svg clipping patch 2004-12-09 : Added Matthew Newville\'s wx printing patch 2004-12-09 : Migrated matlab to pylab - JDH 2004-12-09 : backend_gtk.py: split into two parts - backend_gdk.py - an image backend - backend_gtk.py - A GUI backend that uses GDK - SC 2004-12-08 : backend_gtk.py: remove quit_after_print_xvfb(\*args), show_xvfb(), Dialog_MeasureTool(gtk.Dialog) one month after sending mail to matplotlib-users asking if anyone still uses these functions - SC 2004-12-02 : backend_bases.py, backend_template.py: updated some of the method documentation to make them consistent with each other - SC 2004-12-04 : Fixed multiple bindings per event for TkAgg mpl_connect and mpl_disconnect. Added a \"test_disconnect\" command line parameter to coords_demo.py JTM 2004-12-04 : Fixed some legend bugs JDH 2004-11-30 : Added over command for oneoff over plots. e.g., over(plot, x, y, lw=2). Works with any plot function. 2004-11-30 : Added bbox property to text - JDH 2004-11-29 : Zoom to rect now respect reversed axes limits (for both linear and log axes). - GL 2004-11-29 : Added the over command to the matlab interface. over allows you to add an overlay plot regardless of hold state. - JDH 2004-11-25 : Added Printf to mplutils for printf style format string formatting in C++ (should help write better exceptions) 2004-11-24 : IMAGE_FORMAT: remove from agg and gtkagg backends as its no longer used -SC 2004-11-23 : Added matplotlib compatible set and get introspection. See set_and_get.py 2004-11-23 : applied Norbert\'s patched and exposed legend configuration to kwargs - JDH 2004-11-23 : backend_gtk.py: added a default exception handler - SC 2004-11-18 : backend_gtk.py: change so that the backend knows about all image formats and does not need to use IMAGE_FORMAT in other backends - SC 2004-11-18 : Fixed some report_error bugs in string interpolation as reported on SF bug tracker- JDH 2004-11-17 : backend_gtkcairo.py: change so all print_figure() calls render using Cairo and get saved using backend_gtk.print_figure() - SC 2004-11-13 : backend_cairo.py: Discovered the magic number (96) required for Cairo PS plots to come out the right size. Restored Cairo PS output and added support for landscape mode - SC 2004-11-13 : Added ishold - JDH 2004-11-12 : Added many new matlab colormaps - autumn bone cool copper flag gray hot hsv jet pink prism spring summer winter - PG 2004-11-11 : greatly simplify the emitted postscript code - JV 2004-11-12 : Added new plotting functions spy, spy2 for sparse matrix visualization -JDH 2004-11-11 : Added rgrids, thetragrids for customizing the grid locations and labels for polar plots - JDH 2004-11-11 : make the Gtk backends build without an X-server connection - JV 2004-11-10 : matplotlib/\_\_init\_\_.py: Added FROZEN to signal we are running under py2exe (or similar) - is used by backend_gtk.py - SC 2004-11-09 : backend_gtk.py: Made fix suggested by to prevent problems when py2exe calls pygtk.require(). - SC 2004-11-09 : backend_cairo.py: Added support for printing to a fileobject. Disabled cairo PS output which is not working correctly. - SC ------------------------------------------------------------------------ ## 0.64 (2004-11-08) 2004-11-04 : Changed -dbackend processing to only use known backends, so we don\'t clobber other non-matplotlib uses of -d, like -debug. 2004-11-04 : backend_agg.py: added IMAGE_FORMAT to list the formats that the backend can save to. backend_gtkagg.py: added support for saving JPG files by using the GTK backend - SC 2004-10-31 : backend_cairo.py: now produces png and ps files (although the figure sizing needs some work). pycairo did not wrap all the necessary functions, so I wrapped them myself, they are included in the backend_cairo.py doc string. - SC 2004-10-31 : backend_ps.py: clean up the generated PostScript code, use the PostScript stack to hold intermediate values instead of storing them in the dictionary. - JV 2004-10-30 : backend_ps.py, ft2font.cpp, ft2font.h: fix the position of text in the PostScript output. The new FT2Font method get_descent gives the distance between the lower edge of the bounding box and the baseline of a string. In backend_ps the text is shifted upwards by this amount. - JV 2004-10-30 : backend_ps.py: clean up the code a lot. Change the PostScript output to be more DSC compliant. All definitions for the generated PostScript are now in a PostScript dictionary \'mpldict\'. Moved the long comment about drawing ellipses from the PostScript output into a Python comment. - JV 2004-10-30 : backend_gtk.py: removed FigureCanvasGTK.realize() as its no longer needed. Merged ColorManager into GraphicsContext backend_bases.py: For set_capstyle/joinstyle() only set cap or joinstyle if there is no error. -SC 2004-10-30 : backend_gtk.py: tidied up print_figure() and removed some of the dependency on widget events - SC 2004-10-28 : backend_cairo.py: The renderer is complete except for mathtext, draw_image() and clipping. gtkcairo works reasonably well. cairo does not yet create any files since I can\'t figure how to set the \'target surface\', I don\'t think pycairo wraps the required functions - SC 2004-10-28 : backend_gtk.py: Improved the save dialog (GTK 2.4 only) so it presents the user with a menu of supported image formats - SC 2004-10-28 : backend_svg.py: change print_figure() to restore original face/edge color backend_ps.py : change print_figure() to ensure original face/edge colors are restored even if there\'s an IOError - SC 2004-10-27 : Applied Norbert\'s errorbar patch to support barsabove kwarg 2004-10-27 : Applied Norbert\'s legend patch to support None handles 2004-10-27 : Added two more backends: backend_cairo.py, backend_gtkcairo.py They are not complete yet, currently backend_gtkcairo just renders polygons, rectangles and lines - SC 2004-10-21 : Added polar axes and plots - JDH 2004-10-20 : Fixed corrcoef bug exposed by corrcoef(X) where X is matrix - JDH 2004-10-19 : Added kwarg support to xticks and yticks to set ticklabel text properties \-- thanks to T. Edward Whalen for the suggestion 2004-10-19 : Added support for PIL images in imshow(), image.py - ADS 2004-10-19 : Re-worked exception handling in \_image.py and \_transforms.py to avoid masking problems with shared libraries. - JTM 2004-10-16 : Streamlined the matlab interface wrapper, removed the noplot option to hist - just use mlab.hist instead. 2004-09-30 : Added Andrew Dalke\'s strftime code to extend the range of dates supported by the DateFormatter - JDH 2004-09-30 : Added barh - JDH 2004-09-30 : Removed fallback to alternate array package from numerix so that ImportErrors are easier to debug. - JTM 2004-09-30 : Add GTK+ 2.4 support for the message in the toolbar. SC 2004-09-30 : Made some changes to support python22 - lots of doc fixes. - JDH 2004-09-29 : Added a Verbose class for reporting - JDH ------------------------------------------------------------------------ 2004-09-28 : Released 0.63.0 2004-09-28 : Added save to file object for agg - see examples/print_stdout.py 2004-09-24 : Reorganized all py code to lib subdir 2004-09-24 : Fixed axes resize image edge effects on interpolation - required upgrade to agg22 which fixed an agg bug related to this problem 2004-09-20 : Added toolbar2 message display for backend_tkagg. JTM 2004-09-17 : Added coords formatter attributes. These must be callable, and return a string for the x or y data. These will be used to format the x and y data for the coords box. Default is the axis major formatter. e.g.: # format the coords message box def price(x): return '$%1.2f'%x ax.format_xdata = DateFormatter('%Y-%m-%d') ax.format_ydata = price 2004-09-17 : Total rewrite of dates handling to use python datetime with num2date, date2num and drange. pytz for timezone handling, dateutils for spohisticated ticking. date ranges from 0001-9999 are supported. rrules allow arbitrary date ticking. examples/date_demo\*.py converted to show new usage. new example examples/date_demo_rrule.py shows how to use rrules in date plots. The date locators are much more general and almost all of them have different constructors. See matplotlib.dates for more info. 2004-09-15 : Applied Fernando\'s backend \_\_init\_\_ patch to support easier backend maintenance. Added his numutils to mlab. JDH 2004-09-16 : Re-designated all files in matplotlib/images as binary and w/o keyword substitution using \"cvs admin -kb \*.svg \...\". See binary files in \"info cvs\" under Linux. This was messing up builds from CVS on windows since CVS was doing lf -\> cr/lf and keyword substitution on the bitmaps. - JTM 2004-09-15 : Modified setup to build array-package-specific extensions for those extensions which are array-aware. Setup builds extensions automatically for either Numeric, numarray, or both, depending on what you have installed. Python proxy modules for the array-aware extensions import the version optimized for numarray or Numeric determined by numerix. - JTM 2004-09-15 : Moved definitions of infinity from mlab to numerix to avoid divide by zero warnings for numarray - JTM 2004-09-09 : Added axhline, axvline, axhspan and axvspan ------------------------------------------------------------------------ ## 0.62.4 (2004-08-30) 2004-08-30 : Fixed a multiple images with different extent bug, Fixed markerfacecolor as RGB tuple 2004-08-27 : Mathtext now more than 5x faster. Thanks to Paul Mcguire for fixes both to pyparsing and to the matplotlib grammar! mathtext broken on python2.2 2004-08-25 : Exposed Darren\'s and Greg\'s log ticking and formatting options to semilogx and friends 2004-08-23 : Fixed grid w/o args to toggle grid state - JDH 2004-08-11 : Added Gregory\'s log patches for major and minor ticking 2004-08-18 : Some pixel edge effects fixes for images 2004-08-18 : Fixed TTF files reads in backend_ps on win32. 2004-08-18 : Added base and subs properties for logscale plots, user modifiable using [set]()\[x,y\]scale(\'log\',base=b,subs=\[mt1,mt2,\...\]) - GL 2004-08-18 : fixed a bug exposed by trying to find the HOME dir on win32 thanks to Alan Issac for pointing to the light - JDH 2004-08-18 : fixed errorbar bug in setting ecolor - JDH 2004-08-12 : Added Darren Dale\'s exponential ticking patch 2004-08-11 : Added Gregory\'s fltkagg backend ------------------------------------------------------------------------ ## 0.61.0 (2004-08-09) 2004-08-08 : backend_gtk.py: get rid of the final PyGTK deprecation warning by replacing gtkOptionMenu with gtkMenu in the 2.4 version of the classic toolbar. 2004-08-06 : Added Tk zoom to rect rectangle, proper idle drawing, and keybinding - JDH 2004-08-05 : Updated installing.html and INSTALL - JDH 2004-08-01 : backend_gtk.py: move all drawing code into the expose_event() 2004-07-28 : Added Greg\'s toolbar2 and [backend]()\*agg patches - JDH 2004-07-28 : Added image.imread with support for loading png into numerix arrays 2004-07-28 : Added key modifiers to events - implemented dynamic updates and rubber banding for interactive pan/zoom - JDH 2004-07-27 : did a readthrough of SVG, replacing all the string additions with string interps for efficiency, fixed some layout problems, added font and image support (through external pngs) - JDH 2004-07-25 : backend_gtk.py: modify toolbar2 to make it easier to support GTK+ 2.4. Add GTK+ 2.4 toolbar support. - SC 2004-07-24 : backend_gtk.py: Simplified classic toolbar creation - SC 2004-07-24 : Added images/matplotlib.svg to be used when GTK+ windows are minimised - SC 2004-07-22 : Added right mouse click zoom for NavigationToolbar2 panning mode. - JTM 2004-07-22 : Added NavigationToolbar2 support to backend_tkagg. Minor tweak to backend_bases. - JTM 2004-07-22 : Incorporated Gergory\'s renderer cache and buffer object cache - JDH 2004-07-22 : Backend_gtk.py: Added support for GtkFileChooser, changed FileSelection/FileChooser so that only one instance pops up, and made them both modal. - SC 2004-07-21 : Applied backend_agg memory leak patch from hayden - . Found and fixed a leak in binary operations on transforms. Moral of the story: never incref where you meant to decref! Fixed several leaks in ft2font: moral of story: almost always return Py::asObject over Py::Object - JDH 2004-07-21 : Fixed a to string memory allocation bug in agg and image modules - JDH 2004-07-21 : Added mpl_connect and mpl_disconnect to matlab interface - JDH 2004-07-21 : Added beginnings of users_guide to CVS - JDH 2004-07-20 : ported toolbar2 to wx 2004-07-20 : upgraded to agg21 - JDH 2004-07-20 : Added new icons for toolbar2 - JDH 2004-07-19 : Added vertical mathtext for \*Agg and GTK - thanks Jim Benson! - JDH 2004-07-16 : Added ps/eps/svg savefig options to wx and gtk JDH 2004-07-15 : Fixed python framework tk finder in setupext.py - JDH 2004-07-14 : Fixed layer images demo which was broken by the 07/12 image extent fixes -JDH 2004-07-13 : Modified line collections to handle arbitrary length segments for each line segment. - JDH 2004-07-13 : Fixed problems with image extent and origin - set_image_extent deprecated. Use imshow(blah, blah, extent=(xmin, xmax, ymin, ymax) instead - JDH 2004-07-12 : Added prototype for new nav bar with codified event handling. Use mpl_connect rather than connect for matplotlib event handling. toolbar style determined by rc toolbar param. backend status: gtk: prototype, wx: in progress, tk: not started - JDH 2004-07-11 : backend_gtk.py: use builtin round() instead of redefining it. - SC 2004-07-10 : Added embedding_in_wx3 example - ADS 2004-07-09 : Added dynamic_image_wxagg to examples - ADS 2004-07-09 : added support for embedding TrueType fonts in PS files - PEB 2004-07-09 : fixed a sfnt bug exposed if font cache is not built 2004-07-09 : added default arg None to matplotlib.matlab grid command to toggle current grid state ------------------------------------------------------------------------ ## 0.60.2 (2004-07-08) 2004-07-08 : fixed a mathtext bug for \'6\' 2004-07-08 : added some numarray bug workarounds ------------------------------------------------------------------------ ## 0.60 (2004-07-07) 2004-07-07 : Fixed a bug in dynamic_demo_wx 2004-07-07 : backend_gtk.py: raise SystemExit immediately if \'import pygtk\' fails - SC 2004-07-05 : Added new mathtext commands over{sym1}{sym2} and under{sym1}{sym2} 2004-07-05 : Unified image and patch collections colormapping and scaling args. Updated docstrings for all - JDH 2004-07-05 : Fixed a figure legend bug and added examples/figlegend_demo.py - JDH 2004-07-01 : Fixed a memory leak in image and agg to string methods 2004-06-25 : Fixed fonts_demo spacing problems and added a kwargs version of the fonts_demo fonts_demo_kw.py - JDH 2004-06-25 : finance.py: handle case when urlopen() fails - SC 2004-06-24 : Support for multiple images on axes and figure, with blending. Support for upper and lower image origins. clim, jet and gray functions in matlab interface operate on current image - JDH 2004-06-23 : ported code to Perry\'s new colormap and norm scheme. Added new rc attributes image.aspect, image.interpolation, image.cmap, image.lut, image.origin 2004-06-20 : backend_gtk.py: replace gtk.TRUE/FALSE with True/False. simplified \_make_axis_menu(). - SC 2004-06-19 : anim_tk.py: Updated to use TkAgg by default (not GTK) backend_gtk_py: Added \'\_\' in front of private widget creation functions - SC 2004-06-17 : backend_gtk.py: Create a GC once in realise(), not every time draw() is called. - SC 2004-06-16 : Added new py2exe FAQ entry and added frozen support in get_data_path for py2exe - JDH 2004-06-16 : Removed GTKGD, which was always just a proof-of-concept backend - JDH 2004-06-16 : backend_gtk.py updates to replace deprecated functions gtk.mainquit(), gtk.mainloop(). Update NavigationToolbar to use the new GtkToolbar API -SC 2004-06-15 : removed set_default_font from font_manager to unify font customization using the new function rc. See API_CHANGES for more info. The examples fonts_demo.py and fonts_demo_kw.py are ported to the new API - JDH 2004-06-15 : Improved (yet again!) axis scaling to properly handle singleton plots - JDH 2004-06-15 : Restored the old FigureCanvasGTK.draw() - SC 2004-06-11 : More memory leak fixes in transforms and ft2font - JDH 2004-06-11 : Eliminated numerix .numerix file and environment variable NUMERIX. Fixed bug which prevented command line overrides: \--numarray or \--numeric. - JTM 2004-06-10 : Added rc configuration function rc; deferred all rc param setting until object creation time; added new rc attrs: lines.markerfacecolor, lines.markeredgecolor, lines.markeredgewidth, patch.linewidth, patch.facecolor, patch.edgecolor, patch.antialiased; see examples/customize_rc.py for usage - JDH ------------------------------------------------------------------------ ## 0.54.2 (2004-06-09) 2004-06-08 : Rewrote ft2font using CXX as part of general memory leak fixes; also fixed transform memory leaks - JDH 2004-06-07 : Fixed several problems with log ticks and scaling - JDH 2004-06-07 : Fixed width/height issues for images - JDH 2004-06-03 : Fixed draw_if_interactive bug for semilogx; 2004-06-02 : Fixed text clipping to clip to axes - JDH 2004-06-02 : Fixed leading newline text and multiple newline text - JDH 2004-06-02 : Fixed plot_date to return lines - JDH 2004-06-01 : Fixed plot to work with x or y having shape N,1 or 1,N - JDH 2004-05-31 : Added renderer markeredgewidth attribute of Line2D. - ADS 2004-05-29 : Fixed tick label clipping to work with navigation. 2004-05-28 : Added renderer grouping commands to support groups in : SVG/PS. - JDH 2004-05-28 : Fixed, this time I really mean it, the singleton plot plot(\[0\]) scaling bug; Fixed Flavio\'s shape = N,1 bug - JDH 2004-05-28 : added colorbar - JDH 2004-05-28 : Made some changes to the matplotlib.colors.Colormap to properly support clim - JDH ------------------------------------------------------------------------ ## 0.54.1 (2004-05-27) 2004-05-27 : Lots of small bug fixes: rotated text at negative angles, errorbar capsize and autoscaling, right tick label position, gtkagg on win98, alpha of figure background, singleton plots - JDH 2004-05-26 : Added Gary\'s errorbar stuff and made some fixes for length one plots and constant data plots - JDH 2004-05-25 : Tweaked TkAgg backend so that canvas.draw() works more like the other backends. Fixed a bug resulting in 2 draws per figure manager show(). - JTM ------------------------------------------------------------------------ ## 0.54 (2004-05-19) 2004-05-18 : Added newline separated text with rotations to text.Text layout - JDH 2004-05-16 : Added fast pcolor using PolyCollections. - JDH 2004-05-14 : Added fast polygon collections - changed scatter to use them. Added multiple symbols to scatter. 10x speedup on large scatters using \*Agg and 5X speedup for ps. - JDH 2004-05-14 : On second thought\... created an \"nx\" namespace in numerix which maps type names onto typecodes the same way for both numarray and Numeric. This undoes my previous change immediately below. To get a typename for Int16 usable in a Numeric extension: say nx.Int16. - JTM 2004-05-15 : Rewrote transformation class in extension code, simplified all the artist constructors - JDH 2004-05-14 : Modified the type definitions in the numarray side of numerix so that they are Numeric typecodes and can be used with Numeric compilex extensions. The original numarray types were renamed to type\. - JTM 2004-05-06 : Gary Ruben sent me a bevy of new plot symbols and markers. See matplotlib.matlab.plot - JDH 2004-05-06 : Total rewrite of mathtext - factored ft2font stuff out of layout engine and defined abstract class for font handling to lay groundwork for ps mathtext. Rewrote parser and made layout engine much more precise. Fixed all the layout hacks. Added spacing commands / and hspace. Added composite chars and defined angstrom. - JDH 2004-05-05 : Refactored text instances out of backend; aligned text with arbitrary rotations is now supported - JDH 2004-05-05 : Added a Matrix capability for numarray to numerix. JTM 2004-05-04 : Updated whats_new.html.template to use dictionary and template loop, added anchors for all versions and items; updated goals.txt to use those for links. PG 2004-05-04 : Added fonts_demo.py to backend_driver, and AFM and TTF font caches to font_manager.py - PEB 2004-05-03 : Redid goals.html.template to use a goals.txt file that has a pseudo restructured text organization. PG 2004-05-03 : Removed the close buttons on all GUIs and added the python #! bang line to the examples following Steve Chaplin\'s advice on matplotlib dev 2004-04-29 : Added CXX and rewrote backend_agg using it; tracked down and fixed agg memory leak - JDH 2004-04-29 : Added stem plot command - JDH 2004-04-28 : Fixed PS scaling and centering bug - JDH 2004-04-26 : Fixed errorbar autoscale problem - JDH 2004-04-22 : Fixed copy tick attribute bug, fixed singular datalim ticker bug; fixed mathtext fontsize interactive bug. - JDH 2004-04-21 : Added calls to draw_if_interactive to axes(), legend(), and pcolor(). Deleted duplicate pcolor(). - JTM ------------------------------------------------------------------------ 2004-04-21 : matplotlib 0.53 release 2004-04-19 : Fixed vertical alignment bug in PS backend - JDH 2004-04-17 : Added support for two scales on the \"same axes\" with tick different ticking and labeling left right or top bottom. See examples/two_scales.py - JDH 2004-04-17 : Added default dirs as list rather than single dir in setupext.py - JDH 2004-04-16 : Fixed wx exception swallowing bug (and there was much rejoicing!) - JDH 2004-04-16 : Added new ticker locator a formatter, fixed default font return - JDH 2004-04-16 : Added get_name method to FontProperties class. Fixed font lookup in GTK and WX backends. - PEB 2004-04-16 : Added get- and set_fontstyle methods. - PEB 2004-04-10 : Mathtext fixes: scaling with dpi, - JDH 2004-04-09 : Improved font detection algorithm. - PEB 2004-04-09 : Move deprecation warnings from text.py to \_\_init\_\_.py - PEB 2004-04-09 : Added default font customization - JDH 2004-04-08 : Fixed viewlim set problem on axes and axis. - JDH 2004-04-07 : Added validate_comma_sep_str and font properties parameters to \_\_init\_\_. Removed font families and added rcParams to FontProperties \_\_init\_\_ arguments in font_manager. Added default font property parameters to .matplotlibrc file with descriptions. Added deprecation warnings to the get\_ - and set_fontXXX methods of the Text object. - PEB 2004-04-06 : Added load and save commands for ASCII data - JDH 2004-04-05 : Improved font caching by not reading AFM fonts until needed. Added better documentation. Changed the behaviour of the get_family, set_family, and set_name methods of FontProperties. - PEB 2004-04-05 : Added WXAgg backend - JDH 2004-04-04 : Improved font caching in backend_agg with changes to font_manager - JDH 2004-03-29 : Fixed fontdicts and kwargs to work with new font manager - JDH ------------------------------------------------------------------------ This is the Old, stale, never used changelog 2002-12-10 : - Added a TODO file and CHANGELOG. Lots to do \-- get crackin\'! - Fixed y zoom tool bug - Adopted a compromise fix for the y data clipping problem. The problem was that for solid lines, the y data clipping (as opposed to the gc clipping) caused artifactual horizontal solid lines near the ylim boundaries. I did a 5% offset hack in Axes set_ylim functions which helped, but didn\'t cure the problem for very high gain y zooms. So I disabled y data clipping for connected lines . If you need extensive y clipping, either plot(y,x) because x data clipping is always enabled, or change the \_set_clip code to \'if 1\' as indicated in the lines.py src. See \_set_clip in lines.py and set_ylim in figure.py for more information. 2002-12-11 : - Added a measurement dialog to the figure window to measure axes position and the delta x delta y with a left mouse drag. These defaults can be overridden by deriving from Figure and overriding button_press_event, button_release_event, and motion_notify_event, and \_dialog_measure_tool. - fixed the navigation dialog so you can check the axes the navigation buttons apply to. 2003-04-23 : Released matplotlib v0.1 2003-04-24 : Added a new line style PixelLine2D which is the plots the markers as pixels (as small as possible) with format symbol \',\' Added a new class Patch with derived classes Rectangle, RegularPolygon and Circle 2003-04-25 : Implemented new functions errorbar, scatter and hist Added a new line type \'\') where y.shape = len(x),2 and each row gives the ymin,ymax for the respective values of x. Previously I had implemented vlines as a list of lines, but I needed the efficiency of the numeric clipping for large numbers of vlines outside the viewport, so I wrote a dedicated class Vline2D which derives from Line2D 2003-05-01 : Fixed ytick bug where grid and tick show outside axis viewport with gc clip 2003-05-14 : Added new ways to specify colors 1) matlab format string 2) html-style hex string, 3) rgb tuple. See examples/color_demo.py 2003-05-28 : Changed figure rendering to draw form a pixmap to reduce flicker. See examples/system_monitor.py for an example where the plot is continuously updated w/o flicker. This example is meant to simulate a system monitor that shows free CPU, RAM, etc\... 2003-08-04 : Added Jon Anderson\'s GTK shell, which doesn\'t require pygtk to have threading built-in and looks nice! 2003-08-25 : Fixed deprecation warnings for python2.3 and pygtk-1.99.18 2003-08-26 : Added figure text with new example examples/figtext.py 2003-08-27 : Fixed bugs in figure text with font override dictionaries and fig text that was placed outside the window bounding box 2003-09-01 through 2003-09-15 : Added a postscript and a GD module backend 2003-09-16 : Fixed font scaling and point scaling so circles, squares, etc on lines will scale with DPI as will fonts. Font scaling is not fully implemented on the gtk backend because I have not figured out how to scale fonts to arbitrary sizes with GTK 2003-09-17 : Fixed figure text bug which crashed X windows on long figure text extending beyond display area. This was, I believe, due to the vestigial erase functionality that was no longer needed since I began rendering to a pixmap 2003-09-30 : Added legend 2003-10-01 : Fixed bug when colors are specified with rgb tuple or hex string. 2003-10-21 : Andrew Straw provided some legend code which I modified and incorporated. Thanks Andrew! 2003-10-27 : Fixed a bug in axis.get_view_distance that affected zoom in versus out with interactive scrolling, and a bug in the axis text reset system that prevented the text from being redrawn on a interactive gtk view lim set with the widget Fixed a bug in that prevented the manual setting of ticklabel strings from working properly 2003-11-02 : - Do a nearest neighbor color pick on GD when allocate fails 2003-11-02 : - Added pcolor plot - Added MRI example - Fixed bug that screwed up label position if xticks or yticks were empty - added nearest neighbor color picker when GD max colors exceeded - fixed figure background color bug in GD backend 2003-11-10 - 2003-11-11 : major refactoring. - Ticks (with labels, lines and grid) handled by dedicated class - Artist now know bounding box and dpi - Bounding boxes and transforms handled by dedicated classes - legend in dedicated class. Does a better job of alignment and bordering. Can be initialized with specific line instances. See examples/legend_demo2.py 2003-11-14 : Fixed legend positioning bug and added new position args 2003-11-16 : Finished porting GD to new axes API 2003-11-20 : - add TM for matlab on website and in docs 2003-11-20 : - make a nice errorbar and scatter screenshot 2003-11-20 : - auto line style cycling for multiple line types broken 2003-11-18 : (using inkrect) :logical rect too big on gtk backend 2003-11-18 : ticks don\'t reach edge of axes in gtk mode \-- rounding error? 2003-11-20 : - port Gary\'s errorbar code to new API before 0.40 2003-11-20 : - problem with stale \_set_font. legend axes box doesn\'t resize on save in GTK backend \-- see htdocs legend_demo.py 2003-11-21 : - make a dash-dot dict for the GC 2003-12-15 : - fix install path bug --- ::: redirect-from /users/prev_whats_new/dflt_style_changes ::: ::: redirect-from /users/dflt_style_changes ::: # Changes to the default style The most important changes in matplotlib 2.0 are the changes to the default style. While it is impossible to select the best default for all cases, these are designed to work well in the most common cases. A \'classic\' style sheet is provided so reverting to the 1.x default values is a single line of python ``` python import matplotlib.style import matplotlib as mpl mpl.style.use('classic') ``` See `customizing-with-matplotlibrc-files`{.interpreted-text role="ref"} for details about how to persistently and selectively revert many of these changes. ::: {.contents depth="2" local="" backlinks="entry"} Table of Contents ::: ## Colors, color cycles, and colormaps ### Colors in default property cycle The colors in the default property cycle have been changed from `['b', 'g', 'r', 'c', 'm', 'y', 'k']` to the category10 color palette used by [Vega](https://github.com/vega/vega/wiki/Scales#scale-range-literals) and [d3](https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#category10) originally developed at Tableau. ::: plot import numpy as np import matplotlib.pyplot as plt th = np.linspace(0, 2\*np.pi, 512) fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) def color_demo(ax, colors, title): : ax.set_title(title) for j, c in enumerate(colors): v_offset = -(j / len(colors)) ax.plot(th, .1\*np.sin(th) + v_offset, color=c) ax.annotate(\"\'C{}\'\".format(j), (0, v_offset), xytext=(-1.5, 0), ha=\'right\', va=\'center\', color=c, textcoords=\'offset points\', family=\'monospace\') > ax.annotate(\"{!r}\".format(c), (2\*np.pi, v_offset), > > : xytext=(1.5, 0), ha=\'left\', va=\'center\', color=c, > textcoords=\'offset points\', family=\'monospace\') ax.axis(\'off\') old_colors = \[\'b\', \'g\', \'r\', \'c\', \'m\', \'y\', \'k\'\] new_colors = \[\'#1f77b4\', \'#ff7f0e\', \'#2ca02c\', \'#d62728\', : \'#9467bd\', \'#8c564b\', \'#e377c2\', \'#7f7f7f\', \'#bcbd22\', \'#17becf\'\] color_demo(ax1, old_colors, \'classic\') color_demo(ax2, new_colors, \'v2.0\') fig.subplots_adjust(\*\*{\'bottom\': 0.0, \'left\': 0.059, : \'right\': 0.869, \'top\': 0.895}) ::: In addition to changing the colors, an additional method to specify colors was added. Previously, the default colors were the single character short-hand notations for red, green, blue, cyan, magenta, yellow, and black. This made them easy to type and usable in the abbreviated style string in `plot`, however the new default colors are only specified via hex values. To access these colors outside of the property cycling the notation for colors `'CN'`, where `N` takes values 0-9, was added to denote the first 10 colors in `axes.prop_cycle`{.interpreted-text role="rc"}. See `colors_def`{.interpreted-text role="ref"} for more details. To restore the old color cycle use ``` python from cycler import cycler mpl.rcParams['axes.prop_cycle'] = cycler(color='bgrcmyk') ``` or set ``` cfg axes.prop_cycle : cycler('color', 'bgrcmyk') ``` in your `matplotlibrc`{.interpreted-text role="file"} file. ### Colormap The new default colormap used by [matplotlib.cm.ScalarMappable]{.title-ref} instances is \'viridis\' (aka [option D](https://bids.github.io/colormap/)). ::: plot import numpy as np import matplotlib.pyplot as plt N = M = 200 X, Y = np.ogrid\[0:20:N\*1j, 0:20:M\*1j\] data = np.sin(np.pi \* X\*2 / 20) \* np.cos(np.pi \* Y\*2 / 20) fig, (ax2, ax1) = plt.subplots(1, 2, figsize=(7, 3)) im = ax1.imshow(data, extent=\[0, 200, 0, 200\]) ax1.set_title(\"v2.0: \'viridis\'\") fig.colorbar(im, ax=ax1, shrink=0.8) im2 = ax2.imshow(data, extent=\[0, 200, 0, 200\], cmap=\'jet\') fig.colorbar(im2, ax=ax2, shrink=0.8) ax2.set_title(\"classic: \'jet\'\") fig.tight_layout() ::: For an introduction to color theory and how \'viridis\' was generated watch Nathaniel Smith and Stéfan van der Walt\'s talk from SciPy2015. See [here for many more details](https://bids.github.io/colormap/) about the other alternatives and the tools used to create the color map. For details on all of the colormaps available in matplotlib see `colormaps`{.interpreted-text role="ref"}. ```{=html} ``` The previous default can be restored using ``` python mpl.rcParams['image.cmap'] = 'jet' ``` or setting ``` cfg image.cmap : 'jet' ``` in your `matplotlibrc`{.interpreted-text role="file"} file; however this is strongly discouraged. ### Interactive figures The default interactive figure background color has changed from grey to white, which matches the default background color used when saving. The previous defaults can be restored by : mpl.rcParams['figure.facecolor'] = '0.75' or by setting : figure.facecolor : '0.75' in your `matplotlibrc`{.interpreted-text role="file"} file. ### Grid lines The default style of grid lines was changed from black dashed lines to thicker solid light grey lines. ::: plot import numpy as np import matplotlib.pyplot as plt fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) ax1.grid(color=\'k\', linewidth=.5, linestyle=\':\') ax1.set_title(\'classic\') ax2.grid() ax2.set_title(\'v2.0\') ::: The previous default can be restored by using: mpl.rcParams['grid.color'] = 'k' mpl.rcParams['grid.linestyle'] = ':' mpl.rcParams['grid.linewidth'] = 0.5 or by setting: grid.color : k # grid color grid.linestyle : : # dotted grid.linewidth : 0.5 # in points in your `matplotlibrc`{.interpreted-text role="file"} file. ## Figure size, font size, and screen dpi The default dpi used for on-screen display was changed from 80 dpi to 100 dpi, the same as the default dpi for saving files. Due to this change, the on-screen display is now more what-you-see-is-what-you-get for saved files. To keep the figure the same size in terms of pixels, in order to maintain approximately the same size on the screen, the default figure size was reduced from 8x6 inches to 6.4x4.8 inches. As a consequence of this the default font sizes used for the title, tick labels, and axes labels were reduced to maintain their size relative to the overall size of the figure. By default the dpi of the saved image is now the dpi of the [\~matplotlib.figure.Figure]{.title-ref} instance being saved. This will have consequences if you are trying to match text in a figure directly with external text. The previous defaults can be restored by : mpl.rcParams['figure.figsize'] = [8.0, 6.0] mpl.rcParams['figure.dpi'] = 80 mpl.rcParams['savefig.dpi'] = 100 mpl.rcParams['font.size'] = 12 mpl.rcParams['legend.fontsize'] = 'large' mpl.rcParams['figure.titlesize'] = 'medium' or by setting: figure.figsize : [8.0, 6.0] figure.dpi : 80 savefig.dpi : 100 font.size : 12.0 legend.fontsize : 'large' figure.titlesize : 'medium' In your `matplotlibrc`{.interpreted-text role="file"} file. In addition, the `forward` kwarg to [\~.Figure.set_size_inches]{.title-ref} now defaults to [True]{.title-ref} to improve the interactive experience. Backend canvases that adjust the size of their bound [matplotlib.figure.Figure]{.title-ref} must pass `forward=False` to avoid circular behavior. This default is not configurable. ## Plotting functions ### `scatter` The following changes were made to the default behavior of [\~matplotlib.axes.Axes.scatter]{.title-ref} - The default size of the elements in a scatter plot is now based on `lines.markersize`{.interpreted-text role="rc"} so it is consistent with `plot(X, Y, 'o')`. The old value was 20, and the new value is 36 (6\^2). - Scatter markers no longer have a black edge. - If the color of the markers is not specified it will follow the property cycle, pulling from the \'patches\' cycle on the `Axes`. ::: plot import numpy as np import matplotlib.pyplot as plt np.random.seed(2) fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) x = np.arange(15) y = np.random.rand(15) y2 = np.random.rand(15) ax1.scatter(x, y, s=20, edgecolors=\'k\', c=\'b\', label=\'a\') ax1.scatter(x, y2, s=20, edgecolors=\'k\', c=\'b\', label=\'b\') ax1.legend() ax1.set_title(\'classic\') ax2.scatter(x, y, label=\'a\') ax2.scatter(x, y2, label=\'b\') ax2.legend() ax2.set_title(\'v2.0\') ::: The classic default behavior of [\~matplotlib.axes.Axes.scatter]{.title-ref} can only be recovered through `mpl.style.use('classic')`. The marker size can be recovered via : mpl.rcParam['lines.markersize'] = np.sqrt(20) however, this will also affect the default marker size of [\~matplotlib.axes.Axes.plot]{.title-ref}. To recover the classic behavior on a per-call basis pass the following kwargs: classic_kwargs = {'s': 20, 'edgecolors': 'k', 'c': 'b'} ### `plot` The following changes were made to the default behavior of [\~matplotlib.axes.Axes.plot]{.title-ref} - the default linewidth increased from 1 to 1.5 - the dash patterns associated with `'--'`, `':'`, and `'-.'` have changed - the dash patterns now scale with line width ::: plot import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from cycler import cycler fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) N = 15 x = np.arange(N) y = np.ones_like(x) sty_cycle = (cycler(\'ls\', \[\'\--\' ,\':\', \'-.\'\]) \* : cycler(\'lw\', \[None, 1, 2, 5\])) classic = { : \'lines.linewidth\': 1.0, \'lines.dashed_pattern\' : \[6, 6\], \'lines.dashdot_pattern\' : \[3, 5, 1, 5\], \'lines.dotted_pattern\' : \[1, 3\], \'lines.scale_dashes\': False} v2 = {} \# {\'lines.linewidth\': 1.5, \# \'lines.dashed_pattern\' : \[2.8, 1.2\], \# \'lines.dashdot_pattern\' : \[4.8, 1.2, 0.8, 1.2\], \# \'lines.dotted_pattern\' : \[1.1, 1.1\], \# \'lines.scale_dashes\': True} def demo(ax, rcparams, title): : ax.axis(\'off\') ax.set_title(title) with mpl.rc_context(rc=rcparams): for j, sty in enumerate(sty_cycle): ax.plot(x, y + j, \*\*sty) demo(ax1, classic, \'classic\') demo(ax2, {}, \'v2.0\') ::: The previous defaults can be restored by setting: mpl.rcParams['lines.linewidth'] = 1.0 mpl.rcParams['lines.dashed_pattern'] = [6, 6] mpl.rcParams['lines.dashdot_pattern'] = [3, 5, 1, 5] mpl.rcParams['lines.dotted_pattern'] = [1, 3] mpl.rcParams['lines.scale_dashes'] = False or by setting: lines.linewidth : 1.0 lines.dashed_pattern : 6, 6 lines.dashdot_pattern : 3, 5, 1, 5 lines.dotted_pattern : 1, 3 lines.scale_dashes: False in your `matplotlibrc`{.interpreted-text role="file"} file. ### `errorbar` By default, caps on the ends of errorbars are not present. ::: plot import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np \# example data x = np.arange(0.1, 4, 0.5) y = np.exp(-x) \# example variable error bar values yerr = 0.1 + 0.2\*np.sqrt(x) xerr = 0.1 + yerr def demo(ax, rc, title): : with mpl.rc_context(rc=rc): : ax.errorbar(x, y, xerr=0.2, yerr=0.4) ax.set_title(title) fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3), tight_layout=True) demo(ax1, {\'errorbar.capsize\': 3}, \'classic\') demo(ax2, {}, \'v2.0\') ::: This also changes the return value of `~matplotlib.axes.Axes.errorbar`{.interpreted-text role="meth"} as the list of \'caplines\' will be empty by default. The previous defaults can be restored by setting: mpl.rcParams['errorbar.capsize'] = 3 or by setting : errorbar.capsize : 3 in your `matplotlibrc`{.interpreted-text role="file"} file. ### `boxplot` Previously, boxplots were composed of a mish-mash of styles that were, for better for worse, inherited from Matlab. Most of the elements were blue, but the medians were red. The fliers (outliers) were black plus-symbols (\'+\') and the whiskers were dashed lines, which created ambiguity if the (solid and black) caps were not drawn. For the new defaults, everything is black except for the median and mean lines (if drawn), which are set to the first two elements of the current color cycle. Also, the default flier markers are now hollow circles, which maintain the ability of the plus-symbols to overlap without obscuring data too much. ::: plot import numpy as np import matplotlib.pyplot as plt data = np.random.lognormal(size=(37, 4)) fig, (old, new) = plt.subplots(ncols=2, sharey=True) with plt.style.context(\'default\'): new.boxplot(data, labels=\[\'A\', \'B\', \'C\', \'D\'\]) new.set_title(\'v2.0\') with plt.style.context(\'classic\'): : old.boxplot(data, labels=\[\'A\', \'B\', \'C\', \'D\'\]) old.set_title(\'classic\') new.set_yscale(\'log\') old.set_yscale(\'log\') ::: The previous defaults can be restored by setting: mpl.rcParams['boxplot.flierprops.color'] = 'k' mpl.rcParams['boxplot.flierprops.marker'] = '+' mpl.rcParams['boxplot.flierprops.markerfacecolor'] = 'none' mpl.rcParams['boxplot.flierprops.markeredgecolor'] = 'k' mpl.rcParams['boxplot.boxprops.color'] = 'b' mpl.rcParams['boxplot.whiskerprops.color'] = 'b' mpl.rcParams['boxplot.whiskerprops.linestyle'] = '--' mpl.rcParams['boxplot.medianprops.color'] = 'r' mpl.rcParams['boxplot.meanprops.color'] = 'r' mpl.rcParams['boxplot.meanprops.marker'] = '^' mpl.rcParams['boxplot.meanprops.markerfacecolor'] = 'r' mpl.rcParams['boxplot.meanprops.markeredgecolor'] = 'k' mpl.rcParams['boxplot.meanprops.markersize'] = 6 mpl.rcParams['boxplot.meanprops.linestyle'] = '--' mpl.rcParams['boxplot.meanprops.linewidth'] = 1.0 or by setting: boxplot.flierprops.color: 'k' boxplot.flierprops.marker: '+' boxplot.flierprops.markerfacecolor: 'none' boxplot.flierprops.markeredgecolor: 'k' boxplot.boxprops.color: 'b' boxplot.whiskerprops.color: 'b' boxplot.whiskerprops.linestyle: '--' boxplot.medianprops.color: 'r' boxplot.meanprops.color: 'r' boxplot.meanprops.marker: '^' boxplot.meanprops.markerfacecolor: 'r' boxplot.meanprops.markeredgecolor: 'k' boxplot.meanprops.markersize: 6 boxplot.meanprops.linestyle: '--' boxplot.meanprops.linewidth: 1.0 in your `matplotlibrc`{.interpreted-text role="file"} file. ### `fill_between` and `fill_betweenx` [\~matplotlib.axes.Axes.fill_between]{.title-ref} and [\~matplotlib.axes.Axes.fill_betweenx]{.title-ref} both follow the patch color cycle. ::: plot import matplotlib.pyplot as plt import numpy as np fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) fig.subplots_adjust(wspace=0.3) th = np.linspace(0, 2\*np.pi, 128) N = 5 def demo(ax, extra_kwargs, title): : ax.set_title(title) return \[ax.fill_between(th, np.sin((j / N) \* np.pi + th), alpha=.5, \*\*extra_kwargs) for j in range(N)\] demo(ax1, {\'facecolor\': \'C0\'}, \'classic\') demo(ax2, {}, \'v2.0\') ::: If the facecolor is set via the `facecolors` or `color` keyword argument, then the color is not cycled. To restore the previous behavior, explicitly pass the keyword argument `facecolors='C0'` to the method call. ### Patch edges and color Most artists drawn with a patch (`~matplotlib.axes.Axes.bar`, `~matplotlib.axes.Axes.pie`, etc) no longer have a black edge by default. The default face color is now `'C0'` instead of `'b'`. ::: plot import matplotlib.pyplot as plt import numpy as np from matplotlib import rc_context import matplotlib.patches as mpatches fig, all_ax = plt.subplots(3, 2, figsize=(4, 6), tight_layout=True) def demo(ax_top, ax_mid, ax_bottom, rcparams, label): : labels = \'Frogs\', \'Hogs\', \'Dogs\', \'Logs\' fracs = \[15, 30, 45, 10\] explode = (0, 0.05, 0, 0) ax_top.set_title(label) with rc_context(rc=rcparams): : ax_top.pie(fracs, labels=labels) ax_top.set_aspect(\'equal\') ax_mid.bar(range(len(fracs)), fracs, tick_label=labels) plt.setp(ax_mid.get_xticklabels(), rotation=-45) grid = np.mgrid\[0.2:0.8:3j, 0.2:0.8:3j\].reshape(2, -1).T ax_bottom.set_xlim(0, .75) ax_bottom.set_ylim(0, .75) ax_bottom.add_artist(mpatches.Rectangle(grid\[1\] - \[0.025, 0.05\], 0.05, 0.1)) ax_bottom.add_artist(mpatches.RegularPolygon(grid\[3\], 5, radius=0.1)) ax_bottom.add_artist(mpatches.Ellipse(grid\[4\], 0.2, 0.1)) ax_bottom.add_artist(mpatches.Circle(grid\[0\], 0.1)) ax_bottom.axis(\'off\') demo(*all_ax\[:, 0\], rcparams={\'patch.force_edgecolor\': True, \'patch.facecolor\': \'b\'}, label=\'classic\') demo(*all_ax\[:, 1\], rcparams={}, label=\'v2.0\') ::: The previous defaults can be restored by setting: mpl.rcParams['patch.force_edgecolor'] = True mpl.rcParams['patch.facecolor'] = 'b' or by setting: patch.facecolor : b patch.force_edgecolor : True in your `matplotlibrc`{.interpreted-text role="file"} file. ### `hexbin` The default value of the *linecolor* keyword argument for [\~.Axes.hexbin]{.title-ref} has changed from `'none'` to `'face'`. If \'none\' is now supplied, no line edges are drawn around the hexagons. ### `bar` and `barh` {#barbarh_align} The default value of the `align` kwarg for both [\~.Axes.bar]{.title-ref} and [\~.Axes.barh]{.title-ref} is changed from `'edge'` to `'center'`. ::: plot import matplotlib.pyplot as plt import numpy as np fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(5, 5)) def demo(bar_func, bar_kwargs): : return bar_func(\[1, 2, 3\], \[1, 2, 3\], tick_label=\[\'a\', \'b\', \'c\'\], : \*\*bar_kwargs) ax1.set_title(\"classic\") ax2.set_title(\'v2.0\') demo(ax1.bar, {\'align\': \'edge\'}) demo(ax2.bar, {}) demo(ax3.barh, {\'align\': \'edge\'}) demo(ax4.barh, {}) ::: To restore the previous behavior explicitly pass the keyword argument `align='edge'` to the method call. ## Hatching The color of the lines in the hatch is now determined by - If an edge color is explicitly set, use that for the hatch color - If the edge color is not explicitly set, use `hatch.color`{.interpreted-text role="rc"} which is looked up at artist creation time. The width of the lines in a hatch pattern is now configurable by the rcParams `hatch.linewidth`{.interpreted-text role="rc"}, which defaults to 1 point. The old behavior for the line width was different depending on backend: - PDF: 0.1 pt - SVG: 1.0 pt - PS: 1 px - Agg: 1 px The old line width behavior cannot be restored across all backends simultaneously, but can be restored for a single backend by setting: mpl.rcParams['hatch.linewidth'] = 0.1 # previous pdf hatch linewidth mpl.rcParams['hatch.linewidth'] = 1.0 # previous svg hatch linewidth The behavior of the PS and Agg backends was DPI dependent, thus: mpl.rcParams['figure.dpi'] = dpi mpl.rcParams['savefig.dpi'] = dpi # or leave as default 'figure' mpl.rcParams['hatch.linewidth'] = 1.0 / dpi # previous ps and Agg hatch linewidth There is no direct API level control of the hatch color or linewidth. Hatching patterns are now rendered at a consistent density, regardless of DPI. Formerly, high DPI figures would be more dense than the default, and low DPI figures would be less dense. This old behavior cannot be directly restored, but the density may be increased by repeating the hatch specifier. ## Fonts {#default_changes_font} ### Normal text The default font has changed from \"Bitstream Vera Sans\" to \"DejaVu Sans\". DejaVu Sans has additional international and math characters, but otherwise has the same appearance as Bitstream Vera Sans. Latin, Greek, Cyrillic, Armenian, Georgian, Hebrew, and Arabic are [all supported](https://dejavu-fonts.github.io/) (but right-to-left rendering is still not handled by matplotlib). In addition, DejaVu contains a sub-set of emoji symbols. ::: plot from \_\_future\_\_ import unicode_literals import matplotlib.pyplot as plt fig, ax = plt.subplots() tick_labels = \[\'😃\', \'😎\', \'😴\', \'😲\', \'😻\'\] bar_labels = \[\'א\', \'α\', \'☣\', \'⌬\', \'ℝ\'\] y = \[1, 4, 9, 16, 25\] x = range(5) ax.bar(x, y, tick_label=tick_labels, align=\'center\') ax.xaxis.set_tick_params(labelsize=20) for \_x, \_y, t in zip(x, y, bar_labels): ax.annotate(t, (\_x, \_y), fontsize=20, ha=\'center\', xytext=(0, -2), textcoords=\'offset pixels\', bbox={\'facecolor\': \'w\'}) ax.set_title(\'Диаграмма со смайликами\') ::: See the [DejaVu Sans PDF sample for full coverage](http://dejavu.sourceforge.net/samples/DejaVuSans.pdf). ### Math text The default math font when using the built-in math rendering engine (mathtext) has changed from \"Computer Modern\" (i.e. LaTeX-like) to \"DejaVu Sans\". This change has no effect if the TeX backend is used (i.e. `text.usetex` is `True`). ::: plot import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams\[\'mathtext.fontset\'\] = \'cm\' mpl.rcParams\[\'mathtext.rm\'\] = \'serif\' fig, ax = plt.subplots(tight_layout=True, figsize=(3, 3)) ax.plot(range(15), label=r\'int: \$15 int_0\^infty dx\$\') ax.legend() ax.set_title(\'classic\') ::: ::: plot import matplotlib.pyplot as plt import matplotlib as mpl fig, ax = plt.subplots(tight_layout=True, figsize=(3, 3)) ax.plot(range(15), label=r\'int: \$15 int_0\^infty dx\$\') ax.legend() ax.set_title(\'v2.0\') ::: To revert to the old behavior set the: mpl.rcParams['mathtext.fontset'] = 'cm' mpl.rcParams['mathtext.rm'] = 'serif' or set: mathtext.fontset: cm mathtext.rm : serif in your `matplotlibrc`{.interpreted-text role="file"} file. This `rcParam` is consulted when the text is drawn, not when the artist is created. Thus all mathtext on a given `canvas` will use the same fontset. ## Legends - By default, the number of points displayed in a legend is now 1. - The default legend location is `'best'`, so the legend will be automatically placed in a location to minimize overlap with data. - The legend defaults now include rounded corners, a lighter boundary, and partially transparent boundary and background. ::: plot import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np def demo(ax, rcparams, title): : np.random.seed(2) N = 25 with mpl.rc_context(rc=rcparams): x = range(N) y = np.cumsum(np.random.randn(N) ) \# unpack the single Line2D artist ln, = ax.plot(x, y, marker=\'s\', linestyle=\'-\', label=\'plot\') ax.fill_between(x, y, 0, label=\'fill\', alpha=.5, color=ln.get_color()) ax.scatter(N\*np.random.rand(N), np.random.rand(N), label=\'scatter\') ax.set_title(title) ax.legend() fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3), tight_layout=True) classic_rc = {\'legend.fancybox\': False, : \'legend.numpoints\': 2, \'legend.scatterpoints\': 3, \'legend.framealpha\': None, \'legend.edgecolor\': \'inherit\', \'legend.loc\': \'upper right\', \'legend.fontsize\': \'large\'} demo(ax1, classic_rc, \'classic\') demo(ax2, {}, \'v2.0\') ::: The previous defaults can be restored by setting: mpl.rcParams['legend.fancybox'] = False mpl.rcParams['legend.loc'] = 'upper right' mpl.rcParams['legend.numpoints'] = 2 mpl.rcParams['legend.fontsize'] = 'large' mpl.rcParams['legend.framealpha'] = None mpl.rcParams['legend.scatterpoints'] = 3 mpl.rcParams['legend.edgecolor'] = 'inherit' or by setting: legend.fancybox : False legend.loc : upper right legend.numpoints : 2 # the number of points in the legend line legend.fontsize : large legend.framealpha : None # opacity of legend frame legend.scatterpoints : 3 # number of scatter points legend.edgecolor : inherit # legend edge color ('inherit' # means it uses axes.edgecolor) in your `matplotlibrc`{.interpreted-text role="file"} file. ## Image ### Interpolation The default interpolation method for [\~matplotlib.axes.Axes.imshow]{.title-ref} is now `'nearest'` and by default it resamples the data (both up and down sampling) before colormapping. ::: plot import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np def demo(ax, rcparams, title): : np.random.seed(2) A = np.random.rand(5, 5) with mpl.rc_context(rc=rcparams): : ax.imshow(A) ax.set_title(title) fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3), tight_layout=True) classic_rcparams = {\'image.interpolation\': \'bilinear\', : \'image.resample\': False} demo(ax1, classic_rcparams, \'classic\') demo(ax2, {}, \'v2.0\') ::: To restore the previous behavior set: mpl.rcParams['image.interpolation'] = 'bilinear' mpl.rcParams['image.resample'] = False or set: image.interpolation : bilinear # see help(imshow) for options image.resample : False in your `matplotlibrc`{.interpreted-text role="file"} file. ### Colormapping pipeline Previously, the input data was normalized, then colormapped, and then resampled to the resolution required for the screen. This meant that the final resampling was being done in color space. Because the color maps are not generally linear in RGB space, colors not in the colormap may appear in the final image. This bug was addressed by an almost complete overhaul of the image handling code. The input data is now normalized, then resampled to the correct resolution (in normalized dataspace), and then colormapped to RGB space. This ensures that only colors from the colormap appear in the final image. (If your viewer subsequently resamples the image, the artifact may reappear.) The previous behavior cannot be restored. ### Shading - The default shading mode for light source shading, in `matplotlib.colors.LightSource.shade`, is now `overlay`. Formerly, it was `hsv`. ## Plot layout ### Auto limits The previous auto-scaling behavior was to find \'nice\' round numbers as view limits that enclosed the data limits, but this could produce bad plots if the data happened to fall on a vertical or horizontal line near the chosen \'round number\' limit. The new default sets the view limits to 5% wider than the data range. ::: plot import matplotlib as mpl import matplotlib.pyplot as plt import numpy data = np.zeros(1000) data\[0\] = 1 fig = plt.figure(figsize=(6, 3)) def demo(fig, rc, title, j): : with mpl.rc_context(rc=rc): : ax = fig.add_subplot(1, 2, j) ax.plot(data) ax.set_title(title) demo(fig, {\'axes.autolimit_mode\': \'round_numbers\', : \'axes.xmargin\': 0, \'axes.ymargin\': 0}, \'classic\', 1) demo(fig, {}, \'v2.0\', 2) ::: The size of the padding in the x and y directions is controlled by the `'axes.xmargin'` and `'axes.ymargin'` rcParams respectively. Whether the view limits should be \'round numbers\' is controlled by `axes.autolimit_mode`{.interpreted-text role="rc"}. In the original `'round_number'` mode, the view limits coincide with ticks. The previous default can be restored by using: mpl.rcParams['axes.autolimit_mode'] = 'round_numbers' mpl.rcParams['axes.xmargin'] = 0 mpl.rcParams['axes.ymargin'] = 0 or setting: axes.autolimit_mode: round_numbers axes.xmargin: 0 axes.ymargin: 0 in your `matplotlibrc`{.interpreted-text role="file"} file. ### Z-order - Ticks and grids are now plotted above solid elements such as filled contours, but below lines. To return to the previous behavior of plotting ticks and grids above lines, set `rcParams['axes.axisbelow'] = False`. ### Ticks #### Direction To reduce the collision of tick marks with data, the default ticks now point outward by default. In addition, ticks are now drawn only on the bottom and left spines to prevent a porcupine appearance, and for a cleaner separation between subplots. ::: plot import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np th = np.linspace(0, 2\*np.pi, 128) y = np.sin(th) def demo(fig, rcparams, title, j): : np.random.seed(2) with mpl.rc_context(rc=rcparams): > ax = fig.add_subplot(2, 2, j) ax.hist(np.random.beta(0.5, 0.5, > 10000), 25, density=True) ax.set_xlim(0, 1) ax.set_title(title) > > ax = fig.add_subplot(2, 2, j + 2) ax.imshow(np.random.rand(5, 5)) classic = {\'xtick.direction\': \'in\', : \'ytick.direction\': \'in\', \'xtick.top\': True, \'ytick.right\': True} fig = plt.figure(figsize=(6, 6), tight_layout=True) demo(fig, classic, \'classic\', 1) demo(fig, {}, \'v2.0\', 2) ::: To restore the previous behavior set: mpl.rcParams['xtick.direction'] = 'in' mpl.rcParams['ytick.direction'] = 'in' mpl.rcParams['xtick.top'] = True mpl.rcParams['ytick.right'] = True or set: xtick.top: True xtick.direction: in ytick.right: True ytick.direction: in in your `matplotlibrc`{.interpreted-text role="file"} file. #### Number of ticks The default [\~matplotlib.ticker.Locator]{.title-ref} used for the x and y axis is [\~matplotlib.ticker.AutoLocator]{.title-ref} which tries to find, up to some maximum number, \'nicely\' spaced ticks. The locator now includes an algorithm to estimate the maximum number of ticks that will leave room for the tick labels. By default it also ensures that there are at least two ticks visible. ::: plot import matplotlib.pyplot as plt import numpy as np from matplotlib.ticker import AutoLocator fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(4, 3), tight_layout=True) ax1.set_xlim(0, .1) ax2.set_xlim(0, .1) ax1.xaxis.get_major_locator().set_params(nbins=9, steps=\[1, 2, 5, 10\]) ax1.set_title(\'classic\') ax2.set_title(\'v2.0\') ::: There is no way, other than using `mpl.style.use('classic')`, to restore the previous behavior as the default. On an axis-by-axis basis you may either control the existing locator via: : ax.xaxis.get_major_locator().set_params(nbins=9, steps=[1, 2, 5, 10]) or create a new \`\~matplotlib.ticker.MaxNLocator\`: import matplotlib.ticker as mticker ax.set_major_locator(mticker.MaxNLocator(nbins=9, steps=[1, 2, 5, 10]) The algorithm used by [\~matplotlib.ticker.MaxNLocator]{.title-ref} has been improved, and this may change the choice of tick locations in some cases. This also affects [\~matplotlib.ticker.AutoLocator]{.title-ref}, which uses `MaxNLocator` internally. For a log-scaled axis the default locator is the [\~matplotlib.ticker.LogLocator]{.title-ref}. Previously the maximum number of ticks was set to 15, and could not be changed. Now there is a *numticks* kwarg for setting the maximum to any integer value, to the string \'auto\', or to its default value of None which is equivalent to \'auto\'. With the \'auto\' setting the maximum number will be no larger than 9, and will be reduced depending on the length of the axis in units of the tick font size. As in the case of the AutoLocator, the heuristic algorithm reduces the incidence of overlapping tick labels but does not prevent it. ### Tick label formatting #### `LogFormatter` labeling of minor ticks Minor ticks on a log axis are now labeled when the axis view limits span a range less than or equal to the interval between two major ticks. See [\~matplotlib.ticker.LogFormatter]{.title-ref} for details. The minor tick labeling is turned off when using `mpl.style.use('classic')`, but cannot be controlled independently via [.rcParams]{.title-ref}. ::: plot import numpy as np import matplotlib.pyplot as plt np.random.seed(2) fig, (ax1, ax2) = plt.subplots(ncols=2, figsize=(6, 3)) fig.subplots_adjust(wspace=0.35, left=0.09, right=0.95) x = np.linspace(0.9, 1.7, 10) y = 10 \*\* x\[np.random.randint(0, 10, 10)\] ax2.semilogy(x, y) ax2.set_title(\'v2.0\') with plt.style.context(\'classic\'): : ax1.semilogy(x, y) ax1.set_xlim(ax2.get_xlim()) ax1.set_ylim(ax2.get_ylim()) ax1.set_title(\'classic\') ::: #### `ScalarFormatter` tick label formatting with offsets With the default `axes.formatter.useoffset`{.interpreted-text role="rc"}, an offset will be used when it will save 4 or more digits. This can be controlled with the new `axes.formatter.offset_threshold`{.interpreted-text role="rc"}. To restore the previous behavior of using an offset to save 2 or more digits, use `rcParams['axes.formatter.offset_threshold'] = 2`. ::: plot import numpy as np import matplotlib.pyplot as plt np.random.seed(5) fig = plt.figure(figsize=(6, 3)) fig.subplots_adjust(bottom=0.15, wspace=0.3, left=0.09, right=0.95) x = np.linspace(2000, 2008, 9) y = np.random.randn(9) + 50000 with plt.rc_context(rc={\'axes.formatter.offset_threshold\' : 2}): : ax1 = fig.add_subplot(1, 2, 1) ax1.plot(x, y) ax1.set_title(\'classic\') ax2 = fig.add_subplot(1, 2, 2) ax2.plot(x, y) ax2.set_title(\'v2.0\') ::: #### `AutoDateFormatter` format strings The default date formats are now all based on ISO format, i.e., with the slowest-moving value first. The date formatters are configurable through the `date.autoformatter.*` rcParams. ------------------------------------------------------------------------------------------------ Threshold (tick rcParam classic v2.0 interval \>= than) ----------------------- ------------------------------------ ----------------- ----------------- 365 days `'date.autoformatter.year'` `'%Y'` `'%Y'` 30 days `'date.autoformatter.month'` `'%b %Y'` `'%Y-%m'` 1 day `'date.autoformatter.day'` `'%b %d %Y'` `'%Y-%m-%d'` 1 hour `'date.autoformatter.hour'` `'%H:%M:%S'` `'%H:%M'` 1 minute `'date.autoformatter.minute'` `'%H:%M:%S.%f'` `'%H:%M:%S'` 1 second `'date.autoformatter.second'` `'%H:%M:%S.%f'` `'%H:%M:%S'` 1 microsecond `'date.autoformatter.microsecond'` `'%H:%M:%S.%f'` `'%H:%M:%S.%f'` ------------------------------------------------------------------------------------------------ Python\'s `%x` and `%X` date formats may be of particular interest to format dates based on the current locale. The previous default can be restored by: mpl.rcParams['date.autoformatter.year'] = '%Y' mpl.rcParams['date.autoformatter.month'] = '%b %Y' mpl.rcParams['date.autoformatter.day'] = '%b %d %Y' mpl.rcParams['date.autoformatter.hour'] = '%H:%M:%S' mpl.rcParams['date.autoformatter.minute'] = '%H:%M:%S.%f' mpl.rcParams['date.autoformatter.second'] = '%H:%M:%S.%f' mpl.rcParams['date.autoformatter.microsecond'] = '%H:%M:%S.%f' or setting : date.autoformatter.year : %Y date.autoformatter.month : %b %Y date.autoformatter.day : %b %d %Y date.autoformatter.hour : %H:%M:%S date.autoformatter.minute : %H:%M:%S.%f date.autoformatter.second : %H:%M:%S.%f date.autoformatter.microsecond : %H:%M:%S.%f in your `matplotlibrc`{.interpreted-text role="file"} file. ## mplot3d - mplot3d now obeys some style-related rcParams, rather than using hard-coded defaults. These include: - xtick.major.width - ytick.major.width - xtick.color - ytick.color - axes.linewidth - axes.edgecolor - grid.color - grid.linewidth - grid.linestyle --- ::: redirect-from /users/prev_whats_new/github_stats_3.0.0 ::: # GitHub statistics for 3.0.0 (Sep 18, 2018) {#github-stats-3-0-0} GitHub statistics for 2017/01/17 (tag: v2.0.0) - 2018/09/18 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 123 issues and merged 598 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/23?closed=1) The following 478 authors contributed 9809 commits. - 816-8055 - Aashil Patel - AbdealiJK - Adam - Adam Williamson - Adrian Price-Whelan - Adrien Chardon - Adrien F. Vincent - ahed87 - akrherz - Akshay Nair - Alan Bernstein - Alberto - alcinos - Aleksey Bilogur - Alex Rothberg - Alexander Buchkovsky - Alexander Harnisch - AlexCav - Alexis Bienvenüe - Ali Uneri - Allan Haldane - Allen Downey - Alvaro Sanchez - alvarosg - AndersonDaniel - Andras Deak - Andreas Gustafsson - Andreas Hilboll - Andreas Mayer - Andreas Mueller - Andrew Nelson - Andy Mastbaum - aneda - Anthony Scopatz - Anton Akhmerov - Antony Lee - aparamon - apodemus - Arthur Paulino - Arvind - as691454 - ash13 - Atharva Khare - Avinash Sharma - Bastian Bechtold - bduick - Ben - Ben Root - Benedikt Daurer - Benjamin Berg - Benjamin Congdon - Bernhard M. Wiedemann - BHT - Bianca Gibson - Björn Dahlgren - Blaise Thompson - Boaz Mohar - Brendan Zhang - Brennan Magee - Bruno Zohreh - BTWS - buefox - Cameron Davidson-Pilon - Cameron Fackler - cclauss - ch3rn0v - Charles Ruan - chelseatroy - Chen Karako - Chris Holdgraf - Christoph Deil - Christoph Gohlke - Cimarron Mittelsteadt - CJ Carey - cknd - cldssty - clintval - Cody Scot - Colin - Conner R. Phillips - Craig Citro - DaCoEx - dahlbaek - Dakota Blair - Damian - Dan Hickstein - Dana - Daniel C. Marcu - Daniel Laidig - danielballan - Danny Hermes - daronjp - DaveL17 - David A - David Brooks - David Kent - David Stansby - deeenes - deepyaman - Derek Kim - Derek Tropf - Devashish Deshpande - Diego Mora Cespedes - Dietmar Schwertberger - Dietrich Brunn - Divyam Madaan - dlmccaffrey - Dmitry Shachnev - Dora Fraeman - DoriekeMG - Dorota Jarecka - Doug Blank - Drew J. Sonne - Duncan Macleod - Dylan Evans - E. G. Patrick Bos - Egor Panfilov - Elijah Schutz - Elizabeth Seiver - Elliott Sales de Andrade - Elvis Stansvik - Emlyn Price - endolith - Eric Dill - Eric Firing - Eric Galloway - Eric Larson - Eric Wang (Mac) - Eric Wieser - Erik M. Bray - Erin Pintozzi - et2010 - Ethan Ligon - Eugene Yurtsev - Fabian Kloosterman - Fabian-Robert Stöter - FedeMiorelli - Federico Ariza - Felix - Felix Kohlgrüber - Felix Yan - Filip Dimitrovski - Florencia Noriega - Florian Le Bourdais - Franco Vaccari - Francoise Provencher - Frank Yu - fredrik-1 - fuzzythecat - Gabe - Gabriel Munteanu - Gauravjeet - Gaute Hope - gcallah - Geoffrey Spear - gnaggnoyil - goldstarwebs - Graeme Smecher - greg-roper - gregorybchris - Grillard - Guillermo Breto - Gustavo Goretkin - Hajoon Choi - Hakan Kucukdereli - hannah - Hans Moritz Günther - Harnesser - Harshal Prakash Patankar - Harshit Patni - Hassan Kibirige - Hastings Greer - Heath Henley - Heiko Oberdiek - Helder - helmiriawan - Henning Pohl - Herbert Kruitbosch - HHest - Hubert Holin - Ian Thomas - Ida Hjorth - Ildar Akhmetgaleev - ilivni - Ilya Flyamer - ImportanceOfBeingErnest - ImSoErgodic - Isa Hassen - Isaac Schwabacher - Isaac Slavitt - Ismo Toijala - J Alammar - J. Goutin - Jaap Versteegh - Jacob McDonald - jacob-on-github - Jae-Joon Lee - Jake Vanderplas - James A. Bednar - Jamie Nunez - Jan Koehler - Jan Schlüter - Jan Schulz - Jarrod Millman - Jason King - Jason Neal - Jason Zheng - jbhopkins - jdollichon - Jeffrey Hokanson @ Loki - JelsB - Jens Hedegaard Nielsen - Jerry Lui - jerrylui803 - jhelie - jli - Jody Klymak - joelostblom - Johannes Wienke - John Hoffman - John Vandenberg - Johnny Gill - JojoBoulix - jonchar - Joseph Albert - Joseph Fox-Rabinovitz - Joseph Jon Booker - Joseph Martinot-Lagarde - Jouni K. Seppänen - Juan Nunez-Iglesias - Julia Sprenger - Julian Mehne - Julian V. Modesto - Julien Lhermitte - Julien Schueller - Jun Tan - Justin Cai - Jörg Dietrich - Kacper Kowalik (Xarthisius) - Kanchana Ranasinghe - Katrin Leinweber - Keerysanth Sribaskaran - keithbriggs - Kenneth Ma - Kevin Davies - Kevin Ji - Kevin Keating - Kevin Rose - Kexuan Sun - khyox - Kieran Ramos - Kjartan Myrdal - Kjell Le - Klara Gerlei - klaus - klonuo - Kristen M. Thyng - kshramt - Kyle Bridgemohansingh - Kyle Sunden - Kyler Brown - Laptop11_ASPP2016 - lboogaard - legitz7 - Leo Singer - Leon Yin - Levi Kilcher - Liam Brannigan - Lionel Miller - lspvic - Luca Verginer - Luis Pedro Coelho - luz.paz - lzkelley - Maarten Baert - Magnus Nord - mamrehn - Manish Devgan - Manuel Jung - Mark Harfouche - Martin Fitzpatrick - Martin Spacek - Massimo Santini - Matt Hancock - Matt Newville - Matthew Bell - Matthew Brett - Matthias Bussonnier - Matthias Lüthi - Matti Picus - Maximilian Albert - Maximilian Maahn - Maximilian Nöthe - mcquin - Mher Kazandjian - Michael Droettboom - Michael Scott Cuthbert - Michael Seifert - Michiel de Hoon - Mike Henninger - Mike Jarvis - MinRK - Mitar - mitch - mlub - mobando - Molly Rossow - Moritz Boehle - muahah - Mudit Surana - myyc - Naoya Kanai - Nathan Goldbaum - Nathan Musoke - Nathaniel M. Beaver - navdeep rana - nbrunett - Nelle Varoquaux - nemanja - neok-m4700 - nepix32 - Nick Forrington - Nick Garvey - Nick Papior - Nico Schlömer - Nicolas P. Rougier - Nicolas Tessore - Nik Quibin - Nikita Kniazev - Nils Werner - Ninad Bhat - nmartensen - Norman Fomferra - ob - OceanWolf - Olivier - Orso Meneghini - Osarumwense - Pankaj Pandey - Paramonov Andrey - Pastafarianist - Paul Ganssle - Paul Hobson - Paul Ivanov - Paul Kirow - Paul Romano - Paul Seyfert - Pavol Juhas - pdubcali - Pete Huang - Pete Peterson - Peter Mackenzie-Helnwein - Peter Mortensen - Peter Würtz - Petr Danecek - pharshalp - Phil Elson - Phil Ruffwind - Pierre de Buyl - Pierre Haessig - Pranav Garg - productivememberofsociety666 - Przemysław Dąbek - Qingpeng \"Q.P.\" Zhang - RAKOTOARISON Herilalaina - Ramiro Gómez - Randy Olson - rebot - Richard Gowers - Rishikesh - Rob Harrigan - Robin Dunn - Robin Neatherway - Robin Wilson - Ronald Hartley-Davies - Roy Smith - Rui Lopes - ruin - rvhbooth - Ryan - Ryan May - Ryan Morshead - RyanPan - s0vereign - Saket Choudhary - Salganos - Salil Vanvari - Salinder Sidhu - Sam Vaughan - Samson - Samuel St-Jean - Sander - scls19fr - Scott Howard - Scott Lasley - scott-vsi - Sean Farley - Sebastian Raschka - Sebastián Vanrell - Seraphim Alvanides - Sergey B Kirpichev - serv-inc - settheory - shaunwbell - Simon Gibbons - simonpf - sindunuragarp - Sourav Singh - Stefan Pfenninger - Stephan Erb - Sterling Smith - Steven Silvester - Steven Tilley - stone - stonebig - Tadeo Corradi - Taehoon Lee - Tanuj - Taras - Taras Kuzyo - TD22057 - Ted Petrou - terranjp - Terrence J. Katzenbaer - Terrence Katzenbaer - The Gitter Badger - Thomas A Caswell - Thomas Hisch - Thomas Levine - Thomas Mansencal - Thomas Robitaille - Thomas Spura - Thomas VINCENT - Thorsten Liebig - thuvejan - Tian Xia - Till Stensitzki - Tim Hoffmann - tmdavison - Tobias Froehlich - Tobias Megies - Tom - Tom Augspurger - Tom Dupré la Tour - tomoemon - tonyyli - Trish Gillett-Kawamoto - Truong Pham - Tuan Dung Tran - u55 - ultra-andy - V. R - vab9 - Valentin Schmidt - Vedant Nanda - Vidur Satija - vraelvrangr - Víctor Zabalza - WANG Aiyong - Warren Weckesser - watkinrt - Wieland Hoffmann - Will Silva - William Granados - William Mallard - Xufeng Wang - y1thof - Yao-Yuan Mao - Yuval Langer - Zac Hatfield-Dodds - Zbigniew Jędrzejewski-Szmek - zhangeugenia - ZhaoZhonglun1991 - zhoubecky - ZWL - Élie Gouzien - Андрей Парамонов GitHub issues and pull requests: Pull Requests (598): - `12145`{.interpreted-text role="ghpull"}: Doc final 3.0 docs - `12143`{.interpreted-text role="ghpull"}: Backport PR #12142 on branch v3.0.x (Unbreak formlayout for image edits.) - `12142`{.interpreted-text role="ghpull"}: Unbreak formlayout for image edits. - `12135`{.interpreted-text role="ghpull"}: Backport PR #12131 on branch v3.0.x (Fixes currently release version of cartopy) - `12131`{.interpreted-text role="ghpull"}: Fixes currently release version of cartopy - `12129`{.interpreted-text role="ghpull"}: Backports for 3.0 - `12132`{.interpreted-text role="ghpull"}: Backport PR #12130 on branch v3.0.x (Mention colorbar.minorticks_on/off in references) - `12130`{.interpreted-text role="ghpull"}: Mention colorbar.minorticks_on/off in references - `12099`{.interpreted-text role="ghpull"}: FIX: make sure all ticks show up for colorbar minor tick - `11962`{.interpreted-text role="ghpull"}: Propagate changes to backend loading to setup/setupext. - `12128`{.interpreted-text role="ghpull"}: Unbreak the Sphinx 1.8 build by renaming :math: to :mathmpl:. - `12126`{.interpreted-text role="ghpull"}: Backport PR #12117 on branch v3.0.x (Fix Agg extent calculations for empty draws) - `12113`{.interpreted-text role="ghpull"}: Backport PR #12112 on branch v3.0.x (Reword the LockDraw docstring.) - `12112`{.interpreted-text role="ghpull"}: Reword the LockDraw docstring. - `12110`{.interpreted-text role="ghpull"}: Backport PR #12109 on branch v3.0.x (Pin to sphinx\<1.8; unremove sphinxext.mathmpl.) - `12084`{.interpreted-text role="ghpull"}: DOC: link palettable - `12096`{.interpreted-text role="ghpull"}: Backport PR #12092 on branch v3.0.x (Update backend_qt5agg to fix PySide2 mem issues) - `12083`{.interpreted-text role="ghpull"}: Backport PR #12012 on branch v3.0.x (FIX: fallback text renderer to fig.\_cachedRenderer, if none found) - `12081`{.interpreted-text role="ghpull"}: Backport PR #12037 on branch v3.0.x (Fix ArtistInspector.get_aliases.) - `12080`{.interpreted-text role="ghpull"}: Backport PR #12053 on branch v3.0.x (Fix up some OSX backend issues) - `12037`{.interpreted-text role="ghpull"}: Fix ArtistInspector.get_aliases. - `12053`{.interpreted-text role="ghpull"}: Fix up some OSX backend issues - `12064`{.interpreted-text role="ghpull"}: Backport PR #11971 on branch v3.0.x (FIX: use cached renderer on Legend.get_window_extent) - `12063`{.interpreted-text role="ghpull"}: Backport PR #12036 on branch v3.0.x (Interactive tests update) - `11928`{.interpreted-text role="ghpull"}: Update doc/conf.py to avoid warnings with (future) sphinx 1.8. - `12048`{.interpreted-text role="ghpull"}: Backport PR #12047 on branch v3.0.x (Remove asserting about current backend at the end of mpl_test_settings.) - `11971`{.interpreted-text role="ghpull"}: FIX: use cached renderer on Legend.get_window_extent - `12036`{.interpreted-text role="ghpull"}: Interactive tests update - `12029`{.interpreted-text role="ghpull"}: Backport PR #12022 on branch v3.0.x (Remove intent to deprecate rcParams\[\"backend_fallback\"\].) - `12047`{.interpreted-text role="ghpull"}: Remove asserting about current backend at the end of mpl_test_settings. - `12020`{.interpreted-text role="ghpull"}: Backport PR #12019 on branch v3.0.x (typo: s/unmultipled/unmultiplied) - `12022`{.interpreted-text role="ghpull"}: Remove intent to deprecate rcParams\[\"backend_fallback\"\]. - `12028`{.interpreted-text role="ghpull"}: Backport PR #12023 on branch v3.0.x (Fix deprecation check in wx Timer.) - `12023`{.interpreted-text role="ghpull"}: Fix deprecation check in wx Timer. - `12019`{.interpreted-text role="ghpull"}: typo: s/unmultipled/unmultiplied - `12017`{.interpreted-text role="ghpull"}: Backport PR #12016 on branch v3.0.x (Fix AttributeError in GTK3Agg backend) - `12016`{.interpreted-text role="ghpull"}: Fix AttributeError in GTK3Agg backend - `11991`{.interpreted-text role="ghpull"}: Backport PR #11988 on branch v3.0.x - `11978`{.interpreted-text role="ghpull"}: Backport PR #11973 on branch v3.0.x - `11968`{.interpreted-text role="ghpull"}: Backport PR #11963 on branch v3.0.x - `11967`{.interpreted-text role="ghpull"}: Backport PR #11961 on branch v3.0.x - `11969`{.interpreted-text role="ghpull"}: Fix an invalid escape sequence. - `11963`{.interpreted-text role="ghpull"}: Fix some lgtm convention alerts - `11961`{.interpreted-text role="ghpull"}: Downgrade backend_version log to DEBUG level. - `11953`{.interpreted-text role="ghpull"}: Backport PR #11896 on branch v3.0.x - `11896`{.interpreted-text role="ghpull"}: Resolve backend in rcParams.\_\_getitem\_\_(\"backend\"). - `11950`{.interpreted-text role="ghpull"}: Backport PR #11934 on branch v3.0.x - `11952`{.interpreted-text role="ghpull"}: Backport PR #11949 on branch v3.0.x - `11949`{.interpreted-text role="ghpull"}: Remove test2.png from examples. - `11934`{.interpreted-text role="ghpull"}: Suppress the \"non-GUI backend\" warning from the .. plot:: directive\... - `11918`{.interpreted-text role="ghpull"}: Backport PR #11917 on branch v3.0.x - `11916`{.interpreted-text role="ghpull"}: Backport PR #11897 on branch v3.0.x - `11915`{.interpreted-text role="ghpull"}: Backport PR #11591 on branch v3.0.x - `11897`{.interpreted-text role="ghpull"}: HTMLWriter, put initialisation of frames in setup - `11591`{.interpreted-text role="ghpull"}: BUG: correct the scaling in the floating-point slop test. - `11910`{.interpreted-text role="ghpull"}: Backport PR #11907 on branch v3.0.x - `11907`{.interpreted-text role="ghpull"}: Move TOC back to top in axes documentation - `11904`{.interpreted-text role="ghpull"}: Backport PR #11900 on branch v3.0.x - `11900`{.interpreted-text role="ghpull"}: Allow args to pass through \_allow_super_init - `11889`{.interpreted-text role="ghpull"}: Backport PR #11847 on branch v3.0.x - `11890`{.interpreted-text role="ghpull"}: Backport PR #11850 on branch v3.0.x - `11850`{.interpreted-text role="ghpull"}: FIX: macosx framework check - `11883`{.interpreted-text role="ghpull"}: Backport PR #11862 on branch v3.0.x - `11882`{.interpreted-text role="ghpull"}: Backport PR #11876 on branch v3.0.x - `11876`{.interpreted-text role="ghpull"}: MAINT Better error message for number of colors versus number of data... - `11862`{.interpreted-text role="ghpull"}: Fix NumPy FutureWarning for non-tuple indexing. - `11845`{.interpreted-text role="ghpull"}: Use Format_ARGB32_Premultiplied instead of RGBA8888 for Qt backends. - `11843`{.interpreted-text role="ghpull"}: Remove unnecessary use of nose. - `11600`{.interpreted-text role="ghpull"}: backend switching \-- don\'t create a public fallback API - `11833`{.interpreted-text role="ghpull"}: adding show inheritance to autosummary template - `11828`{.interpreted-text role="ghpull"}: changed warning in animation - `11829`{.interpreted-text role="ghpull"}: func animation warning changes - `11826`{.interpreted-text role="ghpull"}: DOC documented more of the gridspec options - `11818`{.interpreted-text role="ghpull"}: Merge v2.2.x - `11821`{.interpreted-text role="ghpull"}: DOC: remove multicolumns from examples - `11819`{.interpreted-text role="ghpull"}: DOC: fix minor typo in figure example - `11722`{.interpreted-text role="ghpull"}: Remove unnecessary hacks from setup.py. - `11802`{.interpreted-text role="ghpull"}: gridspec tutorial edits - `11801`{.interpreted-text role="ghpull"}: update annotations - `11734`{.interpreted-text role="ghpull"}: Small cleanups to backend_agg. - `11785`{.interpreted-text role="ghpull"}: Add missing API changes - `11788`{.interpreted-text role="ghpull"}: Fix DeprecationWarning on LocatableAxes - `11558`{.interpreted-text role="ghpull"}: Added xkcd Style for Markers (plot only) - `11755`{.interpreted-text role="ghpull"}: Add description for metadata argument of savefig - `11703`{.interpreted-text role="ghpull"}: FIX: make update-from also set the original face/edgecolor - `11765`{.interpreted-text role="ghpull"}: DOC: reorder examples and fix top level heading - `11724`{.interpreted-text role="ghpull"}: Fix cairo\'s image inversion and alpha misapplication. - `11726`{.interpreted-text role="ghpull"}: Consolidate agg-buffer examples. - `11754`{.interpreted-text role="ghpull"}: FIX: update spine positions before get extents - `11779`{.interpreted-text role="ghpull"}: Remove unused attribute in tests. - `11770`{.interpreted-text role="ghpull"}: Correct errors in documentation - `11778`{.interpreted-text role="ghpull"}: Unpin pandas in the CI. - `11772`{.interpreted-text role="ghpull"}: Clarifying an error message - `11760`{.interpreted-text role="ghpull"}: Switch grid documentation to numpydoc style - `11705`{.interpreted-text role="ghpull"}: Suppress/fix some test warnings. - `11763`{.interpreted-text role="ghpull"}: Pin OSX CI to numpy\<1.15 to unbreak the build. - `11767`{.interpreted-text role="ghpull"}: Add tolerance to csd frequency test - `11757`{.interpreted-text role="ghpull"}: PGF backend output text color even if black - `11751`{.interpreted-text role="ghpull"}: Remove the unused \'verbose\' option from setupext. - `9084`{.interpreted-text role="ghpull"}: Require calling a \_BoundMethodProxy to get the underlying callable. - `11752`{.interpreted-text role="ghpull"}: Fix section level of Previous What\'s New - `10513`{.interpreted-text role="ghpull"}: Replace most uses of getfilesystemencoding by os.fs{en,de}code. - `11739`{.interpreted-text role="ghpull"}: fix tight_layout bug #11737 - `11744`{.interpreted-text role="ghpull"}: minor doc update on axes_grid1\'s inset_axes - `11729`{.interpreted-text role="ghpull"}: Pass \'figure\' as kwarg to FigureCanvasQt5Agg super \_\_init\_\_. - `11736`{.interpreted-text role="ghpull"}: Remove unused needs_sphinx marker; move importorskip to toplevel. - `11731`{.interpreted-text role="ghpull"}: Directly get the size of the renderer buffer from the renderer. - `11717`{.interpreted-text role="ghpull"}: DOC: fix broken link in inset-locator example - `11723`{.interpreted-text role="ghpull"}: Start work on making colormaps picklable. - `11721`{.interpreted-text role="ghpull"}: Remove some references to colorConverter. - `11713`{.interpreted-text role="ghpull"}: Don\'t assume cwd in test_ipynb. - `11026`{.interpreted-text role="ghpull"}: ENH add an inset_axes to the axes class - `11712`{.interpreted-text role="ghpull"}: Fix drawing on qt+retina. - `11714`{.interpreted-text role="ghpull"}: docstring for Figure.tight_layout don\'t include renderer parameter - `8951`{.interpreted-text role="ghpull"}: Let QPaintEvent tell us what region to repaint. - `11234`{.interpreted-text role="ghpull"}: Add fig.add_artist method - `11706`{.interpreted-text role="ghpull"}: Remove unused private method. - `11637`{.interpreted-text role="ghpull"}: Split API changes into individual pages - `10403`{.interpreted-text role="ghpull"}: Deprecate LocatableAxes from toolkits - `11699`{.interpreted-text role="ghpull"}: Dedent overindented rst bullet lists. - `11701`{.interpreted-text role="ghpull"}: Use skipif instead of xfail when test dependencies are missing. - `11700`{.interpreted-text role="ghpull"}: Don\'t use pytest -rw now that pytest-warnings is builtin. - `11696`{.interpreted-text role="ghpull"}: Don\'t force backend in toolmanager example. - `11690`{.interpreted-text role="ghpull"}: Avoid using private APIs in examples. - `11684`{.interpreted-text role="ghpull"}: Style - `11666`{.interpreted-text role="ghpull"}: TESTS: Increase tolerance for aarch64 tests - `11680`{.interpreted-text role="ghpull"}: Boring style fixes. - `11678`{.interpreted-text role="ghpull"}: Use super() instead of manually fetching supermethods for parasite axes. - `11679`{.interpreted-text role="ghpull"}: Remove pointless draw() at the end of static examples. - `11676`{.interpreted-text role="ghpull"}: Remove unused C++ code. - `11010`{.interpreted-text role="ghpull"}: ENH: Add gridspec method to figure, and subplotspecs - `11672`{.interpreted-text role="ghpull"}: Add comment re: use of lru_cache in PsfontsMap. - `11674`{.interpreted-text role="ghpull"}: Boring style fixes. - `10954`{.interpreted-text role="ghpull"}: Cache various dviread constructs globally. - `9150`{.interpreted-text role="ghpull"}: Don\'t update style-blacklisted rcparams in [rc]()\* functions - `10936`{.interpreted-text role="ghpull"}: Simplify tkagg C extension. - `11378`{.interpreted-text role="ghpull"}: SVG Backend gouraud_triangle Correction - `11383`{.interpreted-text role="ghpull"}: FIX: Improve *c* (color) kwarg checking in scatter and the related exceptions - `11627`{.interpreted-text role="ghpull"}: FIX: CL avoid fully collapsed axes - `11504`{.interpreted-text role="ghpull"}: Bump pgi requirement to 0.0.11.2. - `11640`{.interpreted-text role="ghpull"}: Fix barplot color if none and alpha is set - `11443`{.interpreted-text role="ghpull"}: changed paths in kwdocs - `11626`{.interpreted-text role="ghpull"}: Minor docstring fixes - `11631`{.interpreted-text role="ghpull"}: DOC: better tight_layout error handling - `11651`{.interpreted-text role="ghpull"}: Remove unused imports in examples - `11633`{.interpreted-text role="ghpull"}: Clean up next api_changes - `11643`{.interpreted-text role="ghpull"}: Fix deprecation messages. - `9223`{.interpreted-text role="ghpull"}: Set norm to log if bins==\'log\' in hexbin - `11622`{.interpreted-text role="ghpull"}: FIX: be forgiving about the event for enterEvent not having a pos - `11581`{.interpreted-text role="ghpull"}: backend switching. - `11616`{.interpreted-text role="ghpull"}: Fix some doctest issues - `10872`{.interpreted-text role="ghpull"}: Cleanup \_plot_args_replacer logic - `11617`{.interpreted-text role="ghpull"}: Clean up what\'s new - `11610`{.interpreted-text role="ghpull"}: FIX: let colorbar extends work for PowerNorm - `11615`{.interpreted-text role="ghpull"}: Revert glyph warnings - `11614`{.interpreted-text role="ghpull"}: CI: don\'t run tox to test pytz - `11603`{.interpreted-text role="ghpull"}: Doc merge up - `11613`{.interpreted-text role="ghpull"}: Make flake8 exceptions explicit - `11611`{.interpreted-text role="ghpull"}: Fix css for parameter types - `10001`{.interpreted-text role="ghpull"}: MAINT/BUG: Don\'t use 5-sided quadrilaterals in Axes3D.plot_surface - `10234`{.interpreted-text role="ghpull"}: PowerNorm: do not clip negative values - `11398`{.interpreted-text role="ghpull"}: Simplify retrieval of cache and config directories - `10682`{.interpreted-text role="ghpull"}: ENH have ax.get_tightbbox have a bbox around all artists attached to axes. - `11590`{.interpreted-text role="ghpull"}: Don\'t associate Wx timers with the parent frame. - `10245`{.interpreted-text role="ghpull"}: Cache paths of fonts shipped with mpl relative to the mpl data path. - `11381`{.interpreted-text role="ghpull"}: Deprecate text.latex.unicode. - `11601`{.interpreted-text role="ghpull"}: FIX: subplots don\'t mutate kwargs passed by user. - `11609`{.interpreted-text role="ghpull"}: Remove \_macosx.NavigationToolbar. - `11608`{.interpreted-text role="ghpull"}: Remove some conditional branches in examples for wx\<4. - `11604`{.interpreted-text role="ghpull"}: TST: Place animation files in a temp dir. - `11605`{.interpreted-text role="ghpull"}: Suppress a spurious missing-glyph warning with ft2font. - `11360`{.interpreted-text role="ghpull"}: Pytzectomy - `10885`{.interpreted-text role="ghpull"}: Move GTK3 setupext checks to within the process. - `11081`{.interpreted-text role="ghpull"}: Help tool for Wx backends - `10851`{.interpreted-text role="ghpull"}: Wx Toolbar for ToolManager - `11247`{.interpreted-text role="ghpull"}: Remove mplDeprecation - `9795`{.interpreted-text role="ghpull"}: Backend switching - `9426`{.interpreted-text role="ghpull"}: Don\'t mark a patch transform as set if the parent transform is not set. - `9175`{.interpreted-text role="ghpull"}: Warn on freetype missing glyphs. - `11412`{.interpreted-text role="ghpull"}: Make contour and contourf color assignments consistent. - `11477`{.interpreted-text role="ghpull"}: Enable flake8 and re-enable it everywhere - `11165`{.interpreted-text role="ghpull"}: Fix figure window icon - `11584`{.interpreted-text role="ghpull"}: ENH: fix colorbar bad minor ticks - `11438`{.interpreted-text role="ghpull"}: ENH: add get_gridspec convenience method to subplots - `11451`{.interpreted-text role="ghpull"}: Cleanup Matplotlib API docs - `11579`{.interpreted-text role="ghpull"}: DOC update some examples to use constrained_layout=True - `11594`{.interpreted-text role="ghpull"}: Some more docstring cleanups. - `11593`{.interpreted-text role="ghpull"}: Skip wx interactive tests on OSX. - `11592`{.interpreted-text role="ghpull"}: Remove some extra spaces in docstrings/comments. - `11585`{.interpreted-text role="ghpull"}: Some doc cleanup of Triangulation - `10474`{.interpreted-text role="ghpull"}: Use TemporaryDirectory instead of mkdtemp in a few places. - `11240`{.interpreted-text role="ghpull"}: Deprecate the examples.directory rcParam. - `11370`{.interpreted-text role="ghpull"}: Sorting drawn artists by their zorder when blitting using FuncAnimation - `11576`{.interpreted-text role="ghpull"}: Add parameter doc to save_diff_image - `11573`{.interpreted-text role="ghpull"}: Inline setup_external_compile into setupext. - `11571`{.interpreted-text role="ghpull"}: Cleanup stix_fonts_demo example. - `11563`{.interpreted-text role="ghpull"}: Use explicit signature in pyplot.close() - `9801`{.interpreted-text role="ghpull"}: ENH: Change default Autodatelocator *interval_multiples* - `11570`{.interpreted-text role="ghpull"}: More simplifications to FreeType setup on Windows. - `11401`{.interpreted-text role="ghpull"}: Some py3fications. - `11566`{.interpreted-text role="ghpull"}: Cleanups. - `11520`{.interpreted-text role="ghpull"}: Add private API retrieving the current event loop and backend GUI info. - `11544`{.interpreted-text role="ghpull"}: Restore axes sharedness when unpickling. - `11568`{.interpreted-text role="ghpull"}: Figure.text changes - `11248`{.interpreted-text role="ghpull"}: Simplify FreeType Windows build. - `11556`{.interpreted-text role="ghpull"}: Fix colorbar bad ticks - `11494`{.interpreted-text role="ghpull"}: Fix CI install of wxpython. - `11564`{.interpreted-text role="ghpull"}: triinterpolate cleanups. - `11548`{.interpreted-text role="ghpull"}: Use numpydoc-style parameter lists for choices - `9583`{.interpreted-text role="ghpull"}: Add edgecolors kwarg to contourf - `10275`{.interpreted-text role="ghpull"}: Update contour.py and widget.py - `11547`{.interpreted-text role="ghpull"}: Fix example links - `11555`{.interpreted-text role="ghpull"}: Fix spelling in title - `11404`{.interpreted-text role="ghpull"}: FIX: don\'t include text at -inf in bbox - `11455`{.interpreted-text role="ghpull"}: Fixing the issue where right column and top row generate wrong stream... - `11297`{.interpreted-text role="ghpull"}: Prefer warn_deprecated instead of warnings.warn. - `11495`{.interpreted-text role="ghpull"}: Update the documentation guidelines - `11545`{.interpreted-text role="ghpull"}: Doc: fix x(filled) marker image - `11287`{.interpreted-text role="ghpull"}: Maintain artist addition order in Axes.mouseover_set. - `11530`{.interpreted-text role="ghpull"}: FIX: Ensuring both x and y attrs of LocationEvent are int - `10336`{.interpreted-text role="ghpull"}: Use Integral and Real in typechecks rather than explicit types. - `10298`{.interpreted-text role="ghpull"}: Apply gtk3 background. - `10297`{.interpreted-text role="ghpull"}: Fix gtk3agg alpha channel. - `9094`{.interpreted-text role="ghpull"}: axisbelow should just set zorder. - `11542`{.interpreted-text role="ghpull"}: Documentation polar grids - `11459`{.interpreted-text role="ghpull"}: Doc changes in add_subplot and add_axes - `10908`{.interpreted-text role="ghpull"}: Make draggable callbacks check that artist has not been removed. - `11522`{.interpreted-text role="ghpull"}: Small cleanups. - `11539`{.interpreted-text role="ghpull"}: DOC: talk about sticky edges in Axes.margins - `11540`{.interpreted-text role="ghpull"}: adding axes to module list - `11537`{.interpreted-text role="ghpull"}: Fix invalid value warning when autoscaling with no data limits - `11512`{.interpreted-text role="ghpull"}: Skip 3D rotation example in sphinx gallery - `11538`{.interpreted-text role="ghpull"}: Re-enable pep8 on examples folder - `11136`{.interpreted-text role="ghpull"}: Move remaining examples from api/ - `11519`{.interpreted-text role="ghpull"}: Raise ImportError on failure to import backends. - `11529`{.interpreted-text role="ghpull"}: add documentation for quality in savefig - `11528`{.interpreted-text role="ghpull"}: Replace an unnecessary zip() in mplot3d by numpy ops. - `11492`{.interpreted-text role="ghpull"}: add \_\_repr\_\_ to GridSpecBase - `11521`{.interpreted-text role="ghpull"}: Add missing `.` to rcParam - `11491`{.interpreted-text role="ghpull"}: Fixed the source path on windows in rcparam_role - `11514`{.interpreted-text role="ghpull"}: Remove embedding_in_tk_canvas, which demonstrated a private API. - `11507`{.interpreted-text role="ghpull"}: Fix embedding_in_tk_canvas example. - `11513`{.interpreted-text role="ghpull"}: Changed docstrings in Text - `11503`{.interpreted-text role="ghpull"}: Remove various mentions of the now removed GTK(2) backend. - `11493`{.interpreted-text role="ghpull"}: Update a test to a figure-equality test. - `11501`{.interpreted-text role="ghpull"}: Treat empty \$MPLBACKEND as an unset value. - `11395`{.interpreted-text role="ghpull"}: Various fixes to deprecated and warn_deprecated. - `11408`{.interpreted-text role="ghpull"}: Figure equality-based tests. - `11461`{.interpreted-text role="ghpull"}: Fixed bug in rendering font property kwargs list - `11397`{.interpreted-text role="ghpull"}: Replace ACCEPTS by standard numpydoc params table. - `11483`{.interpreted-text role="ghpull"}: Use pip requirements files for travis build - `11481`{.interpreted-text role="ghpull"}: remove more pylab references - `10940`{.interpreted-text role="ghpull"}: Run flake8 instead of pep8 on Python 3.6 - `11476`{.interpreted-text role="ghpull"}: Remove pylab references - `11448`{.interpreted-text role="ghpull"}: Link rcParams role to docs - `11424`{.interpreted-text role="ghpull"}: DOC: point align-ylabel demo to new align-label functions - `11454`{.interpreted-text role="ghpull"}: add subplots to axes documentation - `11470`{.interpreted-text role="ghpull"}: Hyperlink DOIs against preferred resolver - `11421`{.interpreted-text role="ghpull"}: DOC: make signature background grey - `11457`{.interpreted-text role="ghpull"}: Search \$CPATH for include directories - `11456`{.interpreted-text role="ghpull"}: DOC: fix minor typo in figaspect - `11293`{.interpreted-text role="ghpull"}: Lim parameter naming - `11447`{.interpreted-text role="ghpull"}: Do not use class attributes as defaults for instance attributes - `11449`{.interpreted-text role="ghpull"}: Slightly improve doc sidebar layout - `11224`{.interpreted-text role="ghpull"}: Add deprecation messages for unused kwargs in FancyArrowPatch - `11437`{.interpreted-text role="ghpull"}: Doc markersupdate - `11417`{.interpreted-text role="ghpull"}: FIX: better default spine path (for logit) - `11406`{.interpreted-text role="ghpull"}: Backport PR #11403 on branch v2.2.2-doc - `11427`{.interpreted-text role="ghpull"}: FIX: pathlib in nbagg - `11428`{.interpreted-text role="ghpull"}: Doc: Remove huge note box from examples. - `11392`{.interpreted-text role="ghpull"}: Deprecate the `verts` kwarg to `scatter`. - `8834`{.interpreted-text role="ghpull"}: WIP: Contour log extension - `11402`{.interpreted-text role="ghpull"}: Remove unnecessary str calls. - `11399`{.interpreted-text role="ghpull"}: Autogenerate credits.rst - `11382`{.interpreted-text role="ghpull"}: plt.subplots and plt.figure docstring changes - `11388`{.interpreted-text role="ghpull"}: DOC: Constrained layout tutorial improvements - `11400`{.interpreted-text role="ghpull"}: Correct docstring for axvspan() - `11396`{.interpreted-text role="ghpull"}: Remove some (minor) comments regarding Py2. - `11210`{.interpreted-text role="ghpull"}: FIX: don\'t pad axes for ticks if they aren\'t visible or axis off - `11362`{.interpreted-text role="ghpull"}: Fix tox configuration - `11366`{.interpreted-text role="ghpull"}: Improve docstring of Axes.spy - `11289`{.interpreted-text role="ghpull"}: io.open and codecs.open are redundant with open on Py3. - `11213`{.interpreted-text role="ghpull"}: MNT: deprecate patches.YAArrow - `11352`{.interpreted-text role="ghpull"}: Catch a couple of test warnings - `11292`{.interpreted-text role="ghpull"}: Simplify cleanup decorator implementation. - `11349`{.interpreted-text role="ghpull"}: Remove non-existent files from MANIFEST.IN - `8774`{.interpreted-text role="ghpull"}: Git issue #7216 - Add a \"ruler\" tool to the plot UI - `11348`{.interpreted-text role="ghpull"}: Make OSX\'s blit() have a consistent signature with other backends. - `11345`{.interpreted-text role="ghpull"}: Revert \"Deprecate text.latex.unicode.\" - `11250`{.interpreted-text role="ghpull"}: \[WIP\] Add tutorial for LogScale - `11223`{.interpreted-text role="ghpull"}: Add an arrow tutorial - `10212`{.interpreted-text role="ghpull"}: Categorical refactor - `11339`{.interpreted-text role="ghpull"}: Convert Ellipse docstring to numpydoc - `11255`{.interpreted-text role="ghpull"}: Deprecate text.latex.unicode. - `11338`{.interpreted-text role="ghpull"}: Fix typos - `11332`{.interpreted-text role="ghpull"}: Let plt.rc = matplotlib.rc, instead of being a trivial wrapper. - `11331`{.interpreted-text role="ghpull"}: multiprocessing.set_start_method() \--\> mp.set_start_method() - `9948`{.interpreted-text role="ghpull"}: Add `ealpha` option to `errorbar` - `11329`{.interpreted-text role="ghpull"}: Minor docstring update of thumbnail - `9551`{.interpreted-text role="ghpull"}: Refactor backend loading - `11328`{.interpreted-text role="ghpull"}: Undeprecate Polygon.xy from #11299 - `11318`{.interpreted-text role="ghpull"}: Improve docstring of imread() and imsave() - `11311`{.interpreted-text role="ghpull"}: Simplify image.thumbnail. - `11225`{.interpreted-text role="ghpull"}: Add stacklevel=2 to some more warnings.warn() calls - `11313`{.interpreted-text role="ghpull"}: Add changelog entry for removal of proprietary sphinx directives. - `11323`{.interpreted-text role="ghpull"}: Fix infinite loop for connectionstyle + add some tests - `11314`{.interpreted-text role="ghpull"}: API changes: use the heading format defined in README.txt - `11320`{.interpreted-text role="ghpull"}: Py3fy multiprocess example. - `6254`{.interpreted-text role="ghpull"}: adds two new cyclic color schemes - `11268`{.interpreted-text role="ghpull"}: DOC: Sanitize some internal documentation links - `11300`{.interpreted-text role="ghpull"}: Start replacing ACCEPTS table by parsing numpydoc. - `11298`{.interpreted-text role="ghpull"}: Automagically set the stacklevel on warnings. - `11277`{.interpreted-text role="ghpull"}: Avoid using MacRoman encoding. - `11295`{.interpreted-text role="ghpull"}: Use sphinx builtin only directive instead of custom one. - `11305`{.interpreted-text role="ghpull"}: Reuse the noninteractivity warning from Figure.show in \_Backend.show. - `11307`{.interpreted-text role="ghpull"}: Avoid recursion for subclasses of str that are also \"PathLike\" in to_filehandle() - `11304`{.interpreted-text role="ghpull"}: Re-remove six from INSTALL.rst. - `11299`{.interpreted-text role="ghpull"}: Fix a bunch of doc/comment typos in patches.py. - `11301`{.interpreted-text role="ghpull"}: Undefined name: cbook \--\> matplotlib.cbook - `11254`{.interpreted-text role="ghpull"}: Update INSTALL.rst. - `11267`{.interpreted-text role="ghpull"}: FIX: allow nan values in data for plt.hist - `11271`{.interpreted-text role="ghpull"}: Better argspecs for Axes.stem - `11272`{.interpreted-text role="ghpull"}: Remove commented-out code, unused imports - `11280`{.interpreted-text role="ghpull"}: Trivial cleanups - `10514`{.interpreted-text role="ghpull"}: Cleanup/update cairo + gtk compatibility matrix. - `11282`{.interpreted-text role="ghpull"}: Reduce the use of C++ exceptions - `11263`{.interpreted-text role="ghpull"}: Fail gracefully if can\'t decode font names - `11278`{.interpreted-text role="ghpull"}: Remove conditional path for sphinx \<1.3 in plot_directive. - `11273`{.interpreted-text role="ghpull"}: Include template matplotlibrc in package_data. - `11265`{.interpreted-text role="ghpull"}: Minor cleanups. - `11249`{.interpreted-text role="ghpull"}: Simplify FreeType build. - `11158`{.interpreted-text role="ghpull"}: Remove dependency on six - we\'re Py3 only now! - `10050`{.interpreted-text role="ghpull"}: Update Legend draggable API - `11206`{.interpreted-text role="ghpull"}: More cleanups - `11001`{.interpreted-text role="ghpull"}: DOC: improve legend bbox_to_anchor description - `11258`{.interpreted-text role="ghpull"}: Removed comment in AGG backend that is no longer applicable - `11062`{.interpreted-text role="ghpull"}: FIX: call constrained_layout twice - `11251`{.interpreted-text role="ghpull"}: Re-run boilerplate.py. - `11228`{.interpreted-text role="ghpull"}: Don\'t bother checking luatex\'s version. - `11207`{.interpreted-text role="ghpull"}: Update venv gui docs wrt availability of PySide2. - `11236`{.interpreted-text role="ghpull"}: Minor cleanups to setupext. - `11239`{.interpreted-text role="ghpull"}: Reword the timeout error message in cbook.\_lock_path. - `11204`{.interpreted-text role="ghpull"}: Test that boilerplate.py is correctly run. - `11172`{.interpreted-text role="ghpull"}: ENH add rcparam to legend_title - `11229`{.interpreted-text role="ghpull"}: Simplify lookup of animation external commands. - `9086`{.interpreted-text role="ghpull"}: Add SVG animation. - `11212`{.interpreted-text role="ghpull"}: Fix CirclePolygon \_\_str\_\_ + adding tests - `6737`{.interpreted-text role="ghpull"}: Ternary - `11216`{.interpreted-text role="ghpull"}: Yet another set of simplifications. - `11056`{.interpreted-text role="ghpull"}: Simplify travis setup a bit. - `11211`{.interpreted-text role="ghpull"}: Revert explicit linestyle kwarg on step() - `11205`{.interpreted-text role="ghpull"}: Minor cleanups to pyplot. - `11174`{.interpreted-text role="ghpull"}: Replace numeric loc by position string - `11208`{.interpreted-text role="ghpull"}: Don\'t crash qt figure options on unknown marker styles. - `11195`{.interpreted-text role="ghpull"}: Some unrelated cleanups. - `11192`{.interpreted-text role="ghpull"}: Don\'t use deprecated get_texcommand in backend_pgf. - `11197`{.interpreted-text role="ghpull"}: Simplify demo_ribbon_box.py. - `11137`{.interpreted-text role="ghpull"}: Convert `**kwargs` to named arguments for a clearer API - `10982`{.interpreted-text role="ghpull"}: Improve docstring of Axes.imshow - `11182`{.interpreted-text role="ghpull"}: Use GLib.MainLoop() instead of deprecated GObject.MainLoop() - `11185`{.interpreted-text role="ghpull"}: Fix undefined name error in backend_pgf. - `10321`{.interpreted-text role="ghpull"}: Ability to scale axis by a fixed factor - `8787`{.interpreted-text role="ghpull"}: Faster path drawing for the cairo backend (cairocffi only) - `4559`{.interpreted-text role="ghpull"}: tight_layout: Use a different default gridspec - `11179`{.interpreted-text role="ghpull"}: Convert internal tk focus helper to a context manager - `11176`{.interpreted-text role="ghpull"}: Allow creating empty closed paths - `10339`{.interpreted-text role="ghpull"}: Pass explicit font paths to fontspec in backend_pgf. - `9832`{.interpreted-text role="ghpull"}: Minor cleanup to Text class. - `11141`{.interpreted-text role="ghpull"}: Remove mpl_examples symlink. - `10715`{.interpreted-text role="ghpull"}: ENH: add title_fontsize to legend - `11166`{.interpreted-text role="ghpull"}: Set stacklevel to 2 for backend_wx - `10934`{.interpreted-text role="ghpull"}: Autogenerate (via boilerplate) more of pyplot. - `9298`{.interpreted-text role="ghpull"}: Cleanup blocking_input. - `6329`{.interpreted-text role="ghpull"}: Set \_text to \'\' if Text.set_text argument is None - `11157`{.interpreted-text role="ghpull"}: Fix contour return link - `11146`{.interpreted-text role="ghpull"}: Explicit args and refactor Axes.margins - `11145`{.interpreted-text role="ghpull"}: Use kwonlyargs instead of popping from kwargs - `11119`{.interpreted-text role="ghpull"}: PGF: Get unitless positions from Text elements (fix #11116) - `9078`{.interpreted-text role="ghpull"}: New anchored direction arrows - `11144`{.interpreted-text role="ghpull"}: Remove toplevel unit/ directory. - `11148`{.interpreted-text role="ghpull"}: remove use of subprocess compatibility shim - `11143`{.interpreted-text role="ghpull"}: Use debug level for debugging messages - `11142`{.interpreted-text role="ghpull"}: Finish removing future imports. - `11130`{.interpreted-text role="ghpull"}: Don\'t include the postscript title if it is not latin-1 encodable. - `11093`{.interpreted-text role="ghpull"}: DOC: Fixup to AnchoredArtist examples in the gallery - `11132`{.interpreted-text role="ghpull"}: pillow-dependency update - `10446`{.interpreted-text role="ghpull"}: implementation of the copy canvas tool - `9131`{.interpreted-text role="ghpull"}: FIX: prevent the canvas from jump sizes due to DPI changes - `9454`{.interpreted-text role="ghpull"}: Batch ghostscript converter. - `10545`{.interpreted-text role="ghpull"}: Change manual kwargs popping to kwonly arguments. - `10950`{.interpreted-text role="ghpull"}: Actually ignore invalid log-axis limit setting - `11096`{.interpreted-text role="ghpull"}: Remove support for bar(left=\...) (as opposed to bar(x=\...)). - `11106`{.interpreted-text role="ghpull"}: py3fy art3d. - `11085`{.interpreted-text role="ghpull"}: Use GtkShortcutsWindow for Help tool. - `11099`{.interpreted-text role="ghpull"}: Deprecate certain marker styles that have simpler synonyms. - `11100`{.interpreted-text role="ghpull"}: Some more deprecations of old, old stuff. - `11098`{.interpreted-text role="ghpull"}: Make Marker.get_snap_threshold() always return a scalar. - `11097`{.interpreted-text role="ghpull"}: Schedule a removal date for passing normed (instead of density) to hist. - `9706`{.interpreted-text role="ghpull"}: Masking invalid x and/or weights in hist - `11080`{.interpreted-text role="ghpull"}: Py3fy backend_qt5 + other cleanups to the backend. - `10967`{.interpreted-text role="ghpull"}: updated the pyplot fill_between example to elucidate the premise;maki... - `11075`{.interpreted-text role="ghpull"}: Drop alpha channel when saving comparison failure diff image. - `9022`{.interpreted-text role="ghpull"}: Help tool - `11045`{.interpreted-text role="ghpull"}: Help tool. - `11076`{.interpreted-text role="ghpull"}: Don\'t create texput.{aux,log} in rootdir every time tests are run - `11073`{.interpreted-text role="ghpull"}: py3fication of some tests. - `11074`{.interpreted-text role="ghpull"}: bytes % args is back since py3.5 - `11066`{.interpreted-text role="ghpull"}: Use chained comparisons where reasonable. - `11061`{.interpreted-text role="ghpull"}: Changed tight_layout doc strings - `11064`{.interpreted-text role="ghpull"}: Minor docstring format cleanup - `11055`{.interpreted-text role="ghpull"}: Remove setup_tests_only.py. - `11057`{.interpreted-text role="ghpull"}: Update Ellipse position with ellipse.center - `10435`{.interpreted-text role="ghpull"}: Pathlibify font_manager (only internally, doesn\'t change the API). - `10442`{.interpreted-text role="ghpull"}: Make the filternorm prop of Images a boolean rather than a {0,1} scalar. - `9855`{.interpreted-text role="ghpull"}: ENH: make ax.get_position apply aspect - `9987`{.interpreted-text role="ghpull"}: MNT: hist2d now uses pcolormesh instead of pcolorfast - `11014`{.interpreted-text role="ghpull"}: Merge v2.2.x into master - `11000`{.interpreted-text role="ghpull"}: FIX: improve Text repr to not error if non-float x and y. - `10910`{.interpreted-text role="ghpull"}: FIX: return proper legend window extent - `10915`{.interpreted-text role="ghpull"}: FIX: tight_layout having negative width axes - `10408`{.interpreted-text role="ghpull"}: Factor out common code in \_process_unit_info - `10960`{.interpreted-text role="ghpull"}: Added share_tickers parameter to axes.\_AxesBase.twinx/y - `10971`{.interpreted-text role="ghpull"}: Skip pillow animation test if pillow not importable - `10970`{.interpreted-text role="ghpull"}: Simplify/fix some manual manipulation of len(args). - `10958`{.interpreted-text role="ghpull"}: Simplify the grouper implementation. - `10508`{.interpreted-text role="ghpull"}: Deprecate FigureCanvasQT.keyAutoRepeat. - `10607`{.interpreted-text role="ghpull"}: Move notify_axes_change to FigureManagerBase class. - `10215`{.interpreted-text role="ghpull"}: Test timers and (a bit) key_press_event for interactive backends. - `10955`{.interpreted-text role="ghpull"}: Py3fy cbook, compare_backend_driver_results - `10680`{.interpreted-text role="ghpull"}: Rewrite the tk C blitting code - `9498`{.interpreted-text role="ghpull"}: Move title up if x-axis is on the top of the figure - `10942`{.interpreted-text role="ghpull"}: Make active param in CheckBottons optional, default false - `10943`{.interpreted-text role="ghpull"}: Allow pie textprops to take alignment and rotation arguments - `10780`{.interpreted-text role="ghpull"}: Fix scaling of RadioButtons - `10938`{.interpreted-text role="ghpull"}: Fix two undefined names - `10685`{.interpreted-text role="ghpull"}: fix plt.show doesn\'t warn if a non-GUI backend - `10689`{.interpreted-text role="ghpull"}: Declare global variables that are created elsewhere - `10845`{.interpreted-text role="ghpull"}: WIP: first draft at replacing linkcheker - `10898`{.interpreted-text role="ghpull"}: Replace \"matplotlibrc\" by \"rcParams\" in the docs where applicable. - `10926`{.interpreted-text role="ghpull"}: Some more removals of deprecated APIs. - `9173`{.interpreted-text role="ghpull"}: dynamically generate pyplot functions - `10918`{.interpreted-text role="ghpull"}: Use function signatures in boilerplate.py. - `10914`{.interpreted-text role="ghpull"}: Changed pie charts default shape to circle and added tests - `10864`{.interpreted-text role="ghpull"}: ENH: Stop mangling default figure file name if file exists - `10562`{.interpreted-text role="ghpull"}: Remove deprecated code in image.py - `10798`{.interpreted-text role="ghpull"}: FIX: axes limits reverting to automatic when sharing - `10485`{.interpreted-text role="ghpull"}: Remove the \'hold\' kwarg from codebase - `10571`{.interpreted-text role="ghpull"}: Use np.full{,\_like} where appropriate. \[requires numpy\>=1.12\] - `10913`{.interpreted-text role="ghpull"}: Rely a bit more on rc_context. - `10299`{.interpreted-text role="ghpull"}: Invalidate texmanager cache when any text.latex.\* rc changes. - `10906`{.interpreted-text role="ghpull"}: Deprecate ImageComparisonTest. - `10904`{.interpreted-text role="ghpull"}: Improve docstring of clabel() - `10912`{.interpreted-text role="ghpull"}: remove unused matplotlib.testing import - `10876`{.interpreted-text role="ghpull"}: \[wip\] Replace \_remove_method by \_on_remove list of callbacks - `10692`{.interpreted-text role="ghpull"}: Update afm docs and internal data structures - `10896`{.interpreted-text role="ghpull"}: Update INSTALL.rst. - `10905`{.interpreted-text role="ghpull"}: Inline knownfailureif. - `10907`{.interpreted-text role="ghpull"}: No need to mark (unicode) strings as u\"foo\" anymore. - `10903`{.interpreted-text role="ghpull"}: Py3fy testing machinery. - `10901`{.interpreted-text role="ghpull"}: Remove Py2/3 portable code guide. - `10900`{.interpreted-text role="ghpull"}: Remove some APIs deprecated in mpl2.1. - `10902`{.interpreted-text role="ghpull"}: Kill some Py2 docs. - `10887`{.interpreted-text role="ghpull"}: Added feature (Make pie charts circular by default #10789) - `10884`{.interpreted-text role="ghpull"}: Style fixes to setupext.py. - `10879`{.interpreted-text role="ghpull"}: Deprecate two-args for cycler() and set_prop_cycle() - `10865`{.interpreted-text role="ghpull"}: DOC: use OO-ish interface in image, contour, field examples - `8479`{.interpreted-text role="ghpull"}: FIX markerfacecolor / mfc not in rcparams - `10314`{.interpreted-text role="ghpull"}: setattr context manager. - `10013`{.interpreted-text role="ghpull"}: Allow rasterization for 3D plots - `10158`{.interpreted-text role="ghpull"}: Allow mplot3d rasterization; adjacent cleanups. - `10871`{.interpreted-text role="ghpull"}: Rely on rglob support rather than os.walk. - `10878`{.interpreted-text role="ghpull"}: Change hardcoded brackets for Toolbar message - `10708`{.interpreted-text role="ghpull"}: Py3fy webagg/nbagg. - `10862`{.interpreted-text role="ghpull"}: py3ify table.py and correct some docstrings - `10810`{.interpreted-text role="ghpull"}: Fix for plt.plot() does not support structured arrays as data= kwarg - `10861`{.interpreted-text role="ghpull"}: More python3 cleanup - `9903`{.interpreted-text role="ghpull"}: ENH: adjustable colorbar ticks - `10831`{.interpreted-text role="ghpull"}: Minor docstring updates on binning related plot functions - `9571`{.interpreted-text role="ghpull"}: Remove LaTeX checking in setup.py. - `10097`{.interpreted-text role="ghpull"}: Reset extents in RectangleSelector when not interactive on press. - `10686`{.interpreted-text role="ghpull"}: fix BboxConnectorPatch does not show facecolor - `10801`{.interpreted-text role="ghpull"}: Fix undefined name. Add animation tests. - `10857`{.interpreted-text role="ghpull"}: FIX: ioerror font cache, second try - `10796`{.interpreted-text role="ghpull"}: Added descriptions for line bars and markers examples - `10846`{.interpreted-text role="ghpull"}: Unsixification - `10852`{.interpreted-text role="ghpull"}: Update docs re: pygobject in venv. - `10847`{.interpreted-text role="ghpull"}: Py3fy axis.py. - `10834`{.interpreted-text role="ghpull"}: Minor docstring updates on spectral plot functions - `10778`{.interpreted-text role="ghpull"}: wx_compat is no more. - `10609`{.interpreted-text role="ghpull"}: More wx cleanup. - `10826`{.interpreted-text role="ghpull"}: Py3fy dates.py. - `10837`{.interpreted-text role="ghpull"}: Correctly display error when running setup.py test. - `10838`{.interpreted-text role="ghpull"}: Don\'t use private attribute in tk example. Fix Toolbar class rename. - `10835`{.interpreted-text role="ghpull"}: DOC: Make colorbar tutorial examples look like colorbars. - `10823`{.interpreted-text role="ghpull"}: Add some basic smoketesting for webagg (and wx). - `10828`{.interpreted-text role="ghpull"}: Add print_rgba to backend_cairo. - `10830`{.interpreted-text role="ghpull"}: Make function signatures more explicit - `10829`{.interpreted-text role="ghpull"}: Use long color names for default rcParams - `9776`{.interpreted-text role="ghpull"}: WIP: Lockout new converters Part 2 - `10799`{.interpreted-text role="ghpull"}: DOC: make legend docstring interpolated - `10818`{.interpreted-text role="ghpull"}: Deprecate vestigial Annotation.arrow. - `10817`{.interpreted-text role="ghpull"}: Add test to imread from url. - `10696`{.interpreted-text role="ghpull"}: Simplify venv docs. - `10724`{.interpreted-text role="ghpull"}: Py3fication of unicode. - `10815`{.interpreted-text role="ghpull"}: API: shift deprecation of TempCache class to 3.0 - `10725`{.interpreted-text role="ghpull"}: FIX/TST constrained_layout remove test8 duplication - `10705`{.interpreted-text role="ghpull"}: FIX: enable extend kwargs with log scale colorbar - `10400`{.interpreted-text role="ghpull"}: numpydoc-ify art3d docstrings - `10723`{.interpreted-text role="ghpull"}: repr style fixes. - `10592`{.interpreted-text role="ghpull"}: Rely on generalized \* and \*\* unpackings where possible. - `9475`{.interpreted-text role="ghpull"}: Declare property aliases in a single place - `10793`{.interpreted-text role="ghpull"}: A hodgepodge of Py3 & style fixes. - `10794`{.interpreted-text role="ghpull"}: fixed comment typo - `10768`{.interpreted-text role="ghpull"}: Fix crash when imshow encounters longdouble data - `10774`{.interpreted-text role="ghpull"}: Remove dead wx testing code. - `10756`{.interpreted-text role="ghpull"}: Fixes png showing inconsistent inset_axes position - `10773`{.interpreted-text role="ghpull"}: Consider alpha channel from RGBA color of text for SVG backend text opacity rendering - `10772`{.interpreted-text role="ghpull"}: API: check locator and formatter args when passed - `10713`{.interpreted-text role="ghpull"}: Implemented support for \'markevery\' in prop_cycle - `10751`{.interpreted-text role="ghpull"}: make centre_baseline legal for Text.set_verticalalignment - `10771`{.interpreted-text role="ghpull"}: FIX/TST OS X builds - `10742`{.interpreted-text role="ghpull"}: FIX: reorder linewidth setting before linestyle - `10714`{.interpreted-text role="ghpull"}: sys.platform is normalized to \"linux\" on Py3. - `10542`{.interpreted-text role="ghpull"}: Minor cleanup: PEP8, PEP257 - `10636`{.interpreted-text role="ghpull"}: Remove some wx version checks. - `9731`{.interpreted-text role="ghpull"}: Make legend title fontsize obey fontsize kwarg by default - `10697`{.interpreted-text role="ghpull"}: Remove special-casing of \_remove_method when pickling. - `10701`{.interpreted-text role="ghpull"}: Autoadd removal version to deprecation message. - `10699`{.interpreted-text role="ghpull"}: Remove incorrect warning in gca(). - `10674`{.interpreted-text role="ghpull"}: Fix getting polar axes in plt.polar() - `10564`{.interpreted-text role="ghpull"}: Nested classes and instancemethods are directly picklable on Py3.5+. - `10107`{.interpreted-text role="ghpull"}: Fix stay_span to reset onclick in SpanSelector. - `10693`{.interpreted-text role="ghpull"}: Make markerfacecolor work for 3d scatterplots - `10596`{.interpreted-text role="ghpull"}: Switch to per-file locking. - `10532`{.interpreted-text role="ghpull"}: Py3fy backend_pgf. - `10618`{.interpreted-text role="ghpull"}: Fixes #10501. python3 support and pep8 in jpl_units - `10652`{.interpreted-text role="ghpull"}: Some py3fication for matplotlib/\_\_init\_\_, setupext. - `10522`{.interpreted-text role="ghpull"}: Py3fy font_manager. - `10666`{.interpreted-text role="ghpull"}: More figure-related doc updates - `10507`{.interpreted-text role="ghpull"}: Remove Python 2 code from C extensions - `10679`{.interpreted-text role="ghpull"}: Small fixes to gtk3 examples. - `10426`{.interpreted-text role="ghpull"}: Delete deprecated backends - `10488`{.interpreted-text role="ghpull"}: Bug Fix - Polar plot rectangle patch not transformed correctly (#8521) - `9814`{.interpreted-text role="ghpull"}: figure_enter_event uses now LocationEvent instead of Event. Fix issue #9812. - `9918`{.interpreted-text role="ghpull"}: Remove old nose testing code - `10672`{.interpreted-text role="ghpull"}: Deprecation fixes. - `10608`{.interpreted-text role="ghpull"}: Remove most APIs deprecated in 2.1. - `10653`{.interpreted-text role="ghpull"}: Mock is in stdlib in Py3. - `10603`{.interpreted-text role="ghpull"}: Remove workarounds for numpy\<1.10. - `10660`{.interpreted-text role="ghpull"}: Work towards removing reuse-of-axes-on-collision. - `10661`{.interpreted-text role="ghpull"}: Homebrew python is now python 3 - `10656`{.interpreted-text role="ghpull"}: Minor fixes to event handling docs. - `10635`{.interpreted-text role="ghpull"}: Simplify setupext by using globs. - `10632`{.interpreted-text role="ghpull"}: Support markers from Paths that consist of one line segment - `10558`{.interpreted-text role="ghpull"}: Remove if six.PY2 code paths from boilerplate.py - `10640`{.interpreted-text role="ghpull"}: Fix extra and missing spaces in constrainedlayout warning. - `10624`{.interpreted-text role="ghpull"}: Some trivial py3fications. - `10548`{.interpreted-text role="ghpull"}: Implement PdfPages for backend pgf - `10614`{.interpreted-text role="ghpull"}: Use np.stack instead of list(zip()) in colorbar.py. - `10621`{.interpreted-text role="ghpull"}: Cleanup and py3fy backend_gtk3. - `10615`{.interpreted-text role="ghpull"}: More style fixes. - `10604`{.interpreted-text role="ghpull"}: Minor style fixes. - `10565`{.interpreted-text role="ghpull"}: Strip python 2 code from subprocess.py - `10605`{.interpreted-text role="ghpull"}: Bump a tolerance in test_axisartist_floating_axes. - `7853`{.interpreted-text role="ghpull"}: Use exact types for Py_BuildValue. - `10591`{.interpreted-text role="ghpull"}: Switch to @-matrix multiplication. - `10570`{.interpreted-text role="ghpull"}: Fix check_shared in test_subplots. - `10569`{.interpreted-text role="ghpull"}: Various style fixes. - `10593`{.interpreted-text role="ghpull"}: Use \'yield from\' where appropriate. - `10577`{.interpreted-text role="ghpull"}: Minor simplification to Figure.\_\_getstate\_\_ logic. - `10549`{.interpreted-text role="ghpull"}: Source typos - `10525`{.interpreted-text role="ghpull"}: Convert six.moves.xrange() to range() for Python 3 - `10541`{.interpreted-text role="ghpull"}: More argumentless (py3) super() - `10539`{.interpreted-text role="ghpull"}: TST: Replace assert_equal with plain asserts. - `10534`{.interpreted-text role="ghpull"}: Modernize cbook.get_realpath_and_stat. - `10524`{.interpreted-text role="ghpull"}: Remove unused private \_StringFuncParser. - `10470`{.interpreted-text role="ghpull"}: Remove Python 2 code from setup - `10528`{.interpreted-text role="ghpull"}: py3fy examples - `10520`{.interpreted-text role="ghpull"}: Py3fy mathtext.py. - `10527`{.interpreted-text role="ghpull"}: Switch to argumentless (py3) super(). - `10523`{.interpreted-text role="ghpull"}: The current master branch is now python 3 only. - `10515`{.interpreted-text role="ghpull"}: Use feature detection instead of version detection - `10432`{.interpreted-text role="ghpull"}: Use some new Python3 types - `10475`{.interpreted-text role="ghpull"}: Use HTTP Secure for matplotlib.org - `10383`{.interpreted-text role="ghpull"}: Fix some C++ warnings - `10498`{.interpreted-text role="ghpull"}: Tell the lgtm checker that the project is Python 3 only - `10505`{.interpreted-text role="ghpull"}: Remove backport of which() - `10483`{.interpreted-text role="ghpull"}: Remove backports.functools_lru_cache - `10492`{.interpreted-text role="ghpull"}: Avoid UnboundLocalError in drag_pan. - `10491`{.interpreted-text role="ghpull"}: Simplify Mac builds on Travis - `10481`{.interpreted-text role="ghpull"}: Remove python 2 compatibility code from dviread - `10447`{.interpreted-text role="ghpull"}: Remove Python 2 compatibility code from backend_pdf.py - `10468`{.interpreted-text role="ghpull"}: Replace is_numlike by isinstance(\..., numbers.Number). - `10439`{.interpreted-text role="ghpull"}: mkdir is in the stdlib in Py3. - `10392`{.interpreted-text role="ghpull"}: FIX: make set_text(None) keep string empty instead of \"None\" - `10425`{.interpreted-text role="ghpull"}: API: only support python 3.5+ - `10316`{.interpreted-text role="ghpull"}: TST FIX pyqt5 5.9 - `4625`{.interpreted-text role="ghpull"}: hist2d() is now using pcolormesh instead of pcolorfast Issues (123): - `12133`{.interpreted-text role="ghissue"}: Streamplot does not work for 29x29 grid - `4429`{.interpreted-text role="ghissue"}: Error calculating scaling for radiobutton widget. - `3293`{.interpreted-text role="ghissue"}: markerfacecolor / mfc not in rcparams - `8109`{.interpreted-text role="ghissue"}: Cannot set the markeredgecolor by default - `7942`{.interpreted-text role="ghissue"}: Extend keyword doesn\'t work with log scale. - `5571`{.interpreted-text role="ghissue"}: Finish reorganizing examples - `8307`{.interpreted-text role="ghissue"}: Colorbar with imshow(logNorm) shows unexpected minor ticks - `6992`{.interpreted-text role="ghissue"}: plt.hist fails when data contains nan values - `6483`{.interpreted-text role="ghissue"}: Range determination for data with NaNs - `8059`{.interpreted-text role="ghissue"}: BboxConnectorPatch does not show facecolor - `12134`{.interpreted-text role="ghissue"}: tight_layout flips images when making plots without displaying them - `6739`{.interpreted-text role="ghissue"}: Make matplotlib fail more gracefully in headless environments - `3679`{.interpreted-text role="ghissue"}: Runtime detection for default backend - `11966`{.interpreted-text role="ghissue"}: CartoPy code gives attribute error - `11844`{.interpreted-text role="ghissue"}: Backend related issues with matplotlib 3.0.0rc1 - `12095`{.interpreted-text role="ghissue"}: colorbar minorticks (possibly release critical for 3.0) - `12108`{.interpreted-text role="ghissue"}: Broken doc build with sphinx 1.8 - `7366`{.interpreted-text role="ghissue"}: handle repaint requests better it qtAgg - `11985`{.interpreted-text role="ghissue"}: Single shot timer not working correctly with MacOSX backend - `10948`{.interpreted-text role="ghissue"}: OSX backend raises deprecation warning for enter_notify_event - `11970`{.interpreted-text role="ghissue"}: Legend.get_window_extent now requires a renderer - `8293`{.interpreted-text role="ghissue"}: investigate whether using a single instance of ghostscript for ps-\>png conversion can speed up the Windows build - `7707`{.interpreted-text role="ghissue"}: Replace pep8 by pycodestyle for style checking - `9135`{.interpreted-text role="ghissue"}: rcdefaults, rc_file_defaults, rc_file should not update backend if it has already been selected - `12015`{.interpreted-text role="ghissue"}: AttributeError with GTK3Agg backend - `11913`{.interpreted-text role="ghissue"}: plt.contour levels parameter don\'t work as intended if receive a single int - `11846`{.interpreted-text role="ghissue"}: macosx backend won\'t load - `11792`{.interpreted-text role="ghissue"}: Newer versions of ImageMagickWriter not found on windows - `11858`{.interpreted-text role="ghissue"}: Adding \"pie of pie\" and \"bar of pie\" functionality - `11852`{.interpreted-text role="ghissue"}: get_backend() backward compatibility - `11629`{.interpreted-text role="ghissue"}: Importing qt_compat when no Qt binding is installed fails with NameError instead of ImportError - `11842`{.interpreted-text role="ghissue"}: Failed nose import in test_annotation_update - `11252`{.interpreted-text role="ghissue"}: Some API removals not documented - `9404`{.interpreted-text role="ghissue"}: Drop support for python 2 - `2625`{.interpreted-text role="ghissue"}: Markers in XKCD style - `11749`{.interpreted-text role="ghissue"}: metadata kwarg to savefig is not documented - `11702`{.interpreted-text role="ghissue"}: Setting alpha on legend handle changes patch color - `8798`{.interpreted-text role="ghissue"}: gtk3cairo draw_image does not respect origin and mishandles alpha - `11737`{.interpreted-text role="ghissue"}: Bug in tight_layout - `11373`{.interpreted-text role="ghissue"}: Passing an incorrectly sized colour list to scatter should raise a relevant error - `11756`{.interpreted-text role="ghissue"}: pgf backend doesn\'t set color of text when the color is black - `11766`{.interpreted-text role="ghissue"}: test_axes.py::test_csd_freqs failing with numpy 1.15.0 on macOS - `11750`{.interpreted-text role="ghissue"}: previous what\'s new is overindented on \"what\'s new in mpl3.0 page\" - `11728`{.interpreted-text role="ghissue"}: Qt5 Segfaults on window resize - `11709`{.interpreted-text role="ghissue"}: Repaint region is wrong on Retina display with Qt5 - `11578`{.interpreted-text role="ghissue"}: wx segfaulting on OSX travis tests - `11628`{.interpreted-text role="ghissue"}: edgecolor argument not working in matplotlib.pyplot.bar - `11625`{.interpreted-text role="ghissue"}: plt.tight_layout() does not work with plt.subplot2grid - `4993`{.interpreted-text role="ghissue"}: Version \~/.cache/matplotlib - `7842`{.interpreted-text role="ghissue"}: If hexbin has logarithmic bins, use log formatter for colorbar - `11607`{.interpreted-text role="ghissue"}: AttributeError: \'QEvent\' object has no attribute \'pos\' - `11486`{.interpreted-text role="ghissue"}: Colorbar does not render with PowerNorm and min extend when using imshow - `11582`{.interpreted-text role="ghissue"}: wx segfault - `11515`{.interpreted-text role="ghissue"}: using \'sharex\' once in \'subplots\' function can affect subsequent calls to \'subplots\' - `10269`{.interpreted-text role="ghissue"}: input() blocks any rendering and event handling - `10345`{.interpreted-text role="ghissue"}: Python 3.4 with Matplotlib 1.5 vs Python 3.6 with Matplotlib 2.1 - `10443`{.interpreted-text role="ghissue"}: Drop use of pytz dependency in next major release - `10572`{.interpreted-text role="ghissue"}: contour and contourf treat levels differently - `11123`{.interpreted-text role="ghissue"}: Crash when interactively adding a number of subplots - `11550`{.interpreted-text role="ghissue"}: Undefined names: \'obj_type\' and \'cbook\' - `11138`{.interpreted-text role="ghissue"}: Only the first figure window has mpl icon, all other figures have default tk icon. - `11510`{.interpreted-text role="ghissue"}: extra minor-ticks on the colorbar when used with the extend option - `11369`{.interpreted-text role="ghissue"}: zorder of Artists not being respected when blitting with FuncAnimation - `11452`{.interpreted-text role="ghissue"}: Streamplot ignores rightmost column and topmost row of velocity data - `11284`{.interpreted-text role="ghissue"}: imshow of multiple images produces old pixel values printed in status bar - `11496`{.interpreted-text role="ghissue"}: MouseEvent.x and .y have different types - `11534`{.interpreted-text role="ghissue"}: Cross-reference margins and sticky edges - `8556`{.interpreted-text role="ghissue"}: Add images of markers to the list of markers - `11386`{.interpreted-text role="ghissue"}: Logit scale doesn\'t position x/ylabel correctly first draw - `11384`{.interpreted-text role="ghissue"}: Undefined name \'Path\' in backend_nbagg.py - `11426`{.interpreted-text role="ghissue"}: nbagg broken on master. \'Path\' is not defined\... - `11390`{.interpreted-text role="ghissue"}: Internal use of deprecated code - `11203`{.interpreted-text role="ghissue"}: tight_layout reserves tick space even if disabled - `11361`{.interpreted-text role="ghissue"}: Tox.ini does not work out of the box - `11253`{.interpreted-text role="ghissue"}: Problem while changing current figure size in Jupyter notebook - `11219`{.interpreted-text role="ghissue"}: Write an arrow tutorial - `11322`{.interpreted-text role="ghissue"}: Really deprecate Patches.xy? - `11294`{.interpreted-text role="ghissue"}: ConnectionStyle Angle3 hangs with specific parameters - `9518`{.interpreted-text role="ghissue"}: Some ConnectionStyle not working - `11306`{.interpreted-text role="ghissue"}: savefig and path.py - `11077`{.interpreted-text role="ghissue"}: Font \"DejaVu Sans\" can only be used through fallback - `10717`{.interpreted-text role="ghissue"}: Failure to find matplotlibrc when testing installed distribution - `9912`{.interpreted-text role="ghissue"}: Cleaning up variable argument signatures - `3701`{.interpreted-text role="ghissue"}: unit tests should compare pyplot.py with output from boilerplate.py - `11183`{.interpreted-text role="ghissue"}: Undefined name \'system_fonts\' in backend_pgf.py - `11101`{.interpreted-text role="ghissue"}: Crash on empty patches - `11124`{.interpreted-text role="ghissue"}: \[Bug\] savefig cannot save file with a Unicode name - `7733`{.interpreted-text role="ghissue"}: Trying to set_ylim(bottom=0) on a log scaled axis changes plot - `10319`{.interpreted-text role="ghissue"}: TST: pyqt 5.10 breaks pyqt5 interactive tests - `10676`{.interpreted-text role="ghissue"}: Add source code to documentation - `9207`{.interpreted-text role="ghissue"}: axes has no method to return new position after box is adjusted due to aspect ratio\... - `4615`{.interpreted-text role="ghissue"}: hist2d with log xy axis - `10996`{.interpreted-text role="ghissue"}: Plotting text with datetime axis causes warning - `7582`{.interpreted-text role="ghissue"}: Report date and time of cursor position on a plot_date plot - `10114`{.interpreted-text role="ghissue"}: Remove mlab from examples - `10342`{.interpreted-text role="ghissue"}: imshow longdouble not truly supported - `8062`{.interpreted-text role="ghissue"}: tight_layout + lots of subplots + long ylabels inverts yaxis - `4413`{.interpreted-text role="ghissue"}: Long axis title alters xaxis length and direction with `plt.tight_layout()` - `1415`{.interpreted-text role="ghissue"}: Plot title should be shifted up when xticks are set to the top of the plot - `10789`{.interpreted-text role="ghissue"}: Make pie charts circular by default - `10941`{.interpreted-text role="ghissue"}: Cannot set text alignment in pie chart - `7908`{.interpreted-text role="ghissue"}: plt.show doesn\'t warn if a non-GUI backend is being used - `10502`{.interpreted-text role="ghissue"}: \'FigureManager\' is an undefined name in backend_wx.py - `10062`{.interpreted-text role="ghissue"}: axes limits revert to automatic on sharing axes? - `9246`{.interpreted-text role="ghissue"}: ENH: make default colorbar ticks adjust as nicely as axes ticks - `8818`{.interpreted-text role="ghissue"}: plt.plot() does not support structured arrays as data= kwarg - `10533`{.interpreted-text role="ghissue"}: Recognize pandas Timestamp objects for DateConverter? - `8358`{.interpreted-text role="ghissue"}: Minor ticks on log-scale colorbar are not cleared - `10075`{.interpreted-text role="ghissue"}: RectangleSelector does not work if start and end points are identical - `8576`{.interpreted-text role="ghissue"}: support \'markevery\' in prop_cycle - `8874`{.interpreted-text role="ghissue"}: Crash in python setup.py test - `3871`{.interpreted-text role="ghissue"}: replace use of \_tkcanvas with get_tk_widget() - `10550`{.interpreted-text role="ghissue"}: Use long color names for rc defaultParams - `10722`{.interpreted-text role="ghissue"}: Duplicated test name in test_constrainedlayout - `10419`{.interpreted-text role="ghissue"}: svg backend does not respect alpha channel of text *when passed as rgba* - `10769`{.interpreted-text role="ghissue"}: DOC: set_major_locator could check that its getting a Locator (was EngFormatter broken?) - `10719`{.interpreted-text role="ghissue"}: Need better type error checking for linewidth in ax.grid - `7776`{.interpreted-text role="ghissue"}: tex cache lockfile retries should be configurable - `10556`{.interpreted-text role="ghissue"}: Special conversions of xrange() - `10501`{.interpreted-text role="ghissue"}: cmp() is an undefined name in Python 3 - `9812`{.interpreted-text role="ghissue"}: figure_enter_event generates base Event and not LocationEvent - `10602`{.interpreted-text role="ghissue"}: Random image failures with test_curvelinear4 - `7795`{.interpreted-text role="ghissue"}: Incorrect uses of is_numlike --- ::: redirect-from /users/prev_whats_new/github_stats_3.0.1 ::: # GitHub statistics for 3.0.1 (Oct 25, 2018) {#github-stats-3-0-1} GitHub statistics for 2018/09/18 (tag: v3.0.0) - 2018/10/25 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 31 issues and merged 127 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/37?closed=1) The following 23 authors contributed 227 commits. - Abhinuv Nitin Pitale - Antony Lee - Anubhav Shrimal - Ben Root - Colin - Daniele Nicolodi - David Haberthür - David Stansby - Elan Ernest - Elliott Sales de Andrade - Eric Firing - ImportanceOfBeingErnest - Jody Klymak - Kai Muehlbauer - Kevin Rose - Marcel Martin - MeeseeksMachine - Nelle Varoquaux - Nikita Kniazev - Ryan May - teresy - Thomas A Caswell - Tim Hoffmann GitHub issues and pull requests: Pull Requests (127): - `12595`{.interpreted-text role="ghpull"}: Backport PR #12569 on branch v3.0.x (Don\'t confuse uintptr_t and Py_ssize_t.) - `12623`{.interpreted-text role="ghpull"}: Backport PR #12285 on branch v3.0.x (FIX: Don\'t apply tight_layout if axes collapse) - `12285`{.interpreted-text role="ghpull"}: FIX: Don\'t apply tight_layout if axes collapse - `12622`{.interpreted-text role="ghpull"}: FIX: flake8errors 3.0.x mergeup - `12619`{.interpreted-text role="ghpull"}: Backport PR #12548 on branch v3.0.x (undef \_XOPEN_SOURCE breaks the build in AIX) - `12621`{.interpreted-text role="ghpull"}: Backport PR #12607 on branch v3.0.x (STY: fix whitespace and escaping) - `12616`{.interpreted-text role="ghpull"}: Backport PR #12615 on branch v3.0.x (Fix travis OSX build) - `12594`{.interpreted-text role="ghpull"}: Backport PR #12572 on branch v3.0.x (Fix singleton hist labels) - `12615`{.interpreted-text role="ghpull"}: Fix travis OSX build - `12607`{.interpreted-text role="ghpull"}: STY: fix whitespace and escaping - `12605`{.interpreted-text role="ghpull"}: Backport PR #12603 on branch v3.0.x (FIX: don\'t import macosx to check if eventloop running) - `12604`{.interpreted-text role="ghpull"}: FIX: over-ride \'copy\' on RcParams - `12603`{.interpreted-text role="ghpull"}: FIX: don\'t import macosx to check if eventloop running - `12602`{.interpreted-text role="ghpull"}: Backport PR #12599 on branch v3.0.x (Fix formatting of docstring) - `12599`{.interpreted-text role="ghpull"}: Fix formatting of docstring - `12593`{.interpreted-text role="ghpull"}: Backport PR #12581 on branch v3.0.x (Fix hist() error message) - `12569`{.interpreted-text role="ghpull"}: Don\'t confuse uintptr_t and Py_ssize_t. - `12572`{.interpreted-text role="ghpull"}: Fix singleton hist labels - `12581`{.interpreted-text role="ghpull"}: Fix hist() error message - `12575`{.interpreted-text role="ghpull"}: Backport PR #12573 on branch v3.0.x (BUG: mplot3d: Don\'t crash if azim or elev are non-integral) - `12558`{.interpreted-text role="ghpull"}: Backport PR #12555 on branch v3.0.x (Clarify horizontalalignment and verticalalignment in suptitle) - `12544`{.interpreted-text role="ghpull"}: Backport PR #12159 on branch v3.0.x (FIX: colorbar re-check norm before draw for autolabels) - `12159`{.interpreted-text role="ghpull"}: FIX: colorbar re-check norm before draw for autolabels - `12540`{.interpreted-text role="ghpull"}: Backport PR #12501 on branch v3.0.x (Rectified plot error) - `12531`{.interpreted-text role="ghpull"}: Backport PR #12431 on branch v3.0.x (FIX: allow single-string color for scatter) - `12431`{.interpreted-text role="ghpull"}: FIX: allow single-string color for scatter - `12529`{.interpreted-text role="ghpull"}: Backport PR #12216 on branch v3.0.x (Doc: Fix search for sphinx \>=1.8) - `12527`{.interpreted-text role="ghpull"}: Backport PR #12461 on branch v3.0.x (FIX: make add_lines work with new colorbar) - `12461`{.interpreted-text role="ghpull"}: FIX: make add_lines work with new colorbar - `12522`{.interpreted-text role="ghpull"}: Backport PR #12241 on branch v3.0.x (FIX: make unused spines invisible) - `12241`{.interpreted-text role="ghpull"}: FIX: make unused spines invisible - `12519`{.interpreted-text role="ghpull"}: Backport PR #12504 on branch v3.0.x (DOC: clarify min supported version wording) - `12517`{.interpreted-text role="ghpull"}: Backport PR #12507 on branch v3.0.x (FIX: make minor ticks formatted with science formatter as well) - `12507`{.interpreted-text role="ghpull"}: FIX: make minor ticks formatted with science formatter as well - `12512`{.interpreted-text role="ghpull"}: Backport PR #12363 on branch v3.0.x - `12511`{.interpreted-text role="ghpull"}: Backport PR #12366 on branch v2.2.x (TST: Update test images for new Ghostscript.) - `12509`{.interpreted-text role="ghpull"}: Backport PR #12478 on branch v3.0.x (MAINT: numpy deprecates asscalar in 1.16) - `12363`{.interpreted-text role="ghpull"}: FIX: errors in get_position changes - `12497`{.interpreted-text role="ghpull"}: Backport PR #12495 on branch v3.0.x (Fix duplicate condition in pathpatch3d example) - `12490`{.interpreted-text role="ghpull"}: Backport PR #12489 on branch v3.0.x (Fix typo in documentation of ylim) - `12485`{.interpreted-text role="ghpull"}: Fix font_manager.OSXInstalledFonts() - `12484`{.interpreted-text role="ghpull"}: Backport PR #12448 on branch v3.0.x (Don\'t error if some font directories are not readable.) - `12421`{.interpreted-text role="ghpull"}: Backport PR #12360 on branch v3.0.x (Replace axes_grid by axes_grid1 in test) - `12448`{.interpreted-text role="ghpull"}: Don\'t error if some font directories are not readable. - `12471`{.interpreted-text role="ghpull"}: Backport PR #12468 on branch v3.0.x (Fix `set_ylim` unit handling) - `12475`{.interpreted-text role="ghpull"}: Backport PR #12469 on branch v3.0.x (Clarify documentation of offsetbox.AnchoredText\'s prop kw argument) - `12468`{.interpreted-text role="ghpull"}: Fix `set_ylim` unit handling - `12464`{.interpreted-text role="ghpull"}: Backport PR #12457 on branch v3.0.x (Fix tutorial typos.) - `12432`{.interpreted-text role="ghpull"}: Backport PR #12277: FIX: datetime64 now recognized if in a list - `12277`{.interpreted-text role="ghpull"}: FIX: datetime64 now recognized if in a list - `12426`{.interpreted-text role="ghpull"}: Backport PR #12293 on branch v3.0.x (Make pyplot more tolerant wrt. 3rd-party subclasses.) - `12293`{.interpreted-text role="ghpull"}: Make pyplot more tolerant wrt. 3rd-party subclasses. - `12360`{.interpreted-text role="ghpull"}: Replace axes_grid by axes_grid1 in test - `12412`{.interpreted-text role="ghpull"}: Backport PR #12394 on branch v3.0.x (DOC: fix CL tutorial to give same output from saved file and example) - `12410`{.interpreted-text role="ghpull"}: Backport PR #12408 on branch v3.0.x (Don\'t crash on invalid registry font entries on Windows.) - `12411`{.interpreted-text role="ghpull"}: Backport PR #12366 on branch v3.0.0-doc (TST: Update test images for new Ghostscript.) - `12408`{.interpreted-text role="ghpull"}: Don\'t crash on invalid registry font entries on Windows. - `12403`{.interpreted-text role="ghpull"}: Backport PR #12149 on branch v3.0.x (Mathtext tutorial fixes) - `12400`{.interpreted-text role="ghpull"}: Backport PR #12257 on branch v3.0.x (Document standard backends in matplotlib.use()) - `12257`{.interpreted-text role="ghpull"}: Document standard backends in matplotlib.use() - `12399`{.interpreted-text role="ghpull"}: Backport PR #12383 on branch v3.0.x (Revert change of parameter name in annotate()) - `12383`{.interpreted-text role="ghpull"}: Revert change of parameter name in annotate() - `12390`{.interpreted-text role="ghpull"}: Backport PR #12385 on branch v3.0.x (CI: Added Appveyor Python 3.7 build) - `12385`{.interpreted-text role="ghpull"}: CI: Added Appveyor Python 3.7 build - `12381`{.interpreted-text role="ghpull"}: Backport PR #12353 on branch v3.0.x (Doc: clarify default parameters in scatter docs) - `12378`{.interpreted-text role="ghpull"}: Backport PR #12366 on branch v3.0.x (TST: Update test images for new Ghostscript.) - `12375`{.interpreted-text role="ghpull"}: Backport PR #11648 on branch v3.0.x (FIX: colorbar placement in constrained layout) - `11648`{.interpreted-text role="ghpull"}: FIX: colorbar placement in constrained layout - `12350`{.interpreted-text role="ghpull"}: Backport PR #12214 on branch v3.0.x - `12348`{.interpreted-text role="ghpull"}: Backport PR #12347 on branch v3.0.x (DOC: add_child_axes to axes_api.rst) - `12214`{.interpreted-text role="ghpull"}: Improve docstring of Annotation - `12344`{.interpreted-text role="ghpull"}: Backport PR #12321 on branch v3.0.x (maint: setupext.py for freetype had a Catch case for missing ft2build.h) - `12342`{.interpreted-text role="ghpull"}: Backport PR #12334 on branch v3.0.x (Improve selection of inset indicator connectors.) - `12334`{.interpreted-text role="ghpull"}: Improve selection of inset indicator connectors. - `12339`{.interpreted-text role="ghpull"}: Backport PR #12297 on branch v3.0.x (Remove some pytest parameterising warnings) - `12338`{.interpreted-text role="ghpull"}: Backport PR #12268 on branch v3.0.x (FIX: remove unnecessary `self` in `super_`-calls, fixes #12265) - `12336`{.interpreted-text role="ghpull"}: Backport PR #12212 on branch v3.0.x (font_manager: Fixed problems with Path(\...).suffix) - `12268`{.interpreted-text role="ghpull"}: FIX: remove unnecessary `self` in `super_`-calls, fixes #12265 - `12212`{.interpreted-text role="ghpull"}: font_manager: Fixed problems with Path(\...).suffix - `12331`{.interpreted-text role="ghpull"}: Backport PR #12322 on branch v3.0.x (Fix the docs build.) - `12327`{.interpreted-text role="ghpull"}: Backport PR #12326 on branch v3.0.x (fixed minor spelling error in docstring) - `12320`{.interpreted-text role="ghpull"}: Backport PR #12319 on branch v3.0.x (Fix Travis 3.6 builds) - `12315`{.interpreted-text role="ghpull"}: Backport PR #12313 on branch v3.0.x (BUG: Fix typo in view_limits() for MultipleLocator) - `12313`{.interpreted-text role="ghpull"}: BUG: Fix typo in view_limits() for MultipleLocator - `12305`{.interpreted-text role="ghpull"}: Backport PR #12274 on branch v3.0.x (MNT: put back `_hold` as read-only attribute on AxesBase) - `12274`{.interpreted-text role="ghpull"}: MNT: put back `_hold` as read-only attribute on AxesBase - `12303`{.interpreted-text role="ghpull"}: Backport PR #12163 on branch v3.0.x (TST: Defer loading Qt framework until test is run.) - `12299`{.interpreted-text role="ghpull"}: Backport PR #12294 on branch v3.0.x (Fix expand_dims warnings in triinterpolate) - `12163`{.interpreted-text role="ghpull"}: TST: Defer loading Qt framework until test is run. - `12301`{.interpreted-text role="ghpull"}: Ghostscript 9.0 requirement revisited - `12294`{.interpreted-text role="ghpull"}: Fix expand_dims warnings in triinterpolate - `12297`{.interpreted-text role="ghpull"}: Remove some pytest parameterising warnings - `12295`{.interpreted-text role="ghpull"}: Backport PR #12261 on branch v3.0.x (FIX: parasite axis2 demo) - `12289`{.interpreted-text role="ghpull"}: Backport PR #12278 on branch v3.0.x (Document inheriting docstrings) - `12287`{.interpreted-text role="ghpull"}: Backport PR #12262 on branch v3.0.x (Simplify empty-rasterized pdf test.) - `12280`{.interpreted-text role="ghpull"}: Backport PR #12269 on branch v3.0.x (Add some param docs to BlockingInput methods) - `12266`{.interpreted-text role="ghpull"}: Backport PR #12254 on branch v3.0.x (Improve docstrings of Animations) - `12262`{.interpreted-text role="ghpull"}: Simplify empty-rasterized pdf test. - `12254`{.interpreted-text role="ghpull"}: Improve docstrings of Animations - `12263`{.interpreted-text role="ghpull"}: Backport PR #12258 on branch v3.0.x (Fix CSS for module-level data) - `12250`{.interpreted-text role="ghpull"}: Backport PR #12209 on branch v3.0.x (Doc: Sort named colors example by palette) - `12248`{.interpreted-text role="ghpull"}: Backport PR #12237 on branch v3.0.x (Use (float, float) as parameter type for 2D positions in docstrings) - `12240`{.interpreted-text role="ghpull"}: Backport PR #12236 on branch v3.0.x - `12237`{.interpreted-text role="ghpull"}: Use (float, float) as parameter type for 2D positions in docstrings - `12242`{.interpreted-text role="ghpull"}: Backport PR #12238 on branch v3.0.x (Typo in docs) - `12236`{.interpreted-text role="ghpull"}: Make boilerplate-generated pyplot.py flake8 compliant - `12234`{.interpreted-text role="ghpull"}: Backport PR #12228 on branch v3.0.x (Fix trivial typo in docs.) - `12230`{.interpreted-text role="ghpull"}: Backport PR #12213 on branch v3.0.x (Change win32InstalledFonts return value) - `12213`{.interpreted-text role="ghpull"}: Change win32InstalledFonts return value - `12223`{.interpreted-text role="ghpull"}: Backport PR #11688 on branch v3.0.x (Don\'t draw axis (spines, ticks, labels) twice when using parasite axes.) - `12224`{.interpreted-text role="ghpull"}: Backport PR #12207 on branch v3.0.x (FIX: don\'t check for interactive framework if none required) - `12207`{.interpreted-text role="ghpull"}: FIX: don\'t check for interactive framework if none required - `11688`{.interpreted-text role="ghpull"}: Don\'t draw axis (spines, ticks, labels) twice when using parasite axes. - `12205`{.interpreted-text role="ghpull"}: Backport PR #12186 on branch v3.0.x (DOC: fix API note about get_tightbbox) - `12204`{.interpreted-text role="ghpull"}: Backport PR #12203 on branch v3.0.x (Document legend best slowness) - `12203`{.interpreted-text role="ghpull"}: Document legend\'s slowness when \"best\" location is used - `12194`{.interpreted-text role="ghpull"}: Backport PR #12164 on branch v3.0.x (Fix Annotation.contains.) - `12193`{.interpreted-text role="ghpull"}: Backport PR #12177 on branch v3.0.x (FIX: remove cwd from mac font path search) - `12164`{.interpreted-text role="ghpull"}: Fix Annotation.contains. - `12177`{.interpreted-text role="ghpull"}: FIX: remove cwd from mac font path search - `12185`{.interpreted-text role="ghpull"}: Backport PR #12183 on branch v3.0.x (Doc: Don\'t use Sphinx 1.8) - `12183`{.interpreted-text role="ghpull"}: Doc: Don\'t use Sphinx 1.8 - `12172`{.interpreted-text role="ghpull"}: Backport PR #12157 on branch v3.0.x (Properly declare the interactive framework for the qt4foo backends.) - `12167`{.interpreted-text role="ghpull"}: Backport PR #12166 on branch v3.0.x (Document preference order for backend auto selection) - `12166`{.interpreted-text role="ghpull"}: Document preference order for backend auto selection - `12157`{.interpreted-text role="ghpull"}: Properly declare the interactive framework for the qt4foo backends. - `12153`{.interpreted-text role="ghpull"}: Backport PR #12148 on branch v3.0.x (BLD: pragmatic fix for building basic_unit example on py37) Issues (31): - `12626`{.interpreted-text role="ghissue"}: AttributeError: module \'matplotlib\' has no attribute \'artist\' - `12613`{.interpreted-text role="ghissue"}: transiently linked interactivity of unshared pair of axes generated with make_axes_locatable - `12601`{.interpreted-text role="ghissue"}: Can\'t import matplotlib - `12580`{.interpreted-text role="ghissue"}: Incorrect hist error message with bad color size - `12567`{.interpreted-text role="ghissue"}: Calling pyplot.show() with TkAgg backend on x86 machine raises OverflowError. - `12556`{.interpreted-text role="ghissue"}: Matplotlib 3.0.0 import hangs in clean environment - `12550`{.interpreted-text role="ghissue"}: colorbar resizes in animation - `12155`{.interpreted-text role="ghissue"}: Incorrect placement of Colorbar ticks using LogNorm - `12438`{.interpreted-text role="ghissue"}: Scatter doesn\'t accept a list of strings as color spec. - `12429`{.interpreted-text role="ghissue"}: scatter() does not accept gray strings anymore - `12458`{.interpreted-text role="ghissue"}: add_lines misses lines for matplotlib.colorbar.ColorbarBase - `12239`{.interpreted-text role="ghissue"}: 3d axes are collapsed by tight_layout - `12488`{.interpreted-text role="ghissue"}: inconsistent colorbar tick labels for LogNorm - `12515`{.interpreted-text role="ghissue"}: pyplot.step broken in 3.0.0? - `12355`{.interpreted-text role="ghissue"}: Error for bbox_inches=\'tight\' in savefig with make_axes_locatable - `12505`{.interpreted-text role="ghissue"}: ImageGrid in 3.0 - `12291`{.interpreted-text role="ghissue"}: Importing pyplot crashes on macOS due to missing fontlist-v300.json and then Permission denied: \'/opt/local/share/fonts\' - `12288`{.interpreted-text role="ghissue"}: New function signatures in pyplot break Cartopy - `12445`{.interpreted-text role="ghissue"}: Error on colorbar - `12446`{.interpreted-text role="ghissue"}: Polar Contour - float() argument must be a string or a number, not \'AxesParasiteParasiteAuxTrans\' - `12271`{.interpreted-text role="ghissue"}: error with errorbar with datetime64 - `12405`{.interpreted-text role="ghissue"}: plt.stackplot() does not work with 3.0.0 - `12406`{.interpreted-text role="ghissue"}: Bug with font finding, and here is my fix as well. - `12325`{.interpreted-text role="ghissue"}: Annotation change from \"s\" to \"text\" in 3.0- documentation - `11641`{.interpreted-text role="ghissue"}: constrained_layout and colorbar for a subset of axes - `12352`{.interpreted-text role="ghissue"}: TeX rendering broken on master with windows - `12354`{.interpreted-text role="ghissue"}: Too many levels of symbolic links - `12265`{.interpreted-text role="ghissue"}: ParasiteAxesAuxTrans pcolor/pcolormesh and contour/contourf broken - `12173`{.interpreted-text role="ghissue"}: Cannot import pyplot - `12120`{.interpreted-text role="ghissue"}: Default legend behavior (loc=\'best\') very slow for large amounts of data. - `12176`{.interpreted-text role="ghissue"}: import pyplot on MacOS without font cache will search entire subtree of current dir --- ::: redirect-from /users/prev_whats_new/github_stats_3.0.2 ::: # GitHub statistics for 3.0.2 (Nov 10, 2018) {#github-stats-3-0-2} GitHub statistics for 2018/09/18 (tag: v3.0.0) - 2018/11/10 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 170 issues and merged 224 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/39?closed=1) The following 49 authors contributed 460 commits. - Abhinuv Nitin Pitale - Alon Hershenhorn - Andras Deak - Ankur Dedania - Antony Lee - Anubhav Shrimal - Ayappan P - azure-pipelines\[bot\] - Ben Root - Colin - Colin Carroll - Daniele Nicolodi - David Haberthür - David Stansby - Dmitry Mottl - Elan Ernest - Elliott Sales de Andrade - Eric Wieser - esvhd - Galen Lynch - hannah - Ildar Akhmetgaleev - ImportanceOfBeingErnest - Jody Klymak - Joel Wanner - Kai Muehlbauer - Kevin Rose - Kyle Sunden - Marcel Martin - Matthias Bussonnier - MeeseeksMachine - Michael Jancsy - Nelle Varoquaux - Nick Papior - Nikita Kniazev - Paul Hobson - pharshalp - Rasmus Diederichsen - Ryan May - saksmito - Takafumi Arakaki - teresy - Thomas A Caswell - thoo - Tim Hoffmann - Tobias Megies - Tyler Makaro - Will Handley - Yuxin Wu GitHub issues and pull requests: Pull Requests (224): - `12785`{.interpreted-text role="ghpull"}: Use level kwargs in irregular contour example - `12767`{.interpreted-text role="ghpull"}: Make colorbars constructible with dataless ScalarMappables. - `12775`{.interpreted-text role="ghpull"}: Add note to errorbar function about sign of errors - `12776`{.interpreted-text role="ghpull"}: Fix typo in example (on-borad -\> on-board). - `12771`{.interpreted-text role="ghpull"}: Do not rely on external stack frame to exist - `12526`{.interpreted-text role="ghpull"}: Rename jquery files - `12552`{.interpreted-text role="ghpull"}: Update docs for writing image comparison tests. - `12746`{.interpreted-text role="ghpull"}: Use skipif, not xfail, for uncomparable image formats. - `12747`{.interpreted-text role="ghpull"}: Prefer log.warning(\"%s\", \...) to log.warning(\"%s\" % \...). - `11753`{.interpreted-text role="ghpull"}: FIX: Apply aspect before drawing starts - `12749`{.interpreted-text role="ghpull"}: Move toolmanager warning from logging to warning. - `12708`{.interpreted-text role="ghpull"}: Run flake8 in a separate travis environment - `12737`{.interpreted-text role="ghpull"}: Improve docstring of Arc - `12598`{.interpreted-text role="ghpull"}: Support Cn colors with n\>=10. - `12670`{.interpreted-text role="ghpull"}: FIX: add setter for hold to un-break basemap - `12693`{.interpreted-text role="ghpull"}: Workaround Text3D breaking tight_layout() - `12727`{.interpreted-text role="ghpull"}: Reorder API docs: separate file per module - `12738`{.interpreted-text role="ghpull"}: Add unobtrusive deprecation note to the first line of the docstring - `12740`{.interpreted-text role="ghpull"}: DOC: constrained layout guide (fix: Spacing with colorbars) - `11663`{.interpreted-text role="ghpull"}: Refactor color parsing of Axes.scatter - `12736`{.interpreted-text role="ghpull"}: Move deprecation note to end of docstring - `12704`{.interpreted-text role="ghpull"}: Rename tkinter import from Tk to tk. - `12730`{.interpreted-text role="ghpull"}: MNT: merge ignore lines in .flake8 - `12707`{.interpreted-text role="ghpull"}: Fix tk error when closing first pyplot figure - `12715`{.interpreted-text role="ghpull"}: Cleanup dviread. - `12717`{.interpreted-text role="ghpull"}: Delete some `if __name__ == "__main__"` clauses. - `12726`{.interpreted-text role="ghpull"}: Fix test_non_gui_warning for Azure (and mplcairo). - `12720`{.interpreted-text role="ghpull"}: Improve docs on Axes scales - `12537`{.interpreted-text role="ghpull"}: Improve error message on failing test_pyplot_up_to_date - `12721`{.interpreted-text role="ghpull"}: Make get_scale_docs() internal - `12617`{.interpreted-text role="ghpull"}: Set up CI with Azure Pipelines - `12673`{.interpreted-text role="ghpull"}: Fix for \_axes.scatter() array index out of bound error - `12676`{.interpreted-text role="ghpull"}: Doc: document textpath module - `12705`{.interpreted-text role="ghpull"}: Improve docs on Axes limits and direction - `12706`{.interpreted-text role="ghpull"}: Extend sphinx Makefile to cleanup completely - `12481`{.interpreted-text role="ghpull"}: Warn if plot_surface Z values contain NaN - `12709`{.interpreted-text role="ghpull"}: Correctly remove nans when drawing paths with pycairo. - `12685`{.interpreted-text role="ghpull"}: Make ticks in demo_axes_rgb.py visible - `12691`{.interpreted-text role="ghpull"}: DOC: Link to \"How to make a PR\" tutorials as badge and in contributing - `12684`{.interpreted-text role="ghpull"}: Change ipython block to code-block - `11974`{.interpreted-text role="ghpull"}: Make code match comment in sankey. - `12440`{.interpreted-text role="ghpull"}: Make arguments to \@deprecated/warn_deprecated keyword-only. - `12683`{.interpreted-text role="ghpull"}: TST: mark test_constrainedlayout.py::test_colorbar_location as flaky - `12686`{.interpreted-text role="ghpull"}: Remove deprecation warnings in tests - `12470`{.interpreted-text role="ghpull"}: Update AutoDateFormatter with locator - `12656`{.interpreted-text role="ghpull"}: FIX: fix error in colorbar.get_ticks not having valid data - `12586`{.interpreted-text role="ghpull"}: Improve linestyles example - `12006`{.interpreted-text role="ghpull"}: Added stacklevel=2 to all warnings.warn calls (issue 10643) - `12651`{.interpreted-text role="ghpull"}: FIX: ignore non-finite bbox - `12653`{.interpreted-text role="ghpull"}: Don\'t warn when accessing deprecated properties from the class. - `12608`{.interpreted-text role="ghpull"}: ENH: allow matplotlib.use after getbackend - `12658`{.interpreted-text role="ghpull"}: Do not warn-depreacted when iterating over rcParams - `12635`{.interpreted-text role="ghpull"}: FIX: allow non bbox_extra_artists calls - `12659`{.interpreted-text role="ghpull"}: Add note that developer discussions are private - `12543`{.interpreted-text role="ghpull"}: Make rcsetup.py flak8 compliant - `12642`{.interpreted-text role="ghpull"}: Don\'t silence TypeErrors in [fmt](){x,y}data. - `11667`{.interpreted-text role="ghpull"}: DOC: update doc requirement - `12442`{.interpreted-text role="ghpull"}: Deprecate passing drawstyle with linestyle as single string. - `12625`{.interpreted-text role="ghpull"}: Shorten some docstrings. - `12627`{.interpreted-text role="ghpull"}: Be a bit more stringent on invalid inputs. - `12561`{.interpreted-text role="ghpull"}: Properly css-style exceptions in the documentation - `12629`{.interpreted-text role="ghpull"}: Fix issue with PyPy on macOS - `10933`{.interpreted-text role="ghpull"}: Remove \"experimental\" fontconfig font_manager backend. - `12630`{.interpreted-text role="ghpull"}: Fix RcParams.\_\_len\_\_ - `12285`{.interpreted-text role="ghpull"}: FIX: Don\'t apply tight_layout if axes collapse - `12548`{.interpreted-text role="ghpull"}: undef \_XOPEN_SOURCE breaks the build in AIX - `12615`{.interpreted-text role="ghpull"}: Fix travis OSX build - `12600`{.interpreted-text role="ghpull"}: Minor style fixes. - `12607`{.interpreted-text role="ghpull"}: STY: fix whitespace and escaping - `12603`{.interpreted-text role="ghpull"}: FIX: don\'t import macosx to check if eventloop running - `12599`{.interpreted-text role="ghpull"}: Fix formatting of docstring - `12569`{.interpreted-text role="ghpull"}: Don\'t confuse uintptr_t and Py_ssize_t. - `12572`{.interpreted-text role="ghpull"}: Fix singleton hist labels - `12581`{.interpreted-text role="ghpull"}: Fix hist() error message - `12570`{.interpreted-text role="ghpull"}: Fix mathtext tutorial for build with Sphinx 1.8. - `12487`{.interpreted-text role="ghpull"}: Update docs/tests for the deprecation of aname and label1On/label2On/etc. - `12521`{.interpreted-text role="ghpull"}: Improve docstring of draw_idle() - `12573`{.interpreted-text role="ghpull"}: BUG: mplot3d: Don\'t crash if azim or elev are non-integral - `12574`{.interpreted-text role="ghpull"}: Remove some unused imports - `12568`{.interpreted-text role="ghpull"}: Add note regarding builds of old Matplotlibs. - `12555`{.interpreted-text role="ghpull"}: Clarify horizontalalignment and verticalalignment in suptitle - `12547`{.interpreted-text role="ghpull"}: Disable sticky edge accumulation if no autoscaling. - `12546`{.interpreted-text role="ghpull"}: Avoid quadratic behavior when accumulating stickies. - `12159`{.interpreted-text role="ghpull"}: FIX: colorbar re-check norm before draw for autolabels - `12501`{.interpreted-text role="ghpull"}: Rectified plot error - `11789`{.interpreted-text role="ghpull"}: endless looping GIFs with PillowWriter - `12525`{.interpreted-text role="ghpull"}: Fix some flake8 issues - `12431`{.interpreted-text role="ghpull"}: FIX: allow single-string color for scatter - `12216`{.interpreted-text role="ghpull"}: Doc: Fix search for sphinx \>=1.8 - `12461`{.interpreted-text role="ghpull"}: FIX: make add_lines work with new colorbar - `12241`{.interpreted-text role="ghpull"}: FIX: make unused spines invisible - `12516`{.interpreted-text role="ghpull"}: Don\'t handle impossible values for `align` in hist() - `12504`{.interpreted-text role="ghpull"}: DOC: clarify min supported version wording - `12507`{.interpreted-text role="ghpull"}: FIX: make minor ticks formatted with science formatter as well - `12500`{.interpreted-text role="ghpull"}: Adjust the widths of the messages during the build. - `12492`{.interpreted-text role="ghpull"}: Simplify radar_chart example. - `12478`{.interpreted-text role="ghpull"}: MAINT: NumPy deprecates asscalar in 1.16 - `12363`{.interpreted-text role="ghpull"}: FIX: errors in get_position changes - `12495`{.interpreted-text role="ghpull"}: Fix duplicate condition in pathpatch3d example - `11984`{.interpreted-text role="ghpull"}: Strip out pkg-config machinery for agg and libqhull. - `12463`{.interpreted-text role="ghpull"}: Document Artist.cursor_data() parameter - `12489`{.interpreted-text role="ghpull"}: Fix typo in documentation of ylim - `12482`{.interpreted-text role="ghpull"}: Test slider orientation - `12317`{.interpreted-text role="ghpull"}: Always install mpl_toolkits. - `12246`{.interpreted-text role="ghpull"}: Be less tolerant of broken installs. - `12477`{.interpreted-text role="ghpull"}: Use N{MICRO SIGN} instead of N{GREEK SMALL LETTER MU} in EngFormatter. - `12483`{.interpreted-text role="ghpull"}: Kill FontManager.update_fonts. - `12448`{.interpreted-text role="ghpull"}: Don\'t error if some font directories are not readable. - `12474`{.interpreted-text role="ghpull"}: Throw ValueError when irregularly gridded data is passed to streamplot. - `12469`{.interpreted-text role="ghpull"}: Clarify documentation of offsetbox.AnchoredText\'s prop kw argument - `12468`{.interpreted-text role="ghpull"}: Fix `set_ylim` unit handling - `12466`{.interpreted-text role="ghpull"}: np.fromstring -\> np.frombuffer. - `12369`{.interpreted-text role="ghpull"}: Improved exception handling on animation failure - `12460`{.interpreted-text role="ghpull"}: Deprecate RendererBase.strip_math. - `12457`{.interpreted-text role="ghpull"}: Fix tutorial typos. - `12453`{.interpreted-text role="ghpull"}: Rollback erroneous commit to whats_new.rst from #10746 - `12452`{.interpreted-text role="ghpull"}: Minor updates to the FAQ. - `10746`{.interpreted-text role="ghpull"}: Adjusted matplotlib.widgets.Slider to have optional vertical orientatation - `12441`{.interpreted-text role="ghpull"}: Get rid of a signed-compare warning. - `12430`{.interpreted-text role="ghpull"}: Deprecate Axes3D.plot_surface(shade=None) - `12435`{.interpreted-text role="ghpull"}: Fix numpydoc parameter formatting - `12434`{.interpreted-text role="ghpull"}: Clarify documentation for textprops keyword parameter of TextArea - `12427`{.interpreted-text role="ghpull"}: Document Artist.get_cursor_data - `12277`{.interpreted-text role="ghpull"}: FIX: datetime64 now recognized if in a list - `10322`{.interpreted-text role="ghpull"}: Use np.hypot wherever possible. - `12423`{.interpreted-text role="ghpull"}: Minor simplifications to backend_svg. - `12293`{.interpreted-text role="ghpull"}: Make pyplot more tolerant wrt. 3rd-party subclasses. - `12360`{.interpreted-text role="ghpull"}: Replace axes_grid by axes_grid1 in test - `10356`{.interpreted-text role="ghpull"}: fix detecting which artist(s) the mouse is over - `12416`{.interpreted-text role="ghpull"}: Move font cache rebuild out of exception handler - `11891`{.interpreted-text role="ghpull"}: Group some print()s in backend_ps. - `12165`{.interpreted-text role="ghpull"}: Remove deprecated mlab code - `12394`{.interpreted-text role="ghpull"}: DOC: fix CL tutorial to give same output from saved file and example - `12387`{.interpreted-text role="ghpull"}: Update HTML animation as slider is dragged - `12408`{.interpreted-text role="ghpull"}: Don\'t crash on invalid registry font entries on Windows. - `10088`{.interpreted-text role="ghpull"}: Deprecate Tick.{gridOn,tick1On,label1On,\...} in favor of set_visible. - `12149`{.interpreted-text role="ghpull"}: Mathtext tutorial fixes - `12393`{.interpreted-text role="ghpull"}: Deprecate to-days converters in matplotlib dates - `12257`{.interpreted-text role="ghpull"}: Document standard backends in matplotlib.use() - `12383`{.interpreted-text role="ghpull"}: Revert change of parameter name in annotate() - `12385`{.interpreted-text role="ghpull"}: CI: Added Appveyor Python 3.7 build - `12247`{.interpreted-text role="ghpull"}: Machinery for deprecating properties. - `12371`{.interpreted-text role="ghpull"}: Move check for ImageMagick Windows path to bin_path(). - `12384`{.interpreted-text role="ghpull"}: Cleanup axislines style. - `12353`{.interpreted-text role="ghpull"}: Doc: clarify default parameters in scatter docs - `12366`{.interpreted-text role="ghpull"}: TST: Update test images for new Ghostscript. - `11648`{.interpreted-text role="ghpull"}: FIX: colorbar placement in constrained layout - `12368`{.interpreted-text role="ghpull"}: Don\'t use stdlib private API in animation.py. - `12351`{.interpreted-text role="ghpull"}: dviread: find_tex_file: Ensure the encoding on windows - `12244`{.interpreted-text role="ghpull"}: Merge barchart examples. - `12372`{.interpreted-text role="ghpull"}: Remove two examples. - `12214`{.interpreted-text role="ghpull"}: Improve docstring of Annotation - `12347`{.interpreted-text role="ghpull"}: DOC: add_child_axes to axes_api.rst - `12304`{.interpreted-text role="ghpull"}: TST: Merge Qt tests into one file. - `12321`{.interpreted-text role="ghpull"}: maint: setupext.py for freetype had a Catch case for missing ft2build.h - `12340`{.interpreted-text role="ghpull"}: Catch test deprecation warnings for mlab.demean - `12334`{.interpreted-text role="ghpull"}: Improve selection of inset indicator connectors. - `12316`{.interpreted-text role="ghpull"}: Fix some warnings from Travis - `12268`{.interpreted-text role="ghpull"}: FIX: remove unnecessary `self` in `super_`-calls, fixes #12265 - `12212`{.interpreted-text role="ghpull"}: font_manager: Fixed problems with Path(\...).suffix - `12326`{.interpreted-text role="ghpull"}: fixed minor spelling error in docstring - `12296`{.interpreted-text role="ghpull"}: Make FooConverter inherit from ConversionInterface in examples - `12322`{.interpreted-text role="ghpull"}: Fix the docs build. - `12319`{.interpreted-text role="ghpull"}: Fix Travis 3.6 builds - `12309`{.interpreted-text role="ghpull"}: Deduplicate implementations of FooNorm.autoscale{,\_None} - `12314`{.interpreted-text role="ghpull"}: Deprecate `axis('normal')` in favor of `axis('auto')`. - `12313`{.interpreted-text role="ghpull"}: BUG: Fix typo in view_limits() for MultipleLocator - `12307`{.interpreted-text role="ghpull"}: Clarify missing-property error message. - `12274`{.interpreted-text role="ghpull"}: MNT: put back `_hold` as read-only attribute on AxesBase - `12260`{.interpreted-text role="ghpull"}: Fix docs : change from issue #12191, remove \"if 1:\" blocks in examples - `12163`{.interpreted-text role="ghpull"}: TST: Defer loading Qt framework until test is run. - `12253`{.interpreted-text role="ghpull"}: Handle utf-8 output by kpathsea on Windows. - `12301`{.interpreted-text role="ghpull"}: Ghostscript 9.0 requirement revisited - `12294`{.interpreted-text role="ghpull"}: Fix expand_dims warnings in triinterpolate - `12292`{.interpreted-text role="ghpull"}: TST: Modify the bar3d test to show three more angles - `12297`{.interpreted-text role="ghpull"}: Remove some pytest parameterising warnings - `12261`{.interpreted-text role="ghpull"}: FIX: parasite axis2 demo - `12278`{.interpreted-text role="ghpull"}: Document inheriting docstrings - `12262`{.interpreted-text role="ghpull"}: Simplify empty-rasterized pdf test. - `12269`{.interpreted-text role="ghpull"}: Add some param docs to BlockingInput methods - `12272`{.interpreted-text role="ghpull"}: Fix `contrained` to `constrained` - `12255`{.interpreted-text role="ghpull"}: Deduplicate inherited docstrings. - `12254`{.interpreted-text role="ghpull"}: Improve docstrings of Animations - `12258`{.interpreted-text role="ghpull"}: Fix CSS for module-level data - `12222`{.interpreted-text role="ghpull"}: Remove extraneous if 1 statements in demo_axisline_style.py - `12137`{.interpreted-text role="ghpull"}: MAINT: Vectorize bar3d - `12219`{.interpreted-text role="ghpull"}: Merge OSXInstalledFonts into findSystemFonts. - `12229`{.interpreted-text role="ghpull"}: Less ACCEPTS, more numpydoc. - `12209`{.interpreted-text role="ghpull"}: Doc: Sort named colors example by palette - `12237`{.interpreted-text role="ghpull"}: Use (float, float) as parameter type for 2D positions in docstrings - `12238`{.interpreted-text role="ghpull"}: Typo in docs - `12236`{.interpreted-text role="ghpull"}: Make boilerplate-generated pyplot.py flake8 compliant - `12231`{.interpreted-text role="ghpull"}: CI: Speed up Appveyor repository cloning - `12228`{.interpreted-text role="ghpull"}: Fix trivial typo in docs. - `12227`{.interpreted-text role="ghpull"}: Use (float, float) as parameter type for 2D positions - `12199`{.interpreted-text role="ghpull"}: Allow disabling specific mouse actions in blocking_input - `12213`{.interpreted-text role="ghpull"}: Change win32InstalledFonts return value - `12207`{.interpreted-text role="ghpull"}: FIX: don\'t check for interactive framework if none required - `11688`{.interpreted-text role="ghpull"}: Don\'t draw axis (spines, ticks, labels) twice when using parasite axes. - `12210`{.interpreted-text role="ghpull"}: Axes.tick_params() argument checking - `12211`{.interpreted-text role="ghpull"}: Fix typo - `12200`{.interpreted-text role="ghpull"}: Slightly clarify some invalid shape exceptions for image data. - `12151`{.interpreted-text role="ghpull"}: Don\'t pretend \@deprecated applies to classmethods. - `12190`{.interpreted-text role="ghpull"}: Remove some unused variables and imports - `12186`{.interpreted-text role="ghpull"}: DOC: fix API note about get_tightbbox - `12203`{.interpreted-text role="ghpull"}: Document legend\'s slowness when \"best\" location is used - `12192`{.interpreted-text role="ghpull"}: Exclude examples from lgtm analysis - `12196`{.interpreted-text role="ghpull"}: Give Carreau the ability to mention the backport bot. - `12187`{.interpreted-text role="ghpull"}: DOC: Update INSTALL.rst - `12164`{.interpreted-text role="ghpull"}: Fix Annotation.contains. - `12177`{.interpreted-text role="ghpull"}: FIX: remove cwd from mac font path search - `12182`{.interpreted-text role="ghpull"}: Fix Flash of Unstyled Content by removing remaining Flipcause integration - `12184`{.interpreted-text role="ghpull"}: DOC: update \"Previous What\'s New\" for 2.2 with reference to cividis paper - `12183`{.interpreted-text role="ghpull"}: Doc: Don\'t use Sphinx 1.8 - `12171`{.interpreted-text role="ghpull"}: Remove internal warning due to zsort deprecation - `12166`{.interpreted-text role="ghpull"}: Document preference order for backend auto selection - `12154`{.interpreted-text role="ghpull"}: Avoid triggering deprecation warnings with pytest 3.8. - `12030`{.interpreted-text role="ghpull"}: Speed up canvas redraw for GTK3Agg backend. - `12157`{.interpreted-text role="ghpull"}: Properly declare the interactive framework for the qt4foo backends. - `12156`{.interpreted-text role="ghpull"}: Cleanup the GridSpec demos. - `12144`{.interpreted-text role="ghpull"}: Add explicit getters and setters for Annotation.anncoords. - `12152`{.interpreted-text role="ghpull"}: Use \_warn_external for deprecations warnings. - `12148`{.interpreted-text role="ghpull"}: BLD: pragmatic fix for building basic_unit example on py37 - `12147`{.interpreted-text role="ghpull"}: DOC: update the gh_stats code Issues (170): - `12699`{.interpreted-text role="ghissue"}: Annotations get cropped out of figures saved with bbox_inches=\'tight\' - `9217`{.interpreted-text role="ghissue"}: Weirdness with inline figure DPI settings in Jupyter Notebook - `4853`{.interpreted-text role="ghissue"}: %matplotlib notebook creates much bigger figures than %matplotlib inline - `12780`{.interpreted-text role="ghissue"}: Vague/misleading exception message in scatter() - `10239`{.interpreted-text role="ghissue"}: Weird interaction with Tkinter - `10045`{.interpreted-text role="ghissue"}: subplots_adjust() breaks layout of tick labels - `12765`{.interpreted-text role="ghissue"}: Matplotlib draws incorrect color - `11800`{.interpreted-text role="ghissue"}: Gridspec tutorial - `12757`{.interpreted-text role="ghissue"}: up the figure - `12724`{.interpreted-text role="ghissue"}: Importing pyplot steals focus on macOS - `12669`{.interpreted-text role="ghissue"}: fixing \_hold on cartopy broke basemap - `12687`{.interpreted-text role="ghissue"}: Plotting text on 3d axes before tight_layout() breaks tight_layout() - `12734`{.interpreted-text role="ghissue"}: Wishlist: functionally linked twin axes - `12576`{.interpreted-text role="ghissue"}: RcParams is fundamentally broken - `12641`{.interpreted-text role="ghissue"}: `_axes.py.scatter()` array index out of bound / calling from `seaborn` - `12703`{.interpreted-text role="ghissue"}: Error when closing first of several pyplot figures in TkAgg - `12728`{.interpreted-text role="ghissue"}: Deprecation Warnings - `4124`{.interpreted-text role="ghissue"}: Provide canonical examples of mpl in web frameworks - `10574`{.interpreted-text role="ghissue"}: Default color after setting alptha to Patch in legened - `12702`{.interpreted-text role="ghissue"}: couldn\'t find or load Qt platform plugin \"windows\" in \"\". - `11139`{.interpreted-text role="ghissue"}: \"make clean\" doesn\'t remove all the build doc files - `12701`{.interpreted-text role="ghissue"}: semilogy with NaN prevents display of Title (cairo backend) - `12696`{.interpreted-text role="ghissue"}: Process finished with exit code -1 due to matplotlib configuration - `12692`{.interpreted-text role="ghissue"}: matplotlib.plot.show always blocks the execution of python script - `12433`{.interpreted-text role="ghissue"}: Travis error is MacOS image tolerance of 0.005 for `test_constrained_layout.py::test_colorbar_location` - `10017`{.interpreted-text role="ghissue"}: unicode_literals considered harmful - `12682`{.interpreted-text role="ghissue"}: using AxesImage.set_clim() shrinks the colorbar - `12620`{.interpreted-text role="ghissue"}: Overlapping 3D objects - `12680`{.interpreted-text role="ghissue"}: matplotlib ui in thread still blocked - `11908`{.interpreted-text role="ghissue"}: Improve linestyle documentation - `12650`{.interpreted-text role="ghissue"}: Deprecation warnings when calling help(matplotlib) - `10643`{.interpreted-text role="ghissue"}: Most warnings calls do not set the stacklevel - `12671`{.interpreted-text role="ghissue"}: make_axes_locatable breaks with matplotlib 3.0 - `12664`{.interpreted-text role="ghissue"}: plt.scatter crashes because overwrites the colors to an empty list - `12188`{.interpreted-text role="ghissue"}: matplotlib 3 pyplot on MacOS bounces rocket icon in dock - `12648`{.interpreted-text role="ghissue"}: Regression when calling annotate with nan values for the position - `12362`{.interpreted-text role="ghissue"}: In 3.0.0 backend cannot be set if \'get_backend()\' is run first - `12649`{.interpreted-text role="ghissue"}: Over-verbose deprecation warning about examples.directory - `12661`{.interpreted-text role="ghissue"}: In version 3.0.0 make_axes_locatable + colorbar does not produce expected result - `12634`{.interpreted-text role="ghissue"}: axes_grid1 axes have no keyword argument \'bbox_extra_artists\' - `12654`{.interpreted-text role="ghissue"}: Broken \'Developer Discussions\' link - `12657`{.interpreted-text role="ghissue"}: With v3.0.0 mpl_toolkits.axes_grid1.make_axes_locatable().append_axes breaks in Jupyter - `12645`{.interpreted-text role="ghissue"}: Markers are offset when \'facecolor\' or \'edgecolor\' are set to \'none\' when plotting data - `12644`{.interpreted-text role="ghissue"}: Memory leak with plt.plot in Jupyter Notebooks? - `12632`{.interpreted-text role="ghissue"}: Do we need input hooks macosx? - `12535`{.interpreted-text role="ghissue"}: AIX Support - Do not undef \_XOPEN_SOURCE - `12626`{.interpreted-text role="ghissue"}: AttributeError: module \'matplotlib\' has no attribute \'artist\' - `11034`{.interpreted-text role="ghissue"}: Doc Typo: matplotlib.axes.Axes.get_yticklabels / Axis.get_ticklabels - `12624`{.interpreted-text role="ghissue"}: make_axes_locatable : Colorbar in the middle instead of bottom while saving a pdf, png. - `11094`{.interpreted-text role="ghissue"}: cannot use GUI backends inside django request handlers - `12613`{.interpreted-text role="ghissue"}: transiently linked interactivity of unshared pair of axes generated with make_axes_locatable - `12578`{.interpreted-text role="ghissue"}: macOS builds are broken - `12612`{.interpreted-text role="ghissue"}: gui backends do not work inside of flask request handlers - `12611`{.interpreted-text role="ghissue"}: Matplotlib 3.0.0 Likely bug TypeError: stackplot() got multiple values for argument \'x\' - `12610`{.interpreted-text role="ghissue"}: matplotlibrc causes import to fail 3.0.0 (didn\'t crash 2.y.z series) - `12601`{.interpreted-text role="ghissue"}: Can\'t import matplotlib - `12597`{.interpreted-text role="ghissue"}: Please soon add Chinese language support!! It\'s to difficult for new people handle character - `12590`{.interpreted-text role="ghissue"}: Matplotlib pypi distribution lacks packages for Python 2.7 - `3869`{.interpreted-text role="ghissue"}: Numeric labels do not work with plt.hist - `12580`{.interpreted-text role="ghissue"}: Incorrect hist error message with bad color size - `12100`{.interpreted-text role="ghissue"}: document where to get nightly wheels - `7205`{.interpreted-text role="ghissue"}: Converting docstrings to numpydoc - `12564`{.interpreted-text role="ghissue"}: Saving plot as PNG file prunes tick labels - `12161`{.interpreted-text role="ghissue"}: Problems of using sharex options with lines plots and colormesh with colorbar - `12256`{.interpreted-text role="ghissue"}: tight_layout for plot with non-clipped screen-unit items causes issues on zoom - `12545`{.interpreted-text role="ghissue"}: Program quit unormally without reporting error - `12532`{.interpreted-text role="ghissue"}: Incorrect rendering of math symbols - `12567`{.interpreted-text role="ghissue"}: Calling pyplot.show() with TkAgg backend on x86 machine raises OverflowError. - `12571`{.interpreted-text role="ghissue"}: cannot install because Fatal Python error: initfsencoding: Unable to get the locale encoding - `12566`{.interpreted-text role="ghissue"}: Problem installing Version 1.3.1 -\> missing pkg-config freetype and libagg - `12556`{.interpreted-text role="ghissue"}: Matplotlib 3.0.0 import hangs in clean environment - `12197`{.interpreted-text role="ghissue"}: Weird behaviour of suptitle() when horizontalalignment is not \'center\' - `12550`{.interpreted-text role="ghissue"}: colorbar resizes in animation - `12155`{.interpreted-text role="ghissue"}: Incorrect placement of Colorbar ticks using LogNorm - `11787`{.interpreted-text role="ghissue"}: Looping gifs with PillowWriter - `12533`{.interpreted-text role="ghissue"}: Plotting with alpha=0 with rasterized=True causes ValueError on saving to pdf - `12438`{.interpreted-text role="ghissue"}: Scatter doesn\'t accept a list of strings as color spec. - `12429`{.interpreted-text role="ghissue"}: scatter() does not accept gray strings anymore - `12499`{.interpreted-text role="ghissue"}: run my code failed after i Import pylab failed, python version is 3.6.6 - `12458`{.interpreted-text role="ghissue"}: add_lines misses lines for matplotlib.colorbar.ColorbarBase - `12239`{.interpreted-text role="ghissue"}: 3d axes are collapsed by tight_layout - `12414`{.interpreted-text role="ghissue"}: Function to draw angle between two lines - `12488`{.interpreted-text role="ghissue"}: inconsistent colorbar tick labels for LogNorm - `12515`{.interpreted-text role="ghissue"}: pyplot.step broken in 3.0.0? - `12355`{.interpreted-text role="ghissue"}: Error for bbox_inches=\'tight\' in savefig with make_axes_locatable - `12505`{.interpreted-text role="ghissue"}: ImageGrid in 3.0 - `12502`{.interpreted-text role="ghissue"}: How can I put the ticks of logarithmic coordinate in the axes? - `12496`{.interpreted-text role="ghissue"}: Maplotlib Can\'t Plot a Dataset - `12486`{.interpreted-text role="ghissue"}: rotate label of legend ? - `12291`{.interpreted-text role="ghissue"}: Importing pyplot crashes on macOS due to missing fontlist-v300.json and then Permission denied: \'/opt/local/share/fonts\' - `12480`{.interpreted-text role="ghissue"}: \"close_event\" for nbagg/notebook backend - `12467`{.interpreted-text role="ghissue"}: Documentation of AnchoredText\'s prop keyword argument is misleading - `12288`{.interpreted-text role="ghissue"}: New function signatures in pyplot break Cartopy - `12445`{.interpreted-text role="ghissue"}: Error on colorbar - `8760`{.interpreted-text role="ghissue"}: Traceback from animation.MovieWriter.saving method is confusing because it provides no useful information - `9205`{.interpreted-text role="ghissue"}: after the animation encoder (e.g. ffmpeg) fails, the animation framework itself fails internally in various ways while trying to report the error - `12357`{.interpreted-text role="ghissue"}: Unclear error when saving Animation using FFMpeg - `12454`{.interpreted-text role="ghissue"}: Formatting numerical legend - `9636`{.interpreted-text role="ghissue"}: matplotlib crashes upon window resize - `11473`{.interpreted-text role="ghissue"}: Continuous plotting cause memory leak 20-50kb/sec - `12018`{.interpreted-text role="ghissue"}: No image pop-up or display for plt.imshow() and plt.show() - `11583`{.interpreted-text role="ghissue"}: How to draw parallelepiped with real size scaling? - `12446`{.interpreted-text role="ghissue"}: Polar Contour - float() argument must be a string or a number, not \'AxesParasiteParasiteAuxTrans\' - `12444`{.interpreted-text role="ghissue"}: Issues with gridspec/tight_layout in matplotlib version 2.2.3 - `11154`{.interpreted-text role="ghissue"}: Unexpected behavior for Axes3D.plot_surface(shade=None) - `12409`{.interpreted-text role="ghissue"}: Calling savefig() multiple times causes crash of Spyder IDE / IPython Kernel dying. - `9799`{.interpreted-text role="ghissue"}: FigureCanvasTkAgg - \"buffer is of wrong type\" error during blit - `12439`{.interpreted-text role="ghissue"}: FileNotFoundError for font_manager - `12437`{.interpreted-text role="ghissue"}: matplotlib-mac - `12121`{.interpreted-text role="ghissue"}: Documentation of TextArea\'s fontprops keyword argument is misleading - `12279`{.interpreted-text role="ghissue"}: Axes.format_cursor_data lacks documentation and seems unused - `12428`{.interpreted-text role="ghissue"}: Simple plot spacing bug: ylabel gets wrongfully removed from plot - `11190`{.interpreted-text role="ghissue"}: Images in the docs are too large. - `12271`{.interpreted-text role="ghissue"}: error with errorbar with datetime64 - `12405`{.interpreted-text role="ghissue"}: plt.stackplot() does not work with 3.0.0 - `12282`{.interpreted-text role="ghissue"}: `Axes.imshow` tooltip does not get updated when another call to `Axes.imshow` is made - `12420`{.interpreted-text role="ghissue"}: How to remove Rectangle Selector from figure? - `12391`{.interpreted-text role="ghissue"}: Constrained Layout tutorial needs some cleanup\.... - `12406`{.interpreted-text role="ghissue"}: Bug with font finding, and here is my fix as well. - `9051`{.interpreted-text role="ghissue"}: ParasiteAxes over plotting - `12325`{.interpreted-text role="ghissue"}: Annotation change from \"s\" to \"text\" in 3.0- documentation - `12397`{.interpreted-text role="ghissue"}: plt.show( ) not working (can\'t get figures to display in external window) when using jupyter QTconsole - `12396`{.interpreted-text role="ghissue"}: Defining arrowprops in draggable annotation disables the pick_event - `12389`{.interpreted-text role="ghissue"}: Setting row edge color of matplotlib table - `12376`{.interpreted-text role="ghissue"}: The output figure file is strange: there is a lot of blank area on the output figure. - `11641`{.interpreted-text role="ghissue"}: constrained_layout and colorbar for a subset of axes - `12373`{.interpreted-text role="ghissue"}: Unexpected outcome with matplotlib.pyplot.pcolor() - `12370`{.interpreted-text role="ghissue"}: ImageGrid bug when using inline backend - `12364`{.interpreted-text role="ghissue"}: pdf image generated by matplotlib with semi transparent lines missing in Word on Windows. - `12352`{.interpreted-text role="ghissue"}: TeX rendering broken on master with windows - `12354`{.interpreted-text role="ghissue"}: Too many levels of symbolic links - `12323`{.interpreted-text role="ghissue"}: indicate_inset_zoom sometimes draws incorrect connector lines - `12341`{.interpreted-text role="ghissue"}: Figures not rendering in docker - `12335`{.interpreted-text role="ghissue"}: Matplotlib plt.Rectangle Incoherent Results - `12265`{.interpreted-text role="ghissue"}: ParasiteAxesAuxTrans pcolor/pcolormesh and contour/contourf broken - `12337`{.interpreted-text role="ghissue"}: AttributeError: module \'matplotlib.pyplot\' has no attribute \'hold\' - `11673`{.interpreted-text role="ghissue"}: Inconsistent font settings when changing style context - `11693`{.interpreted-text role="ghissue"}: The rcParams setting for figure.figsize does not change when run from another notebook - `11725`{.interpreted-text role="ghissue"}: New mode between non-interactive and interactive? - `12134`{.interpreted-text role="ghissue"}: tight_layout flips images when making plots without displaying them - `12310`{.interpreted-text role="ghissue"}: plot fails with datetime64\[ns\] timezone aware objects (for example datetime64\[ns, UTC+00:00\] ) - `12191`{.interpreted-text role="ghissue"}: \"if 1:\" blocks in examples - `11288`{.interpreted-text role="ghissue"}: FR: Figure.subplots add optional SubplotSpec parameter - `12298`{.interpreted-text role="ghissue"}: c and cmap for plot - `12286`{.interpreted-text role="ghissue"}: Sample code given in Matplotlib\'s site does not work. - `11955`{.interpreted-text role="ghissue"}: UnicodeDecodeError on importing pyplot in python2 - `12208`{.interpreted-text role="ghissue"}: parasite axis2 demo now crashes with log x-axis - `8871`{.interpreted-text role="ghissue"}: Error when using quantities when plotting errorbars - `6658`{.interpreted-text role="ghissue"}: literature reference for \'viridis\' colormap - `6789`{.interpreted-text role="ghissue"}: Tutorial pyplot_scales.py crashes when used with plt.tight_layout() - `6922`{.interpreted-text role="ghissue"}: imshow does not immediately update shared axes - `11879`{.interpreted-text role="ghissue"}: Unable to change filename when saving from figure window - `12225`{.interpreted-text role="ghissue"}: In histogram, bars whose count is larger than 2\*\*31 sometimes become negative - `1461`{.interpreted-text role="ghissue"}: DOC: keyword arguments to plt.axes, plt.subpot, and fig.add_subplot - `12173`{.interpreted-text role="ghissue"}: Cannot import pyplot - `12217`{.interpreted-text role="ghissue"}: Python will suddenly not plot anymore - `12120`{.interpreted-text role="ghissue"}: Default legend behavior (loc=\'best\') very slow for large amounts of data. - `12176`{.interpreted-text role="ghissue"}: import pyplot on MacOS without font cache will search entire subtree of current dir - `12146`{.interpreted-text role="ghissue"}: fix pdf docs - `12160`{.interpreted-text role="ghissue"}: MacOS: Cannot import name \'format_exc\' - `12169`{.interpreted-text role="ghissue"}: Cannot install 3.0.0 \"python setup.py egg_info\" failed (freetype & png) - `12168`{.interpreted-text role="ghissue"}: pip install v3.0.0 \'failed with exit status 1181\' - `12107`{.interpreted-text role="ghissue"}: warnings re: deprecated pytest API with pytest 3.8 - `12162`{.interpreted-text role="ghissue"}: is outdated - `12010`{.interpreted-text role="ghissue"}: Popover over plot is very slow - `6739`{.interpreted-text role="ghissue"}: Make matplotlib fail more gracefully in headless environments - `3679`{.interpreted-text role="ghissue"}: Runtime detection for default backend - `11340`{.interpreted-text role="ghissue"}: matplotlib fails to install from source with intel compiler - `11838`{.interpreted-text role="ghissue"}: docs do not build on py3.7 due to small change in python handling of -m - `12115`{.interpreted-text role="ghissue"}: Plot in JS Animation has larger margin than \"normal\" PNG plot --- ::: redirect-from /users/prev_whats_new/github_stats_3.0.3 ::: # GitHub statistics for 3.0.3 (Feb 28, 2019) {#github-stats-3-0-3} GitHub statistics for 2018/11/10 (tag: v3.0.2) - 2019/02/28 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 14 issues and merged 92 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/40?closed=1) The following 19 authors contributed 157 commits. - Antony Lee - Christer Jensen - Christoph Gohlke - David Stansby - Elan Ernest - Elliott Sales de Andrade - ImportanceOfBeingErnest - James Adams - Jody Klymak - Johannes H. Jensen - Matthias Geier - MeeseeksMachine - Molly Rossow - Nelle Varoquaux - Paul Ivanov - Pierre Thibault - Thomas A Caswell - Tim Hoffmann - Tobia De Koninck GitHub issues and pull requests: Pull Requests (92): - `13493`{.interpreted-text role="ghpull"}: V3.0.3 prep - `13491`{.interpreted-text role="ghpull"}: V3.0.x pi - `13460`{.interpreted-text role="ghpull"}: Backport PR #13455 on branch v3.0.x (BLD: only try to get freetype src if src does not exist) - `13461`{.interpreted-text role="ghpull"}: Backport PR #13426 on branch v3.0.x (FIX: bbox_inches=\'tight\' with only non-finite bounding boxes) - `13426`{.interpreted-text role="ghpull"}: FIX: bbox_inches=\'tight\' with only non-finite bounding boxes - `13453`{.interpreted-text role="ghpull"}: Backport PR #13451 on branch v3.0.x (MNT: fix logic error where we never try the second freetype URL) - `13451`{.interpreted-text role="ghpull"}: MNT: fix logic error where we never try the second freetype URL - `13446`{.interpreted-text role="ghpull"}: Merge pull request #11246 from anntzer/download-jquery - `13437`{.interpreted-text role="ghpull"}: Backport PR #13436 on branch v3.0.x (Add get/set_in_layout to artist API docs.) - `13436`{.interpreted-text role="ghpull"}: Add get/set_in_layout to artist API docs. - `13432`{.interpreted-text role="ghpull"}: Really fix ArtistInspector.get_aliases - `13416`{.interpreted-text role="ghpull"}: Backport PR #13405 on branch v3.0.x (Fix imshow()ing PIL-opened images.) - `13418`{.interpreted-text role="ghpull"}: Backport PR #13412 and #13337 on branch v3.0.x - `13412`{.interpreted-text role="ghpull"}: CI: add additional qt5 deb package on travis - `13370`{.interpreted-text role="ghpull"}: Backport PR #13367 on branch v3.0.x (DOC: fix note of what version hold was deprecated in (2.0 not 2.1)) - `13366`{.interpreted-text role="ghpull"}: Backport PR #13365 on branch v3.0.x (Fix gcc warning) - `13365`{.interpreted-text role="ghpull"}: Fix gcc warning - `13347`{.interpreted-text role="ghpull"}: Backport PR #13289 on branch v3.0.x (Fix unhandled C++ exception) - `13349`{.interpreted-text role="ghpull"}: Backport PR #13234 on branch v3.0.x - `13281`{.interpreted-text role="ghpull"}: MAINT install of pinned vers for travis - `13289`{.interpreted-text role="ghpull"}: Fix unhandled C++ exception - `13345`{.interpreted-text role="ghpull"}: Backport PR #13333 on branch v3.0.x (Fix possible leak of return of PySequence_GetItem.) - `13333`{.interpreted-text role="ghpull"}: Fix possible leak of return of PySequence_GetItem. - `13337`{.interpreted-text role="ghpull"}: Bump to flake8 3.7. - `13340`{.interpreted-text role="ghpull"}: Backport PR #12398 on branch v3.0.x (CI: Don\'t run AppVeyor/Travis for doc backport branches.) - `13317`{.interpreted-text role="ghpull"}: Backport PR #13316 on branch v3.0.x (Put correct version in constrained layout tutorial) - `13308`{.interpreted-text role="ghpull"}: Backport PR #12678 on branch v3.0.x - `12678`{.interpreted-text role="ghpull"}: FIX: properly set tz for YearLocator - `13291`{.interpreted-text role="ghpull"}: Backport PR #13287 on branch v3.0.x (Fix unsafe use of NULL pointer) - `13290`{.interpreted-text role="ghpull"}: Backport PR #13288 on branch v3.0.x (Fix potential memory leak) - `13287`{.interpreted-text role="ghpull"}: Fix unsafe use of NULL pointer - `13288`{.interpreted-text role="ghpull"}: Fix potential memory leak - `13273`{.interpreted-text role="ghpull"}: Backport PR #13272 on branch v3.0.x (DOC Better description of inset locator and colorbar) - `12812`{.interpreted-text role="ghpull"}: Backport PR #12809 on branch v3.0.x (Fix TypeError when calculating tick_values) - `13245`{.interpreted-text role="ghpull"}: Backport PR #13244 on branch v3.0.x (Fix typo) - `13176`{.interpreted-text role="ghpull"}: Backport PR #13047 on branch v3.0.x (Improve docs on contourf extend) - `13215`{.interpreted-text role="ghpull"}: Backport PR #13212 on branch v3.0.x (Updated the docstring for pyplot.figure to list floats as the type for figsize argument) - `13158`{.interpreted-text role="ghpull"}: Backport PR #13150 on branch v3.0.x (Remove unused add_dicts from example.) - `13157`{.interpreted-text role="ghpull"}: Backport PR #13152 on branch v3.0.x (DOC: Add explanatory comment for colorbar with axes divider example) - `13221`{.interpreted-text role="ghpull"}: Backport PR #13194 on branch v3.0.x (TST: Fix incorrect call to pytest.raises.) - `13230`{.interpreted-text role="ghpull"}: Backport PR #13226 on branch v3.0.x (Avoid triggering warnings in mandelbrot example.) - `13216`{.interpreted-text role="ghpull"}: Backport #13205 on branch v3.0.x (Add xvfb service to travis) - `13194`{.interpreted-text role="ghpull"}: TST: Fix incorrect call to pytest.raises. - `13212`{.interpreted-text role="ghpull"}: Updated the docstring for pyplot.figure to list floats as the type for figsize argument - `13205`{.interpreted-text role="ghpull"}: Add xvfb service to travis - `13204`{.interpreted-text role="ghpull"}: Add xvfb service to travis - `13175`{.interpreted-text role="ghpull"}: Backport PR #13015 on branch v3.0.x (Enable local doc building without git installation) - `13047`{.interpreted-text role="ghpull"}: Improve docs on contourf extend - `13015`{.interpreted-text role="ghpull"}: Enable local doc building without git installation - `13159`{.interpreted-text role="ghpull"}: Revert \"Pin pytest to \<3.8 (for 3.0.x)\" - `13150`{.interpreted-text role="ghpull"}: Remove unused add_dicts from example. - `13152`{.interpreted-text role="ghpull"}: DOC: Add explanatory comment for colorbar with axes divider example - `13085`{.interpreted-text role="ghpull"}: Backport PR #13081 on branch v3.0.x (DOC: forbid a buggy version of pillow for building docs) - `13082`{.interpreted-text role="ghpull"}: Backport PR #13080 on branch v3.0.x (Pin pillow to \< 5.4 to fix doc build) - `13054`{.interpreted-text role="ghpull"}: Backport PR #13052 on branch v3.0.x (Small bug fix in image_slices_viewer) - `13052`{.interpreted-text role="ghpull"}: Small bug fix in image_slices_viewer - `13036`{.interpreted-text role="ghpull"}: Backport PR #12949 on branch v3.0.x (Update docstring of Axes3d.scatter) - `12949`{.interpreted-text role="ghpull"}: Update docstring of Axes3d.scatter - `13004`{.interpreted-text role="ghpull"}: Backport PR #13001: Update windows build instructions - `13011`{.interpreted-text role="ghpull"}: Backport PR #13006 on branch v3.0.x (Add category module to docs) - `13009`{.interpreted-text role="ghpull"}: Fix dependencies for travis build with python 3.5 - `13006`{.interpreted-text role="ghpull"}: Add category module to docs - `13001`{.interpreted-text role="ghpull"}: Update windows build instructions - `12996`{.interpreted-text role="ghpull"}: Fix return type in 3D scatter docs - `12972`{.interpreted-text role="ghpull"}: Backport PR #12929 on branch v3.0.x (FIX: skip gtk backend if gobject but not pygtk is installed) - `12596`{.interpreted-text role="ghpull"}: Use sudo:true for nightly builds. - `12929`{.interpreted-text role="ghpull"}: FIX: skip gtk backend if gobject but not pygtk is installed - `12965`{.interpreted-text role="ghpull"}: Backport PR #12960 on branch v3.0.x (Remove animated=True from animation docs) - `12964`{.interpreted-text role="ghpull"}: Backport PR #12938 on branch v3.0.x (Fix xtick.minor.visible only acting on the xaxis) - `12938`{.interpreted-text role="ghpull"}: Fix xtick.minor.visible only acting on the xaxis - `12937`{.interpreted-text role="ghpull"}: Backport PR #12914 on branch 3.0.x: Fix numpydoc formatting - `12914`{.interpreted-text role="ghpull"}: Fix numpydoc formatting - `12923`{.interpreted-text role="ghpull"}: Backport PR #12921 on branch v3.0.x (Fix documentation of vert parameter of Axes.bxp) - `12921`{.interpreted-text role="ghpull"}: Fix documentation of vert parameter of Axes.bxp - `12912`{.interpreted-text role="ghpull"}: Backport PR #12878 on branch v3.0.2-doc (Pin pytest to \<3.8 (for 3.0.x)) - `12906`{.interpreted-text role="ghpull"}: Backport PR #12774 on branch v3.0.x - `12774`{.interpreted-text role="ghpull"}: Cairo backend: Fix alpha render of collections - `12854`{.interpreted-text role="ghpull"}: Backport PR #12835 on branch v3.0.x (Don\'t fail tests if cairo dependency is not installed.) - `12896`{.interpreted-text role="ghpull"}: Backport PR #12848 on branch v3.0.x (Fix spelling of the name Randall Munroe) - `12894`{.interpreted-text role="ghpull"}: Backport PR #12890 on branch v3.0.x (Restrict postscript title to ascii.) - `12838`{.interpreted-text role="ghpull"}: Backport PR #12795 on branch v3.0.x (Fix Bezier degree elevation formula in backend_cairo.) - `12843`{.interpreted-text role="ghpull"}: Backport PR #12824 on branch v3.0.x - `12890`{.interpreted-text role="ghpull"}: Restrict postscript title to ascii. - `12878`{.interpreted-text role="ghpull"}: Pin pytest to \<3.8 (for 3.0.x) - `12870`{.interpreted-text role="ghpull"}: Backport PR #12869 on branch v3.0.x (Fix latin-1-ization of Title in eps.) - `12869`{.interpreted-text role="ghpull"}: Fix latin-1-ization of Title in eps. - `12835`{.interpreted-text role="ghpull"}: Don\'t fail tests if cairo dependency is not installed. - `12848`{.interpreted-text role="ghpull"}: Fix spelling of the name Randall Munroe - `12795`{.interpreted-text role="ghpull"}: Fix Bezier degree elevation formula in backend_cairo. - `12824`{.interpreted-text role="ghpull"}: Add missing datestr2num to docs - `12791`{.interpreted-text role="ghpull"}: Backport PR #12790 on branch v3.0.x (Remove ticks and titles from tight bbox tests.) - `12790`{.interpreted-text role="ghpull"}: Remove ticks and titles from tight bbox tests. Issues (14): - `10360`{.interpreted-text role="ghissue"}: creating PathCollection proxy artist with %matplotlib inline raises ValueError: cannot convert float NaN to integer - `13276`{.interpreted-text role="ghissue"}: calling annotate with nan values for the position still gives error after 3.0.2 - `13450`{.interpreted-text role="ghissue"}: Issues with jquery download caching - `13223`{.interpreted-text role="ghissue"}: label1On set to true when axis.tick_params(axis=\'both\', which=\'major\', length=5) - `13311`{.interpreted-text role="ghissue"}: docs unclear on status of constraint layout - `12675`{.interpreted-text role="ghissue"}: Off-by-one bug in annual axis labels when localized time crosses year boundary - `13208`{.interpreted-text role="ghissue"}: Wrong argument type for figsize in documentation for figure - `13201`{.interpreted-text role="ghissue"}: test_backend_qt tests failing - `13013`{.interpreted-text role="ghissue"}: v3.0.2 local html docs \"git describe\" error - `13051`{.interpreted-text role="ghissue"}: Missing self in image_slices_viewer - `12920`{.interpreted-text role="ghissue"}: Incorrect return type in mplot3d documentation - `12907`{.interpreted-text role="ghissue"}: Tiny typo in documentation of matplotlib.figure.Figure.colorbar - `12892`{.interpreted-text role="ghissue"}: GTK3Cairo Backend Legend TypeError - `12815`{.interpreted-text role="ghissue"}: DOC: matplotlib.dates datestr2num function documentation is missing --- ::: redirect-from /users/prev_whats_new/github_stats_3.1.0 ::: # GitHub statistics for 3.1.0 (May 18, 2019) {#github-stats-3-1-0} GitHub statistics for 2018/09/18 (tag: v3.0.0) - 2019/05/18 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 161 issues and merged 918 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/35?closed=1) The following 150 authors contributed 3426 commits. - Abhinuv Nitin Pitale - Adam J. Stewart - Alistair Muldal - Alon Hershenhorn - Andras Deak - Ankur Dedania - Antony Lee - Anubhav Shrimal - Ao Liu (frankliuao) - Ayappan P - azure-pipelines\[bot\] - Bas van Schaik - Ben Root - Benjamin Bengfort - Benjamin Congdon - Bharat123rox - Brigitta Sipocz - btang02 - Carsten - Carsten Schelp - Cho Yin Yong - Chris Zimmerman - Christer Jensen - Christoph Gohlke - Christoph Reiter - Christopher Bradshaw - Colin - Colin Carroll - dabana - Dana-Farber - Daniele Nicolodi - DanielMatu - David Haberthür - David Stansby - Dietmar Schwertberger - Dmitry Mottl - E. G. Patrick Bos - Elan Ernest - Elliott Sales de Andrade - Eric Firing - Eric Larson - Eric Wieser - esvhd - fredrik-1 - fuzzythecat - Galen Lynch - Gazing - gwin-zegal - hannah - Harshal Prakash Patankar - hershen - Ildar Akhmetgaleev - ImportanceOfBeingErnest - Isa Hassen - Jae-Joon Lee - James A. Bednar - James Adams - Jan S. (Milania1) - Jarrod Millman - Jessica B. Hamrick - Jody Klymak - Joel T. Frederico - Joel Wanner - Johannes H. Jensen - Joseph Albert - Joshua Klein - Jouni K. Seppänen - Jun Tan - Kai Muehlbauer - Katrin Leinweber - Kayla Ngan - Kevin Rose - Kjell Le - KonradAdamczyk - ksunden - Kyle Sunden - Leon Loopik - Levi Kilcher - LevN0 - luftek - Maik Riechert - Marcel Martin - Mark Harfouche - Marko Baštovanović - Matthias Bussonnier - Matthias Geier - Matti Picus - MeeseeksMachine - Michael Droettboom - Michael Jancsy - Mike Frysinger - Molly Rossow - MortenSHUTE - mromanie - nathan78906 - Nelle Varoquaux - Nick Papior - Nicolas Courtemanche - Nikita Kniazev - njwhite - Oliver Natt - Paul - Paul Hobson - Paul Ivanov - Paul J. Koprowski - pharshalp - Phil Elson - Pierre Thibault - QiCuiHub - Rasmus Diederichsen - Ratin_Kumar - Rob Harrigan - Roman Yurchak - Ryan May - Ryan Morshead - Saket Choudhary - saksmito - SBCV - Sebastian Bullinger - Sebastian Hegler - Seunghoon Park - simon-kraeusel - smheidrich - Stephane Raynaud - Stephen-Chilcote - sxntxn - Taehoon Lee - Takafumi Arakaki - Taras - Taras Kuzyo - teresy - Thein Oo - Thomas A Caswell - Thomas Hisch - Thomas Robitaille - thoo - Tim Hoffmann - Tobia De Koninck - Tobias Megies - Tyler Makaro - V. Armando Solé - Viraj Mohile - Will Handley - woclass - Yasaman-Mah - yeo - Yuxin Wu - Yuya - Zhili (Jerry) Pan - zhoubecky GitHub issues and pull requests: Pull Requests (918): - `14209`{.interpreted-text role="ghpull"}: Backport PR #14197 on branch v3.1.x (Minor cleanup of acorr/xcoor docs) - `14210`{.interpreted-text role="ghpull"}: Make intro tutorial less jargony. - `14197`{.interpreted-text role="ghpull"}: Minor cleanup of acorr/xcoor docs - `14203`{.interpreted-text role="ghpull"}: Backport PR #14202 on branch v3.1.x (Fix docstring of Line2D.set_data.) - `14202`{.interpreted-text role="ghpull"}: Fix docstring of Line2D.set_data. - `14196`{.interpreted-text role="ghpull"}: Backport PR #14188 on branch v3.1.x (Clarify scope of MouseEvent attributes) - `14188`{.interpreted-text role="ghpull"}: Clarify scope of MouseEvent attributes - `14194`{.interpreted-text role="ghpull"}: Backport PR #14167 on branch v3.1.x (Fix backend_pgf header.) - `14193`{.interpreted-text role="ghpull"}: Backport PR #14153 on branch v3.1.x (Update qt_compat.py test for already imported binding.) - `14167`{.interpreted-text role="ghpull"}: Fix backend_pgf header. - `14153`{.interpreted-text role="ghpull"}: Update qt_compat.py test for already imported binding. - `14190`{.interpreted-text role="ghpull"}: Backport PR #14176 on branch v3.1.x (Merge doc/api/api_overview and doc/api/index.) - `14192`{.interpreted-text role="ghpull"}: Unbreak testsuite for pytest 4.5. - `14189`{.interpreted-text role="ghpull"}: Backport PR #14186 on branch v3.1.x (Update FancyBboxPatch docs to numpydoc style) - `14176`{.interpreted-text role="ghpull"}: Merge doc/api/api_overview and doc/api/index. - `14186`{.interpreted-text role="ghpull"}: Update FancyBboxPatch docs to numpydoc style - `14187`{.interpreted-text role="ghpull"}: Backport PR #13169 on branch v3.1.x (Add example code for current logo) - `14165`{.interpreted-text role="ghpull"}: Backport PR #14156 on branch v3.1.x (Fix glyph loading in textpath.) - `14156`{.interpreted-text role="ghpull"}: Fix glyph loading in textpath. - `14162`{.interpreted-text role="ghpull"}: Backport PR #14150 on branch v3.1.x (Fix deprecation of withdash for figtext().) - `14150`{.interpreted-text role="ghpull"}: Fix deprecation of withdash for figtext(). - `14136`{.interpreted-text role="ghpull"}: Backport PR #14109 on branch v3.1.x - `14109`{.interpreted-text role="ghpull"}: Some simple pyplot doc improvements - `14129`{.interpreted-text role="ghpull"}: Backport PR #14117 on branch v3.1.x (Simplify ribbon_box example.) - `14128`{.interpreted-text role="ghpull"}: Backport PR #14057 on branch v3.1.x (Improve Gradient bar example) - `14127`{.interpreted-text role="ghpull"}: Backport PR #14125 on branch v3.1.x (Remove extra keyword from pytest.skip call.) - `14117`{.interpreted-text role="ghpull"}: Simplify ribbon_box example. - `14057`{.interpreted-text role="ghpull"}: Improve Gradient bar example - `14125`{.interpreted-text role="ghpull"}: Remove extra keyword from pytest.skip call. - `14123`{.interpreted-text role="ghpull"}: Backport PR #14119 on branch v3.1.x (Add ridge_map to third party packages documentation) - `14119`{.interpreted-text role="ghpull"}: Add ridge_map to third party packages documentation - `14103`{.interpreted-text role="ghpull"}: Backport PR #14088 on branch v3.1.x (Cleanup major_minor_demo.) - `14102`{.interpreted-text role="ghpull"}: Backport PR #14100 on branch v3.1.x (Improve docstring of axes_zoom_effect example.) - `14099`{.interpreted-text role="ghpull"}: Backport PR #14090 on branch v3.1.x (Pep8ify some variable names in examples.) - `14100`{.interpreted-text role="ghpull"}: Improve docstring of axes_zoom_effect example. - `14088`{.interpreted-text role="ghpull"}: Cleanup major_minor_demo. - `14090`{.interpreted-text role="ghpull"}: Pep8ify some variable names in examples. - `14097`{.interpreted-text role="ghpull"}: Backport PR #14079 on branch v3.1.x (Consistently use axs.flat instead of axs.flatten()) - `14095`{.interpreted-text role="ghpull"}: Backport PR #14087 on branch v3.1.x (Cleanup date example.) - `14094`{.interpreted-text role="ghpull"}: Backport PR #14029 on branch v3.1.x (Fix doc building with numpydoc 0.9) - `14093`{.interpreted-text role="ghpull"}: Backport PR #14052 on branch v3.1.x (Check axes identity in image.contains.) - `14092`{.interpreted-text role="ghpull"}: Backport PR #14056 on branch v3.1.x (FIX: do not try to manage the visibility of un-drawn ticks) - `14091`{.interpreted-text role="ghpull"}: Backport PR #14078 on branch v3.1.x (Minor fix in multiple subplots example) - `14079`{.interpreted-text role="ghpull"}: Consistently use axs.flat instead of axs.flatten() - `14087`{.interpreted-text role="ghpull"}: Cleanup date example. - `14029`{.interpreted-text role="ghpull"}: Fix doc building with numpydoc 0.9 - `14052`{.interpreted-text role="ghpull"}: Check axes identity in image.contains. - `14056`{.interpreted-text role="ghpull"}: FIX: do not try to manage the visibility of un-drawn ticks - `14078`{.interpreted-text role="ghpull"}: Minor fix in multiple subplots example - `14080`{.interpreted-text role="ghpull"}: Backport PR #14069 on branch v3.1.x (Don\'t try to use the colorbar formatter to format RGBA data.) - `14069`{.interpreted-text role="ghpull"}: Don\'t try to use the colorbar formatter to format RGBA data. - `14074`{.interpreted-text role="ghpull"}: Backport PR #14019 on branch v3.1.x (Update docstring of locator_params()) - `14019`{.interpreted-text role="ghpull"}: Update docstring of locator_params() - `14066`{.interpreted-text role="ghpull"}: Backport PR #14053 on branch v3.1.x (Improve fill() example) - `14065`{.interpreted-text role="ghpull"}: Backport PR #14059 on branch v3.1.x (Improve Scatter hist example) - `14067`{.interpreted-text role="ghpull"}: Backport PR #14062 on branch v3.1.x (Improve advanced quiver example) - `14062`{.interpreted-text role="ghpull"}: Improve advanced quiver example - `14053`{.interpreted-text role="ghpull"}: Improve fill() example - `14059`{.interpreted-text role="ghpull"}: Improve Scatter hist example - `14064`{.interpreted-text role="ghpull"}: Backport PR #14043 on branch v3.1.x (Ensure errorbars are always drawn on top of bars in ax.bar) - `14043`{.interpreted-text role="ghpull"}: Ensure errorbars are always drawn on top of bars in ax.bar - `14061`{.interpreted-text role="ghpull"}: Backport PR #14051 on branch v3.1.x (Add Yellowbrick to third party packages) - `14051`{.interpreted-text role="ghpull"}: Add Yellowbrick to third party packages - `14050`{.interpreted-text role="ghpull"}: Backport PR #14048 on branch v3.1.x (Fix Animation.save) - `14049`{.interpreted-text role="ghpull"}: Backport PR #14047 on branch v3.1.x (Remove references to \"Draws\" in matplotlib.patches) - `14048`{.interpreted-text role="ghpull"}: Fix Animation.save - `14047`{.interpreted-text role="ghpull"}: Remove references to \"Draws\" in matplotlib.patches - `14037`{.interpreted-text role="ghpull"}: Backport PR #14033 on branch v3.1.x (Reword add_subplot docstring.) - `14036`{.interpreted-text role="ghpull"}: Backport PR #14001 on branch v3.1.x (\[BUG\] DOC: Remove broken references to vischeck) - `14033`{.interpreted-text role="ghpull"}: Reword add_subplot docstring. - `14032`{.interpreted-text role="ghpull"}: Backport PR #14030 on branch v3.1.x (Update colorcet link) - `14030`{.interpreted-text role="ghpull"}: Update colorcet link - `14027`{.interpreted-text role="ghpull"}: Backport PR #14026 on branch v3.1.x (Fix bug in plot_directive that caused links to plots in different formats to be missing) - `14026`{.interpreted-text role="ghpull"}: Fix bug in plot_directive that caused links to plots in different formats to be missing - `14012`{.interpreted-text role="ghpull"}: Backport PR #14008 on branch v3.1.x (Don\'t install tests by default.) - `14017`{.interpreted-text role="ghpull"}: Backport PR #14015 on branch v3.1.x (Fix docstring of pyplot.clim()) - `14015`{.interpreted-text role="ghpull"}: Fix docstring of pyplot.clim() - `14008`{.interpreted-text role="ghpull"}: Don\'t install tests by default. - `14006`{.interpreted-text role="ghpull"}: Backport PR #13998 on branch v3.1.x (Fix patch contains logic for patches that don\'t have any codes) - `14005`{.interpreted-text role="ghpull"}: Backport PR #14004 on branch v3.1.x (DOC: pin numpydoc to less than 0.9) - `13998`{.interpreted-text role="ghpull"}: Fix patch contains logic for patches that don\'t have any codes - `13999`{.interpreted-text role="ghpull"}: Backport PR #13992 on branch v3.1.x (FIX: undeprecate MaxNLocator default_params) - `13997`{.interpreted-text role="ghpull"}: Backport PR #13995 on branch v3.1.x (DOC: explain zorder for gridlines in grid docstring) - `13992`{.interpreted-text role="ghpull"}: FIX: undeprecate MaxNLocator default_params - `13995`{.interpreted-text role="ghpull"}: DOC: explain zorder for gridlines in grid docstring - `13990`{.interpreted-text role="ghpull"}: Backport PR #13989 on branch v3.1.x (FIX: update not replace hist_kwargs when density is passed) - `13989`{.interpreted-text role="ghpull"}: FIX: update not replace hist_kwargs when density is passed - `13975`{.interpreted-text role="ghpull"}: Backport PR #13966 on branch v3.1.x (Fix colorbar setting without artist) - `13976`{.interpreted-text role="ghpull"}: Backport PR #13973 on branch v3.1.x (BUG: Ensure docstrings are not accessed with -OO) - `13856`{.interpreted-text role="ghpull"}: What\'s new page for 3.1 - `13966`{.interpreted-text role="ghpull"}: Fix colorbar setting without artist - `13973`{.interpreted-text role="ghpull"}: BUG: Ensure docstrings are not accessed with -OO - `13969`{.interpreted-text role="ghpull"}: Backport PR #13950 on branch v3.1.x (confidence_ellipse_markup) - `13950`{.interpreted-text role="ghpull"}: confidence_ellipse_markup - `13965`{.interpreted-text role="ghpull"}: Backport PR #13962 on branch v3.1.x (Fix typo in code example in docstring.) - `13964`{.interpreted-text role="ghpull"}: Backport PR #13870 on branch v3.1.x (3.1.0 API changes page) - `13962`{.interpreted-text role="ghpull"}: Fix typo in code example in docstring. - `13870`{.interpreted-text role="ghpull"}: 3.1.0 API changes page - `13961`{.interpreted-text role="ghpull"}: Backport PR #13914 on branch v3.1.x (Improve Rainbow text example) - `13960`{.interpreted-text role="ghpull"}: Backport PR #13958 on branch v3.1.x (Remove transparent fancy legend example) - `13914`{.interpreted-text role="ghpull"}: Improve Rainbow text example - `13958`{.interpreted-text role="ghpull"}: Remove transparent fancy legend example - `13956`{.interpreted-text role="ghpull"}: Backport PR #13908 on branch v3.1.x (Enh control tick deconflict2) - `13955`{.interpreted-text role="ghpull"}: Backport PR #13941 on branch v3.1.x (Add project_urls to setup) - `13908`{.interpreted-text role="ghpull"}: Enh control tick deconflict2 - `13954`{.interpreted-text role="ghpull"}: Backport PR #13949 on branch v3.1.x (DOC: Add documentation to Text.set_fontfamily) - `13941`{.interpreted-text role="ghpull"}: Add project_urls to setup - `13949`{.interpreted-text role="ghpull"}: DOC: Add documentation to Text.set_fontfamily - `13951`{.interpreted-text role="ghpull"}: Backport PR #13939 on branch v3.1.x (Bunch of docstring cleanups.) - `13939`{.interpreted-text role="ghpull"}: Bunch of docstring cleanups. - `13947`{.interpreted-text role="ghpull"}: Backport PR #13897 on branch v3.1.x (numpydocification.) - `13897`{.interpreted-text role="ghpull"}: numpydocification. - `13946`{.interpreted-text role="ghpull"}: Backport PR #13924 on branch v3.1.x (Followup to deprecation of usetex parameter in get_text_path.) - `13924`{.interpreted-text role="ghpull"}: Followup to deprecation of usetex parameter in get_text_path. - `13916`{.interpreted-text role="ghpull"}: Backport PR #13850 on branch v3.1.x (Cleanup STIX Font Demo) - `13915`{.interpreted-text role="ghpull"}: Backport PR #13835 on branch v3.1.x (Improve Conectionstyle Demo) - `13850`{.interpreted-text role="ghpull"}: Cleanup STIX Font Demo - `13835`{.interpreted-text role="ghpull"}: Improve Conectionstyle Demo - `13846`{.interpreted-text role="ghpull"}: Backport PR #13836 on branch v3.1.x (MNT: account for cpython deprecations) - `13898`{.interpreted-text role="ghpull"}: Backport PR #13896 on branch v3.1.x (Fix cbook.boxplot_stats docstring) - `13896`{.interpreted-text role="ghpull"}: Fix cbook.boxplot_stats docstring - `13893`{.interpreted-text role="ghpull"}: Backport PR #13890 on branch v3.1.x (rst seealso -\> numpydoc \"See Also\".) - `13890`{.interpreted-text role="ghpull"}: rst seealso -\> numpydoc \"See Also\". - `13888`{.interpreted-text role="ghpull"}: Backport PR #13862 on branch v3.1.x (Move 3.x API changes to prev_api_changes) - `13862`{.interpreted-text role="ghpull"}: Move 3.x API changes to prev_api_changes - `13882`{.interpreted-text role="ghpull"}: Backport PR #13867 on branch v3.1.x (Rename \"docs\" to \"contents\" in navigation bar) - `13867`{.interpreted-text role="ghpull"}: Rename \"docs\" to \"contents\" in navigation bar - `13881`{.interpreted-text role="ghpull"}: Backport PR #13874 on branch v3.1.x (Remove redundant call to Formatter.set_locs() before .format_ticks().) - `13874`{.interpreted-text role="ghpull"}: Remove redundant call to Formatter.set_locs() before .format_ticks(). - `13871`{.interpreted-text role="ghpull"}: Backport PR #13868 on branch v3.1.x (Correctly handle fallout of defining PY_SSIZE_T_CLEAN on Windows.) - `13869`{.interpreted-text role="ghpull"}: Backport PR #13861 on branch v3.1.x (Fix remaining links in docs) - `13868`{.interpreted-text role="ghpull"}: Correctly handle fallout of defining PY_SSIZE_T_CLEAN on Windows. - `13861`{.interpreted-text role="ghpull"}: Fix remaining links in docs - `13849`{.interpreted-text role="ghpull"}: Backport PR #13845 on branch v3.1.x (Fix some broken documentation links) - `13845`{.interpreted-text role="ghpull"}: Fix some broken documentation links - `13836`{.interpreted-text role="ghpull"}: MNT: account for cpython deprecations - `13841`{.interpreted-text role="ghpull"}: Backport PR #12928 on branch v3.1.x (textpath encoding) - `13842`{.interpreted-text role="ghpull"}: Backport PR #13827 on branch v3.1.x (Better MovieWriter init error message) - `13838`{.interpreted-text role="ghpull"}: Backport PR #13570 on branch v3.1.x (Add new example for plotting a confidence_ellipse) - `13827`{.interpreted-text role="ghpull"}: Better MovieWriter init error message - `13839`{.interpreted-text role="ghpull"}: Backport PR #13815 on branch v3.1.x (Numpydocify FontManager.findfont()) - `13837`{.interpreted-text role="ghpull"}: Backport PR #8638 on branch v3.1.x (FIX: if bins input to hist is str, treat like no bins) - `12928`{.interpreted-text role="ghpull"}: textpath encoding - `13815`{.interpreted-text role="ghpull"}: Numpydocify FontManager.findfont() - `13570`{.interpreted-text role="ghpull"}: Add new example for plotting a confidence_ellipse - `8638`{.interpreted-text role="ghpull"}: FIX: if bins input to hist is str, treat like no bins - `13831`{.interpreted-text role="ghpull"}: Backport PR #13780 on branch v3.1.x (numpydoc ListedColormap parameters) - `13780`{.interpreted-text role="ghpull"}: numpydoc ListedColormap parameters - `13830`{.interpreted-text role="ghpull"}: Backport PR #13829 on branch v3.1.x (numpydoc IndexFormatter) - `13829`{.interpreted-text role="ghpull"}: numpydoc IndexFormatter - `13828`{.interpreted-text role="ghpull"}: Backport PR #13821 on branch v3.1.x (Remove mathcircled from mathtext docs following its deprecation.) - `13821`{.interpreted-text role="ghpull"}: Remove mathcircled from mathtext docs following its deprecation. - `13822`{.interpreted-text role="ghpull"}: Backport PR #13817 on branch v3.1.x (Remove borders from barcode example) - `13820`{.interpreted-text role="ghpull"}: Backport PR #13816 on branch v3.1.x (Correct windows env variable format) - `13816`{.interpreted-text role="ghpull"}: Correct windows env variable format - `13817`{.interpreted-text role="ghpull"}: Remove borders from barcode example - `13814`{.interpreted-text role="ghpull"}: Merge pull request #13805 from timhoffm/pin-sphinx-1.x - `13813`{.interpreted-text role="ghpull"}: Backport PR #13764 on branch v3.1.x (Deprecate mathcircled.) - `13764`{.interpreted-text role="ghpull"}: Deprecate mathcircled. - `13805`{.interpreted-text role="ghpull"}: Pin Sphinx to 1.x - `13807`{.interpreted-text role="ghpull"}: Backport PR #13800 on branch v3.1.x (Doc typos.) - `13800`{.interpreted-text role="ghpull"}: Doc typos. - `13806`{.interpreted-text role="ghpull"}: Backport PR #13771 on branch v3.1.x (patches.Arc docstring update #13759) - `13804`{.interpreted-text role="ghpull"}: Backport PR #13766 on branch v3.1.x (Search for fonts in XDG directory as well.) - `13771`{.interpreted-text role="ghpull"}: patches.Arc docstring update #13759 - `13766`{.interpreted-text role="ghpull"}: Search for fonts in XDG directory as well. - `13794`{.interpreted-text role="ghpull"}: Backport PR #13695 on branch v3.1.x (numpydocify transform_angles.) - `13793`{.interpreted-text role="ghpull"}: Backport PR #13762 on branch v3.1.x (Cleanup marker_reference example.) - `13792`{.interpreted-text role="ghpull"}: Backport PR #13789 on branch v3.1.x (BUG: Fix function signature mismatch for set_clim) - `13791`{.interpreted-text role="ghpull"}: Backport PR #13787 on branch v3.1.x (Fix failure to import matplotlib.animation on Windows.) - `13695`{.interpreted-text role="ghpull"}: numpydocify transform_angles. - `13762`{.interpreted-text role="ghpull"}: Cleanup marker_reference example. - `13789`{.interpreted-text role="ghpull"}: BUG: Fix function signature mismatch for set_clim - `13787`{.interpreted-text role="ghpull"}: Fix failure to import matplotlib.animation on Windows. - `13781`{.interpreted-text role="ghpull"}: Backport PR #13777 on branch v3.1.x (Use class-based directive for mathmpl sphinxext.) - `13790`{.interpreted-text role="ghpull"}: Backport PR #13564 on branch v3.1.x (Add an option to log progress while saving animations) - `13564`{.interpreted-text role="ghpull"}: Add an option to log progress while saving animations - `13777`{.interpreted-text role="ghpull"}: Use class-based directive for mathmpl sphinxext. - `13765`{.interpreted-text role="ghpull"}: Backport PR #13761 on branch v3.1.x (Deprecate verbose-related rcParams.) - `13761`{.interpreted-text role="ghpull"}: Deprecate verbose-related rcParams. - `13760`{.interpreted-text role="ghpull"}: Backport PR #13719 on branch v3.1.x (Doc: Update timeline example) - `13704`{.interpreted-text role="ghpull"}: Backport PR #13021 on branch v3.1.x (Undesirable behaviour of MixedModeRenderer) - `13758`{.interpreted-text role="ghpull"}: Backport PR #13674 on branch v3.1.x (Preserve whitespace in svg output.) - `13719`{.interpreted-text role="ghpull"}: Doc: Update timeline example - `13674`{.interpreted-text role="ghpull"}: Preserve whitespace in svg output. - `13755`{.interpreted-text role="ghpull"}: Backport PR #13741 on branch v3.1.x (FIX: make title move above ticklabels) - `13754`{.interpreted-text role="ghpull"}: Backport PR #13712 on branch v3.1.x (Deprecate NavigationToolbar2QT.adj_window (unused and always None).) - `13741`{.interpreted-text role="ghpull"}: FIX: make title move above ticklabels - `13712`{.interpreted-text role="ghpull"}: Deprecate NavigationToolbar2QT.adj_window (unused and always None). - `13752`{.interpreted-text role="ghpull"}: Backport PR #13732 on branch v3.1.x (Fix doc markup.) - `13753`{.interpreted-text role="ghpull"}: Backport PR #13751 on branch v3.1.x (DOC/FIX: try merging comments) - `13751`{.interpreted-text role="ghpull"}: DOC/FIX: try merging comments - `13732`{.interpreted-text role="ghpull"}: Fix doc markup. - `13750`{.interpreted-text role="ghpull"}: Backport PR #13743 on branch v3.1.x (Fix doc warning) - `13743`{.interpreted-text role="ghpull"}: Fix doc warning - `13747`{.interpreted-text role="ghpull"}: Backport PR #13745 on branch v3.1.x (Fix stem(use_line_collection)) - `13748`{.interpreted-text role="ghpull"}: Backport PR #13716 on branch v3.1.x (Kill attributes that are never used/updated.) - `13716`{.interpreted-text role="ghpull"}: Kill attributes that are never used/updated. - `13745`{.interpreted-text role="ghpull"}: Fix stem(use_line_collection) - `13710`{.interpreted-text role="ghpull"}: TST: only test agg_filter extensions with baseline images - `13709`{.interpreted-text role="ghpull"}: Backport PR #8690 on branch v3.1.x - `13707`{.interpreted-text role="ghpull"}: Backport PR #12760 on branch v3.1.x (Deduplicate implementation of per-backend Tools.) - `13706`{.interpreted-text role="ghpull"}: Backport PR #13689 on branch v3.1.x (BUG: fix scaling of quiverkey when quiver scale_units=\'xy\') - `13705`{.interpreted-text role="ghpull"}: Backport PR #12419 on branch v3.1.x (Add DivergingNorm (again, again, again)) - `13703`{.interpreted-text role="ghpull"}: Backport PR #12170 on branch v3.1.x (Deprecate considering \*args, \*\*kwargs in Timer.remove_callback.) - `12760`{.interpreted-text role="ghpull"}: Deduplicate implementation of per-backend Tools. - `13689`{.interpreted-text role="ghpull"}: BUG: fix scaling of quiverkey when quiver scale_units=\'xy\' - `12419`{.interpreted-text role="ghpull"}: Add DivergingNorm (again, again, again) - `8690`{.interpreted-text role="ghpull"}: Adds support for rgba and rgb images to pcolorfast - `13021`{.interpreted-text role="ghpull"}: Undesirable behaviour of MixedModeRenderer - `12170`{.interpreted-text role="ghpull"}: Deprecate considering \*args, \*\*kwargs in Timer.remove_callback. - `13700`{.interpreted-text role="ghpull"}: Backport PR #13588 on branch v3.1.x (FIX: fallback to viewlims if no data) - `13694`{.interpreted-text role="ghpull"}: Backport PR #13677 on branch v3.1.x (Log all failures to extract font properties.) - `13588`{.interpreted-text role="ghpull"}: FIX: fallback to viewlims if no data - `13692`{.interpreted-text role="ghpull"}: Backport PR #13677 on branch v3.0.x (Log all failures to extract font properties.) - `13677`{.interpreted-text role="ghpull"}: Log all failures to extract font properties. - `13691`{.interpreted-text role="ghpull"}: Backport PR #13687 on branch v3.1.x (Update stem example) - `13687`{.interpreted-text role="ghpull"}: Update stem example - `13688`{.interpreted-text role="ghpull"}: Backport PR #13684 on branch v3.1.x (Use format_data_short to format image cursor data.) - `13684`{.interpreted-text role="ghpull"}: Use format_data_short to format image cursor data. - `13686`{.interpreted-text role="ghpull"}: Backport PR #13363 on branch v3.1.x (Inline iter_ticks into \_update_ticks, and use that in mplot3d.) - `13363`{.interpreted-text role="ghpull"}: Inline iter_ticks into \_update_ticks, and use that in mplot3d. - `13681`{.interpreted-text role="ghpull"}: Backport PR #13678 on branch v3.1.x (Fix font deduplication logic in createFontList.) - `13678`{.interpreted-text role="ghpull"}: Fix font deduplication logic in createFontList. - `13669`{.interpreted-text role="ghpull"}: Backport PR #13667 on branch v3.1.x (Fix incorrect signature in axis() doc.) - `13667`{.interpreted-text role="ghpull"}: Fix incorrect signature in axis() doc. - `13664`{.interpreted-text role="ghpull"}: Backport PR #12637 on branch v3.1.x (Tell IPython the correct GUI event loop to use for all backends.) - `13665`{.interpreted-text role="ghpull"}: Backport PR #13601 on branch v3.1.x (Add a make-parameter-keyword-only-with-deprecation decorator.) - `13601`{.interpreted-text role="ghpull"}: Add a make-parameter-keyword-only-with-deprecation decorator. - `12637`{.interpreted-text role="ghpull"}: Tell IPython the correct GUI event loop to use for all backends. - `13662`{.interpreted-text role="ghpull"}: Backport PR #13064 on branch v3.1.x (Don\'t explicitly add default include paths to Extensions) - `13064`{.interpreted-text role="ghpull"}: Don\'t explicitly add default include paths to Extensions - `13658`{.interpreted-text role="ghpull"}: Backport PR #13652 on branch v3.1.x (Fix empty FancyArrow crash) - `13652`{.interpreted-text role="ghpull"}: Fix empty FancyArrow crash - `13655`{.interpreted-text role="ghpull"}: Backport PR #11692 on branch v3.1.x (Deprecate frameon kwarg and rcParam to savefig.) - `13654`{.interpreted-text role="ghpull"}: Backport PR #13614 on branch v3.1.x (Fix polar get window extent) - `11692`{.interpreted-text role="ghpull"}: Deprecate frameon kwarg and rcParam to savefig. - `13614`{.interpreted-text role="ghpull"}: Fix polar get window extent - `13646`{.interpreted-text role="ghpull"}: Backport PR #13645 on branch v3.1.x (widgets.py fix examples connect -\> mpl_connect) - `13645`{.interpreted-text role="ghpull"}: widgets.py fix examples connect -\> mpl_connect - `13644`{.interpreted-text role="ghpull"}: Backport PR #13612 on branch v3.1.x (Improve Demo Text Rotation Mode) - `13612`{.interpreted-text role="ghpull"}: Improve Demo Text Rotation Mode - `13636`{.interpreted-text role="ghpull"}: Backport PR #13621 on branch v3.1.x (Remove `asfileobj=False` from a bunch of examples loading sample_data.) - `13635`{.interpreted-text role="ghpull"}: Backport PR #13632 on branch v3.1.x (Clarify tick collision API change doc.) - `13634`{.interpreted-text role="ghpull"}: Backport PR #13631 on branch v3.1.x (Switch deprecation of Tick.label to pending.) - `13621`{.interpreted-text role="ghpull"}: Remove `asfileobj=False` from a bunch of examples loading sample_data. - `13632`{.interpreted-text role="ghpull"}: Clarify tick collision API change doc. - `13631`{.interpreted-text role="ghpull"}: Switch deprecation of Tick.label to pending. - `13628`{.interpreted-text role="ghpull"}: Backport PR #13603 on branch v3.1.x - `13603`{.interpreted-text role="ghpull"}: FIX: continue to bail tight layout if rect supplied - `13627`{.interpreted-text role="ghpull"}: Backport PR #13622 on branch v3.1.x (Change title of named colors example) - `13626`{.interpreted-text role="ghpull"}: Backport PR #13549 on branch v3.1.x (Simplify some annotation() calls in examples.) - `13624`{.interpreted-text role="ghpull"}: Backport PR #13610 on branch v3.1.x (Update centered ticklabels example) - `13625`{.interpreted-text role="ghpull"}: Backport PR #13611 on branch v3.1.x (Fix text position in Fancytextbox demo) - `13622`{.interpreted-text role="ghpull"}: Change title of named colors example - `13610`{.interpreted-text role="ghpull"}: Update centered ticklabels example - `13611`{.interpreted-text role="ghpull"}: Fix text position in Fancytextbox demo - `13607`{.interpreted-text role="ghpull"}: Backport PR #13605 on branch v3.1.x (Warn on attempts at semi-transparent outputs in ps backend.) - `13608`{.interpreted-text role="ghpull"}: Backport PR #13602 on branch v3.1.x (Deprecate cbook.is_hashable.) - `13602`{.interpreted-text role="ghpull"}: Deprecate cbook.is_hashable. - `13605`{.interpreted-text role="ghpull"}: Warn on attempts at semi-transparent outputs in ps backend. - `13599`{.interpreted-text role="ghpull"}: Backport PR #13590 on branch v3.1.x (Doc event loop requirements for Figure.show) - `13590`{.interpreted-text role="ghpull"}: Doc event loop requirements for Figure.show - `13597`{.interpreted-text role="ghpull"}: Backport PR #12359 on branch v3.1.x (ENH: Add boolean support for axis()) - `13594`{.interpreted-text role="ghpull"}: Backport PR #13592 on branch v3.1.x (DOC: Make canonical URLs point to versioned path.) - `13592`{.interpreted-text role="ghpull"}: DOC: Make canonical URLs point to versioned path. - `12359`{.interpreted-text role="ghpull"}: ENH: Add boolean support for axis() - `13587`{.interpreted-text role="ghpull"}: Backport PR #13573 on branch v3.1.x (Fix mplot3d transparency) - `13573`{.interpreted-text role="ghpull"}: Fix mplot3d transparency - `13585`{.interpreted-text role="ghpull"}: Backport PR #13578 on branch v3.1.x (Revert invalid change in Centered Ticklabels example) - `13584`{.interpreted-text role="ghpull"}: Backport PR #13582 on branch v3.1.x (Cleanup two font-related examples.) - `13578`{.interpreted-text role="ghpull"}: Revert invalid change in Centered Ticklabels example - `13582`{.interpreted-text role="ghpull"}: Cleanup two font-related examples. - `13579`{.interpreted-text role="ghpull"}: Backport PR #13477 on branch v3.1.x (FIX: make EngFormatter respect axes.unicode_minus rcParam) - `13577`{.interpreted-text role="ghpull"}: Backport PR #12832 on branch v3.1.x (Deprecate redundant log-scale transform classes.) - `13477`{.interpreted-text role="ghpull"}: FIX: make EngFormatter respect axes.unicode_minus rcParam - `12832`{.interpreted-text role="ghpull"}: Deprecate redundant log-scale transform classes. - `13574`{.interpreted-text role="ghpull"}: Backport PR #12856 on branch v3.1.x (added property usemathtext to EngFormatter) - `12856`{.interpreted-text role="ghpull"}: added property usemathtext to EngFormatter - `13572`{.interpreted-text role="ghpull"}: Backport PR #12899 on branch v3.1.x (Small cleanups.) - `13571`{.interpreted-text role="ghpull"}: Backport PR #11553 on branch v3.1.x (Improved Code for Segments Intersect) - `12899`{.interpreted-text role="ghpull"}: Small cleanups. - `11553`{.interpreted-text role="ghpull"}: Improved Code for Segments Intersect - `13568`{.interpreted-text role="ghpull"}: Backport PR #13563 on branch v3.1.x (FIX: inverted colorbar ticks) - `13563`{.interpreted-text role="ghpull"}: FIX: inverted colorbar ticks - `13530`{.interpreted-text role="ghpull"}: BUG: keep the ticks when the colorbar axis is inverted - `13565`{.interpreted-text role="ghpull"}: Backport PR #13550 on branch v3.1.x (Strip out Py2-compat in setupext.) - `13550`{.interpreted-text role="ghpull"}: Strip out Py2-compat in setupext. - `13562`{.interpreted-text role="ghpull"}: Backport PR #13560 on branch v3.1.x (Improve GridSpec doc) - `13560`{.interpreted-text role="ghpull"}: Improve GridSpec doc - `13558`{.interpreted-text role="ghpull"}: Backport PR #13546 on branch v3.1.x ( Modified docstring of the set_ylabel and set_xlabel) - `13559`{.interpreted-text role="ghpull"}: Backport PR #12062 on branch v3.1.x (Separate alpha and rbg interpolation then recombine to fix issue11316) - `13557`{.interpreted-text role="ghpull"}: Backport PR #13548 on branch v3.1.x (Deprecate TextWithDash.) - `12062`{.interpreted-text role="ghpull"}: Separate alpha and rbg interpolation then recombine to fix issue11316 - `13546`{.interpreted-text role="ghpull"}: Modified docstring of the set_ylabel and set_xlabel - `13548`{.interpreted-text role="ghpull"}: Deprecate TextWithDash. - `13549`{.interpreted-text role="ghpull"}: Simplify some annotation() calls in examples. - `13552`{.interpreted-text role="ghpull"}: Backport PR #11241 on branch v3.1.x (Deprecate the MATPLOTLIBDATA environment variable.) - `11241`{.interpreted-text role="ghpull"}: Deprecate the MATPLOTLIBDATA environment variable. - `13547`{.interpreted-text role="ghpull"}: Backport PR #9314 on branch v3.1.x (Simplify units.Registry.get_converter.) - `13545`{.interpreted-text role="ghpull"}: Backport PR #13541 on branch v3.1.x (DOC: Remove mention of \'complex\' mode in specgram docstring) - `9314`{.interpreted-text role="ghpull"}: Simplify units.Registry.get_converter. - `13541`{.interpreted-text role="ghpull"}: DOC: Remove mention of \'complex\' mode in specgram docstring - `13539`{.interpreted-text role="ghpull"}: Backport PR #12950 on branch v3.1.x (Inline or simplify FooFormatter.pprint_val.) - `13538`{.interpreted-text role="ghpull"}: Backport PR #12748 on branch v3.1.x (Use the builtin GTK3 FileChooser rather than our custom subclass.) - `13537`{.interpreted-text role="ghpull"}: Backport PR #12781 on branch v3.1.x (Lazy import of private modules) - `12950`{.interpreted-text role="ghpull"}: Inline or simplify FooFormatter.pprint_val. - `12748`{.interpreted-text role="ghpull"}: Use the builtin GTK3 FileChooser rather than our custom subclass. - `12781`{.interpreted-text role="ghpull"}: Lazy import of private modules - `11218`{.interpreted-text role="ghpull"}: fix pkg-config handling to make cross-compiling work - `13531`{.interpreted-text role="ghpull"}: Backport PR #11964 on branch v3.1.x (Simplify extension setup.) - `11964`{.interpreted-text role="ghpull"}: Simplify extension setup. - `13529`{.interpreted-text role="ghpull"}: Backport PR #13525 on branch v3.1.x (Move some links in rst out of running text.) - `13528`{.interpreted-text role="ghpull"}: Backport PR #13526 on branch v3.1.x (DOC: fix Subplot calls) - `13525`{.interpreted-text role="ghpull"}: Move some links in rst out of running text. - `13526`{.interpreted-text role="ghpull"}: DOC: fix Subplot calls - `13523`{.interpreted-text role="ghpull"}: Backport PR #13521 on branch v3.1.x (Small cleanup to headings of 3d examples.) - `13521`{.interpreted-text role="ghpull"}: Small cleanup to headings of 3d examples. - `13519`{.interpreted-text role="ghpull"}: Backport PR #12716 on branch v3.1.x (FIX: return the actual ax.get_window_extent) - `13518`{.interpreted-text role="ghpull"}: Backport PR #12839 on branch v3.1.x (BUG: Prevent Tick params calls from overwriting visibility without being told to) - `12716`{.interpreted-text role="ghpull"}: FIX: return the actual ax.get_window_extent - `12839`{.interpreted-text role="ghpull"}: BUG: Prevent Tick params calls from overwriting visibility without being told to - `13517`{.interpreted-text role="ghpull"}: Fix heading hierarchy in annotation tutorial. - `13516`{.interpreted-text role="ghpull"}: Backport PR #13514 on branch v3.1.x (Add missing show() at end of example.) - `13514`{.interpreted-text role="ghpull"}: Add missing show() at end of example. - `13512`{.interpreted-text role="ghpull"}: Backport PR #13511 on branch v3.1.x (Add missing plt.show() at end of example.) - `13511`{.interpreted-text role="ghpull"}: Add missing plt.show() at end of example. - `13508`{.interpreted-text role="ghpull"}: Backport PR #13413 on branch v3.1.x (Simplify decade up- and down-rounding, and symmetrize expansion of degenerate log scales.) - `13509`{.interpreted-text role="ghpull"}: Backport PR #13492 on branch v3.1.x (Doc more release updates) - `13492`{.interpreted-text role="ghpull"}: Doc more release updates - `13413`{.interpreted-text role="ghpull"}: Simplify decade up- and down-rounding, and symmetrize expansion of degenerate log scales. - `13507`{.interpreted-text role="ghpull"}: Backport PR #13488 on branch v3.1.x (Animation: interactive zoom/pan with blitting does not work) - `13488`{.interpreted-text role="ghpull"}: Animation: interactive zoom/pan with blitting does not work - `13505`{.interpreted-text role="ghpull"}: Backport PR #13459 on branch v3.1.x (Document histogramming pre-binned data.) - `13503`{.interpreted-text role="ghpull"}: Backport PR #10776 on branch v3.1.x (fix FancyArrowPatch picker fails depending on arrowstyle) - `13504`{.interpreted-text role="ghpull"}: Backport PR #13123 on branch v3.1.x (Add shading to Axes3D.voxels, and enable it by default) - `13502`{.interpreted-text role="ghpull"}: Backport PR #13180 on branch v3.1.x (Various TextPath cleanups.) - `13459`{.interpreted-text role="ghpull"}: Document histogramming pre-binned data. - `13501`{.interpreted-text role="ghpull"}: Backport PR #13209 on branch v3.1.x (Deprecate support for (n, 1)-shaped error arrays in errorbar().) - `13500`{.interpreted-text role="ghpull"}: Backport PR #12763 on branch v3.1.x (Remove deprecated rcParams.) - `13123`{.interpreted-text role="ghpull"}: Add shading to Axes3D.voxels, and enable it by default - `13499`{.interpreted-text role="ghpull"}: Backport PR #13303 on branch v3.1.x (Unify checking of executable info.) - `10776`{.interpreted-text role="ghpull"}: fix FancyArrowPatch picker fails depending on arrowstyle - `13180`{.interpreted-text role="ghpull"}: Various TextPath cleanups. - `13498`{.interpreted-text role="ghpull"}: Backport PR #13314 on branch v3.1.x (Move major/minor tick overstrike logic to Axis.) - `13209`{.interpreted-text role="ghpull"}: Deprecate support for (n, 1)-shaped error arrays in errorbar(). - `12763`{.interpreted-text role="ghpull"}: Remove deprecated rcParams. - `13303`{.interpreted-text role="ghpull"}: Unify checking of executable info. - `13497`{.interpreted-text role="ghpull"}: Backport PR #13057 on branch v3.1.x (Simplify callable(self.\_contains) checks) - `13314`{.interpreted-text role="ghpull"}: Move major/minor tick overstrike logic to Axis. - `13057`{.interpreted-text role="ghpull"}: Simplify callable(self.\_contains) checks - `13496`{.interpreted-text role="ghpull"}: Backport PR #13465 on branch v3.1.x (FIX: polar set_rlim allow bottom-only call) - `13465`{.interpreted-text role="ghpull"}: FIX: polar set_rlim allow bottom-only call - `13495`{.interpreted-text role="ghpull"}: Backport PR #12232 on branch v3.1.x (Add helper function to check that an argument is in a list of strings.) - `12232`{.interpreted-text role="ghpull"}: Add helper function to check that an argument is in a list of strings. - `11708`{.interpreted-text role="ghpull"}: Revert \"Skip wx interactive tests on OSX.\" - `13062`{.interpreted-text role="ghpull"}: Update FAQ re: batch/webserver use. - `12904`{.interpreted-text role="ghpull"}: Support forward/backward mouse buttons - `12150`{.interpreted-text role="ghpull"}: Deprecate stackrel. - `13449`{.interpreted-text role="ghpull"}: Let boxplot() defer rcParams application to bxp() - `13425`{.interpreted-text role="ghpull"}: API: un-deprecate keyword only args to set_xlim, set_ylim - `13447`{.interpreted-text role="ghpull"}: Update axes_grid docs - `13473`{.interpreted-text role="ghpull"}: Deprecate backend_wx.IDLE_DELAY. - `13476`{.interpreted-text role="ghpull"}: Add font to pyplot.xkcd() - `13475`{.interpreted-text role="ghpull"}: Cleanup titles of embedding examples. - `13468`{.interpreted-text role="ghpull"}: Suppress chaining of cache lookup failure in color conversion. - `13467`{.interpreted-text role="ghpull"}: Add \"c\" shorthand for \"color\" for the Text class. - `13398`{.interpreted-text role="ghpull"}: FIX: let pandas IndexInt64 work for boxplot - `13375`{.interpreted-text role="ghpull"}: Improve Axes selection in Qt figure options. - `13421`{.interpreted-text role="ghpull"}: DOC: update release guide - `13275`{.interpreted-text role="ghpull"}: Simple logging interface. - `13427`{.interpreted-text role="ghpull"}: Simplify check for tight-bbox finiteness. - `13444`{.interpreted-text role="ghpull"}: Allow constructing boxplots over multiple calls. - `13385`{.interpreted-text role="ghpull"}: Remove/rework uses of np.where where possible. - `13441`{.interpreted-text role="ghpull"}: Make AFM parser both more compliant and less strict. - `13384`{.interpreted-text role="ghpull"}: Replace np.compress by boolean indexing. - `13422`{.interpreted-text role="ghpull"}: Clarify IndexError for out-of-bounds indexing of gridspec. - `13443`{.interpreted-text role="ghpull"}: Remove some outdated comments from rcsetup.py. - `13357`{.interpreted-text role="ghpull"}: Inherit some docstrings in backend code. - `12380`{.interpreted-text role="ghpull"}: Stem speedup2 - `13368`{.interpreted-text role="ghpull"}: FIX: Fix shape of hist output when input is multidimensional empty list - `5590`{.interpreted-text role="ghpull"}: \[mpl_toolkits\] Fix picking for things drawn on parasite axes - `13323`{.interpreted-text role="ghpull"}: Move the call to Formatter.set_locs into Formatter.format_ticks. - `13424`{.interpreted-text role="ghpull"}: Deprecate Quiver.color in favor of Quiver.get_facecolor(). - `13434`{.interpreted-text role="ghpull"}: More smoketesting of pcolorfast. - `13395`{.interpreted-text role="ghpull"}: Cleanup demo_curvelinear_grid. - `13411`{.interpreted-text role="ghpull"}: Deemphasize numeric locations for legend() in docs. - `13419`{.interpreted-text role="ghpull"}: FIX: secondary_axis resize - `13020`{.interpreted-text role="ghpull"}: Deprecate proj3d.mod. - `13030`{.interpreted-text role="ghpull"}: Deprecate internal functions exposed in the public API of mplot3d - `13408`{.interpreted-text role="ghpull"}: test_figure style fixes. - `11127`{.interpreted-text role="ghpull"}: Legend for Scatter - `11855`{.interpreted-text role="ghpull"}: Adding the possible to add full command line in animation - `13409`{.interpreted-text role="ghpull"}: Add nonsingular to the locator base class, and use it in [set]()\*lim too. - `11859`{.interpreted-text role="ghpull"}: ENH: add secondary x/y axis - `13235`{.interpreted-text role="ghpull"}: Vectorize mplot3d.art3d.zalpha. - `10411`{.interpreted-text role="ghpull"}: New \"accepts units\" decorator - `13403`{.interpreted-text role="ghpull"}: FIX: remove idle_event - `13069`{.interpreted-text role="ghpull"}: 5 minor divisions when major ticks are 2.5 units apart - `13402`{.interpreted-text role="ghpull"}: Fix empty reshape2d - `11683`{.interpreted-text role="ghpull"}: Reuse axes_grid1\'s AxisDict in axisartist, instead of duplicating it. - `12141`{.interpreted-text role="ghpull"}: Let digits toggle axes nav only if they correspond to an existing axes. - `9845`{.interpreted-text role="ghpull"}: Add inaxes method to FigureCanvas to check whether point is in an axes. - `13396`{.interpreted-text role="ghpull"}: mpl_toolkits style fixes. - `11497`{.interpreted-text role="ghpull"}: Make CI fail if interactive toolkits can\'t be tested - `11595`{.interpreted-text role="ghpull"}: test doc rendering - `13393`{.interpreted-text role="ghpull"}: Deprecate Spine.is_frame_like. - `13391`{.interpreted-text role="ghpull"}: Remove colour specification from some examples - `13386`{.interpreted-text role="ghpull"}: Replace use of np.\ by operators (\) silently doing nothing. - `13166`{.interpreted-text role="ghpull"}: Simplify Text.get_usetex. - `13188`{.interpreted-text role="ghpull"}: Remove an outdated doc point regarding backend selection. - `13107`{.interpreted-text role="ghpull"}: Cleanup BboxBase docstrings. - `13108`{.interpreted-text role="ghpull"}: Capitalize some docstrings. - `13115`{.interpreted-text role="ghpull"}: Check for sphinx_copybutton when building the docs - `13151`{.interpreted-text role="ghpull"}: Update RadioButtons docs numpydoc style - `13178`{.interpreted-text role="ghpull"}: Remove :func: markup from mlab docstrings. - `7461`{.interpreted-text role="ghpull"}: \[WIP\] add matrix checking function for quiver input - `13089`{.interpreted-text role="ghpull"}: Ensure that arguments to quiver() are not matrices. - `13179`{.interpreted-text role="ghpull"}: Avoid calling a deprecated API in axis_artist. - `13170`{.interpreted-text role="ghpull"}: Don\'t try to find TeX-only fonts when layouting TeX text. - `12957`{.interpreted-text role="ghpull"}: Search also for user fonts on Windows (#12954) - `12951`{.interpreted-text role="ghpull"}: Make Text.\_get_layout simpler to follow. - `11385`{.interpreted-text role="ghpull"}: Add a get_zaxis method for 3d axes. - `13172`{.interpreted-text role="ghpull"}: Hyperlink DOIs to preferred resolver - `13171`{.interpreted-text role="ghpull"}: Document how to make colorbars \"without\" a ScalarMappable. - `12903`{.interpreted-text role="ghpull"}: FIX: (broken)bar(h) math before units - `13167`{.interpreted-text role="ghpull"}: Typos on subplot comments and example - `13005`{.interpreted-text role="ghpull"}: Improve error messages for unit conversion - `13147`{.interpreted-text role="ghpull"}: Extend joinstyle example - `13165`{.interpreted-text role="ghpull"}: Change doc string for Axes.arrow() - `13155`{.interpreted-text role="ghpull"}: Let ffmpeg report errors. - `13149`{.interpreted-text role="ghpull"}: Update errorbar limits example - `13074`{.interpreted-text role="ghpull"}: Move \_windowing extension into \_tkagg. - `13146`{.interpreted-text role="ghpull"}: Remove an outdated comment in backend_wx. - `13126`{.interpreted-text role="ghpull"}: FIX: minor log ticks overwrite - `13148`{.interpreted-text role="ghpull"}: Update example Step Demo - `13138`{.interpreted-text role="ghpull"}: API: Use class-based directive in sphinxext - `11894`{.interpreted-text role="ghpull"}: add `cache_frame_data` kwarg into `FuncAnimation`. fixes #8528. - `13136`{.interpreted-text role="ghpull"}: Small cleanups. - `13140`{.interpreted-text role="ghpull"}: Remove an \"cannot show figure in agg\" warning in test suite. - `13134`{.interpreted-text role="ghpull"}: Simplify color conversion backcompat shim. - `13141`{.interpreted-text role="ghpull"}: Unpin pytest (pytest-cov\'s latest release is compatible with it). - `13133`{.interpreted-text role="ghpull"}: Simplify the polys3d example. - `12158`{.interpreted-text role="ghpull"}: MNT: simplify valid tick logic - `9867`{.interpreted-text role="ghpull"}: Factor out common code between pdf and ps backends. - `10111`{.interpreted-text role="ghpull"}: Add set_data_3d and get_data_3d to Line3d - `12245`{.interpreted-text role="ghpull"}: Remove (some) features deprecated in mpl2.2 - `13119`{.interpreted-text role="ghpull"}: Deprecate TextToPath.glyph_to_path. - `13122`{.interpreted-text role="ghpull"}: Pin pytest\<4.1 to unbreak CI tests - `13100`{.interpreted-text role="ghpull"}: Restore the font cache on Travis. - `12792`{.interpreted-text role="ghpull"}: BUG: Ensure that distinct polygon collections are shaded identically - `13070`{.interpreted-text role="ghpull"}: cairo backend: default to pycairo - `13114`{.interpreted-text role="ghpull"}: BUG: calculate colorbar boundaries correctly from values - `13111`{.interpreted-text role="ghpull"}: Delete an unused private method. - `10841`{.interpreted-text role="ghpull"}: ENH: new date formatter - `13093`{.interpreted-text role="ghpull"}: Remove unused fontconfig conf file. - `13063`{.interpreted-text role="ghpull"}: Use default colour cycle in more examples - `13103`{.interpreted-text role="ghpull"}: Remove tight_bbox_test example. - `13097`{.interpreted-text role="ghpull"}: Replace 1-tuples by scalars where possible. - `13027`{.interpreted-text role="ghpull"}: Qt5 reset signals after non-interactive plotting - `9787`{.interpreted-text role="ghpull"}: Support (first font of) TTC files. - `11780`{.interpreted-text role="ghpull"}: ENH: Allow arbitrary coordinates for ConnectionPatch - `12943`{.interpreted-text role="ghpull"}: Update the font_table example. - `13091`{.interpreted-text role="ghpull"}: Improve MouseEvent str(). - `13095`{.interpreted-text role="ghpull"}: Remove a duplicate attribute setting. - `13090`{.interpreted-text role="ghpull"}: Cleanup unused non-public imports. - `13060`{.interpreted-text role="ghpull"}: Move doc-requirements from root folder - `13078`{.interpreted-text role="ghpull"}: Convert streamplot to numpydoc - `13088`{.interpreted-text role="ghpull"}: Don\'t use deprecated np.random.random_integers. - `13073`{.interpreted-text role="ghpull"}: Drop pytest version check in setupext.py. - `12933`{.interpreted-text role="ghpull"}: Deprecate backend_pgf.LatexManagerFactory. - `12969`{.interpreted-text role="ghpull"}: Clarify the implementation of \_process_plot_var_args. - `12472`{.interpreted-text role="ghpull"}: Make FontManager.defaultFont a property, to avoid hardcoding the prefix. - `11806`{.interpreted-text role="ghpull"}: Allow to not draw the labels on pie chart - `11983`{.interpreted-text role="ghpull"}: Simplify version checks for freetype and libpng. - `13050`{.interpreted-text role="ghpull"}: FIX: always eraseRect in Qt widget - `13065`{.interpreted-text role="ghpull"}: FIX: print out the correct ip address when starting webagg - `13061`{.interpreted-text role="ghpull"}: Make examples that load msft.csv robust against locale changes. - `13042`{.interpreted-text role="ghpull"}: cairo: remove the append_path() fast path - `13058`{.interpreted-text role="ghpull"}: pathlibify/cleanup triage_tests.py. - `12995`{.interpreted-text role="ghpull"}: Don\'t split creation of deprecation message and choice of warning class. - `12998`{.interpreted-text role="ghpull"}: Init MaxNLocator params only once - `11691`{.interpreted-text role="ghpull"}: Make Figure.frameon a thin wrapper for the patch visibility. - `11735`{.interpreted-text role="ghpull"}: Change {FigureCanvasAgg,RendererAgg}.buffer_rgba to return a memoryview. - `12831`{.interpreted-text role="ghpull"}: Reuse scale from sharing axis when calling cla(). - `12962`{.interpreted-text role="ghpull"}: Deprecate setting the same property under two different aliases. - `12973`{.interpreted-text role="ghpull"}: Fix item check for pandas Series - `13049`{.interpreted-text role="ghpull"}: Add boxplot.flierprops.markeredgewidth rcParam - `13048`{.interpreted-text role="ghpull"}: Fix section names for numpydoc - `10928`{.interpreted-text role="ghpull"}: Simplify (quite a bit\...) \_preprocess_data - `13039`{.interpreted-text role="ghpull"}: Speed up Path.iter_segments() - `12992`{.interpreted-text role="ghpull"}: Adding rcParams\['scatter.edgecolors'\] defaulting to 'face' - `13014`{.interpreted-text role="ghpull"}: Drop pgi support for the GTK3 backend - `12215`{.interpreted-text role="ghpull"}: Cleanup initialization in text() - `13029`{.interpreted-text role="ghpull"}: Fix vertical alignment of text - `12968`{.interpreted-text role="ghpull"}: Simpler and stricter process_plot_format. - `12989`{.interpreted-text role="ghpull"}: Avoid spamming tests with warnings re: deprecation of pprint_val. - `13032`{.interpreted-text role="ghpull"}: fix typo in docstring in `axis_artist.py` - `13025`{.interpreted-text role="ghpull"}: MNT: add one more alias for tacaswell to mailmap - `13010`{.interpreted-text role="ghpull"}: Fix a format error in documenting_mpl.rst - `12997`{.interpreted-text role="ghpull"}: Add sphinx-copybutton to docs - `12422`{.interpreted-text role="ghpull"}: Scatter color: moving #10809 forward - `12999`{.interpreted-text role="ghpull"}: Format MaxNLocator with numpydoc - `12991`{.interpreted-text role="ghpull"}: Canonicalize weights extracted for AFM fonts. - `12955`{.interpreted-text role="ghpull"}: Cleanup cursor_demo. - `12984`{.interpreted-text role="ghpull"}: Cleanup GTK examples. - `12986`{.interpreted-text role="ghpull"}: Minor cleanup to double_pendulum example. - `12959`{.interpreted-text role="ghpull"}: Update the documentation of Cursor - `12945`{.interpreted-text role="ghpull"}: Correctly get weight & style hints from certain newer Microsoft fonts - `12976`{.interpreted-text role="ghpull"}: ENH: replace deprecated numpy header - `12975`{.interpreted-text role="ghpull"}: Fail-fast when trying to run tests with too-old pytest. - `12970`{.interpreted-text role="ghpull"}: Minor simplifications. - `12974`{.interpreted-text role="ghpull"}: Remove some checks for Py\<3.6 in the test suite. - `12779`{.interpreted-text role="ghpull"}: Include scatter plots in Qt figure options editor. - `12459`{.interpreted-text role="ghpull"}: Improve formatting of imshow() cursor data when a colorbar exists. - `12927`{.interpreted-text role="ghpull"}: MAINT: Correctly handle empty lists in zip unpacking in mplot3d.art3d - `12919`{.interpreted-text role="ghpull"}: Suppress deprecation warning when testing drawstyle conflict - `12956`{.interpreted-text role="ghpull"}: Misc. cleanups. - `12924`{.interpreted-text role="ghpull"}: Deprecate public use of Formatter.pprint_val. - `12947`{.interpreted-text role="ghpull"}: Support \~ as nonbreaking space in mathtext. - `12944`{.interpreted-text role="ghpull"}: Fix the title of testing_api - `12136`{.interpreted-text role="ghpull"}: MAINT: Unify calculation of normal vectors from polygons - `12880`{.interpreted-text role="ghpull"}: More table documentation - `12940`{.interpreted-text role="ghpull"}: Avoid pyplot in showcase examples. - `12935`{.interpreted-text role="ghpull"}: os.PathLike exists on all supported Pythons now. - `12936`{.interpreted-text role="ghpull"}: Minor updates following bump to Py3.6+. - `12932`{.interpreted-text role="ghpull"}: Simplify argument checking in Table.\_\_getitem\_\_. - `12930`{.interpreted-text role="ghpull"}: Shorten an argument check. - `12538`{.interpreted-text role="ghpull"}: MNT: drop 3.5 testing for 3.1 branch - `12868`{.interpreted-text role="ghpull"}: Simplify use of Path.\_fast_from_codes_and_verts. - `12300`{.interpreted-text role="ghpull"}: API: Polar: allow flipped y/rlims\.... - `12861`{.interpreted-text role="ghpull"}: Don\'t use deprecated wx.NewId(). - `12908`{.interpreted-text role="ghpull"}: Allow all valid hist.bins strings to be set in the rcparams - `12902`{.interpreted-text role="ghpull"}: Kill dead code in textpath. - `12885`{.interpreted-text role="ghpull"}: Improve margins in formlayout - `12877`{.interpreted-text role="ghpull"}: fooImage -\> foo_image in testing/compare.py - `12845`{.interpreted-text role="ghpull"}: Deprecate silent dropping of unknown arguments to TextPath(). - `12852`{.interpreted-text role="ghpull"}: Cleanup collections docs. - `12888`{.interpreted-text role="ghpull"}: Properly enable forward/backward buttons on GTK3 - `12865`{.interpreted-text role="ghpull"}: Avoid 1-tick or 0-tick log-scaled axis. - `12844`{.interpreted-text role="ghpull"}: Remove unused, private \_process_text_args. - `12881`{.interpreted-text role="ghpull"}: Fix string comparison - `12863`{.interpreted-text role="ghpull"}: FIX: translate timedeltas in \_to_ordinalf - `12640`{.interpreted-text role="ghpull"}: Introduce MouseButton enum for MouseEvent. - `12897`{.interpreted-text role="ghpull"}: Reword a bit the contour docs. - `12898`{.interpreted-text role="ghpull"}: Validate rcParams\[\"image.origin\"\]. - `12882`{.interpreted-text role="ghpull"}: Write error messages to logger instead of stderr - `12889`{.interpreted-text role="ghpull"}: Deprecate public access to the vendored formlayout module. - `12891`{.interpreted-text role="ghpull"}: Add Azure Pipelines build badge - `12883`{.interpreted-text role="ghpull"}: MAINT Use list comprehension - `12886`{.interpreted-text role="ghpull"}: Properly enable forward/backward buttons on Qt - `12858`{.interpreted-text role="ghpull"}: Bump oldest supported numpy to 1.11. - `12876`{.interpreted-text role="ghpull"}: Fix a typo - `12739`{.interpreted-text role="ghpull"}: make Axes.\_parse_scatter_color_args static - `12846`{.interpreted-text role="ghpull"}: Deprecate Path.has_nonfinite. - `12829`{.interpreted-text role="ghpull"}: Remove unused variables - `12872`{.interpreted-text role="ghpull"}: Inline references to RendererPS in backend_ps. - `12800`{.interpreted-text role="ghpull"}: documenting dtype of hist counts - `12842`{.interpreted-text role="ghpull"}: Fix message in nbagg connection_info() - `12855`{.interpreted-text role="ghpull"}: Cleanup axes/\_base.py. - `12826`{.interpreted-text role="ghpull"}: Minor code cleanup - `12866`{.interpreted-text role="ghpull"}: Simplify stride calculations in loglocator. - `12867`{.interpreted-text role="ghpull"}: Drop compat code for outdated MSVC. - `12218`{.interpreted-text role="ghpull"}: Improve table docs - `12847`{.interpreted-text role="ghpull"}: correctly format ticklabels when EngFormatter is used with usetex = True - `12851`{.interpreted-text role="ghpull"}: Keep Collections and Patches property aliases in sync. - `12849`{.interpreted-text role="ghpull"}: Update docstrings in path.py, and small cleanups. - `12805`{.interpreted-text role="ghpull"}: Don\'t insert spurious newlines by joining tex.preamble. - `12827`{.interpreted-text role="ghpull"}: Remove unused imports - `12560`{.interpreted-text role="ghpull"}: Add matplotlib.testing to the documentation - `12821`{.interpreted-text role="ghpull"}: MNT: remove debug from update_title_pos - `12764`{.interpreted-text role="ghpull"}: Cleanup Renderer/GraphicsContext docs. - `12759`{.interpreted-text role="ghpull"}: Warn on FreeType missing glyphs. - `12799`{.interpreted-text role="ghpull"}: Reword some colorbar docs. - `12633`{.interpreted-text role="ghpull"}: Added support for MacOSX backend for PyPy - `12798`{.interpreted-text role="ghpull"}: Replace assignments to array.shape by calls to reshape(). - `11851`{.interpreted-text role="ghpull"}: Simpler check for whether a Framework Python build is being used. - `12259`{.interpreted-text role="ghpull"}: BUG: Fix face orientations of bar3d - `12565`{.interpreted-text role="ghpull"}: Make FontManager.score_weight less lenient. - `12674`{.interpreted-text role="ghpull"}: Allow \"real\" LaTeX code for pgf.preamble in matplotlibrc - `12770`{.interpreted-text role="ghpull"}: Simplify implementation of FontProperties.copy(). - `12753`{.interpreted-text role="ghpull"}: MNT: remove \_hold shims to support basemap + cartopy - `12450`{.interpreted-text role="ghpull"}: Attach a FigureCanvasBase by default to Figures. - `12643`{.interpreted-text role="ghpull"}: Allow unit input to FancyArrowPatch - `12767`{.interpreted-text role="ghpull"}: Make colorbars constructible with dataless ScalarMappables. - `12526`{.interpreted-text role="ghpull"}: Rename jquery files - `12552`{.interpreted-text role="ghpull"}: Update docs for writing image comparison tests. - `12746`{.interpreted-text role="ghpull"}: Use skipif, not xfail, for uncomparable image formats. - `12747`{.interpreted-text role="ghpull"}: Prefer log.warning(\"%s\", \...) to log.warning(\"%s\" % \...). - `11753`{.interpreted-text role="ghpull"}: FIX: Apply aspect before drawing starts - `12749`{.interpreted-text role="ghpull"}: Move toolmanager warning from logging to warning. - `12598`{.interpreted-text role="ghpull"}: Support Cn colors with n\>=10. - `12727`{.interpreted-text role="ghpull"}: Reorder API docs: separate file per module - `12738`{.interpreted-text role="ghpull"}: Add unobtrusive deprecation note to the first line of the docstring - `11663`{.interpreted-text role="ghpull"}: Refactor color parsing of Axes.scatter - `12736`{.interpreted-text role="ghpull"}: Move deprecation note to end of docstring - `12704`{.interpreted-text role="ghpull"}: Rename tkinter import from Tk to tk. - `12715`{.interpreted-text role="ghpull"}: Cleanup dviread. - `12717`{.interpreted-text role="ghpull"}: Delete some `if __name__ == "__main__"` clauses. - `10575`{.interpreted-text role="ghpull"}: FIX patch.update_from to also copy \_original_edge/facecolor - `12537`{.interpreted-text role="ghpull"}: Improve error message on failing test_pyplot_up_to_date - `12721`{.interpreted-text role="ghpull"}: Make get_scale_docs() internal - `12706`{.interpreted-text role="ghpull"}: Extend sphinx Makefile to cleanup completely - `12481`{.interpreted-text role="ghpull"}: Warn if plot_surface Z values contain NaN - `12685`{.interpreted-text role="ghpull"}: Make ticks in demo_axes_rgb.py visible - `12523`{.interpreted-text role="ghpull"}: Run flake8 before pytest on travis - `12691`{.interpreted-text role="ghpull"}: DOC: Link to \"How to make a PR\" tutorials as badge and in contributing - `11974`{.interpreted-text role="ghpull"}: Make code match comment in sankey. - `12440`{.interpreted-text role="ghpull"}: Make arguments to \@deprecated/warn_deprecated keyword-only. - `12470`{.interpreted-text role="ghpull"}: Update AutoDateFormatter with locator - `12586`{.interpreted-text role="ghpull"}: Improve linestyles example - `12006`{.interpreted-text role="ghpull"}: Replace warnings.warn with cbook.\_warn_external or logging.warning - `12659`{.interpreted-text role="ghpull"}: Add note that developer discussions are private - `12543`{.interpreted-text role="ghpull"}: Make rcsetup.py flak8 compliant - `12642`{.interpreted-text role="ghpull"}: Don\'t silence TypeErrors in [fmt](){x,y}data. - `12442`{.interpreted-text role="ghpull"}: Deprecate passing drawstyle with linestyle as single string. - `12625`{.interpreted-text role="ghpull"}: Shorten some docstrings. - `12627`{.interpreted-text role="ghpull"}: Be a bit more stringent on invalid inputs. - `12629`{.interpreted-text role="ghpull"}: Fix issue with PyPy on macOS - `10933`{.interpreted-text role="ghpull"}: Remove \"experimental\" fontconfig font_manager backend. - `12600`{.interpreted-text role="ghpull"}: Minor style fixes. - `12570`{.interpreted-text role="ghpull"}: Fix mathtext tutorial for build with Sphinx 1.8. - `12487`{.interpreted-text role="ghpull"}: Update docs/tests for the deprecation of aname and label1On/label2On/etc. - `12521`{.interpreted-text role="ghpull"}: Improve docstring of draw_idle() - `12574`{.interpreted-text role="ghpull"}: Remove some unused imports - `12568`{.interpreted-text role="ghpull"}: Add note regarding builds of old Matplotlibs. - `12547`{.interpreted-text role="ghpull"}: Disable sticky edge accumulation if no autoscaling. - `12546`{.interpreted-text role="ghpull"}: Avoid quadratic behavior when accumulating stickies. - `11789`{.interpreted-text role="ghpull"}: endless looping GIFs with PillowWriter - `12525`{.interpreted-text role="ghpull"}: Fix some flake8 issues - `12516`{.interpreted-text role="ghpull"}: Don\'t handle impossible values for `align` in hist() - `12500`{.interpreted-text role="ghpull"}: Adjust the widths of the messages during the build. - `12492`{.interpreted-text role="ghpull"}: Simplify radar_chart example. - `11984`{.interpreted-text role="ghpull"}: Strip out pkg-config machinery for agg and libqhull. - `12463`{.interpreted-text role="ghpull"}: Document Artist.cursor_data() parameter - `12482`{.interpreted-text role="ghpull"}: Test slider orientation - `12317`{.interpreted-text role="ghpull"}: Always install mpl_toolkits. - `12246`{.interpreted-text role="ghpull"}: Be less tolerant of broken installs. - `12477`{.interpreted-text role="ghpull"}: Use N{MICRO SIGN} instead of N{GREEK SMALL LETTER MU} in EngFormatter. - `12483`{.interpreted-text role="ghpull"}: Kill FontManager.update_fonts. - `12474`{.interpreted-text role="ghpull"}: Throw ValueError when irregularly gridded data is passed to streamplot. - `12466`{.interpreted-text role="ghpull"}: np.fromstring -\> np.frombuffer. - `12369`{.interpreted-text role="ghpull"}: Improved exception handling on animation failure - `12460`{.interpreted-text role="ghpull"}: Deprecate RendererBase.strip_math. - `12453`{.interpreted-text role="ghpull"}: Rollback erroneous commit to whats_new.rst from #10746 - `12452`{.interpreted-text role="ghpull"}: Minor updates to the FAQ. - `10746`{.interpreted-text role="ghpull"}: Adjusted matplotlib.widgets.Slider to have optional vertical orientatation - `12441`{.interpreted-text role="ghpull"}: Get rid of a signed-compare warning. - `12430`{.interpreted-text role="ghpull"}: Deprecate Axes3D.plot_surface(shade=None) - `12435`{.interpreted-text role="ghpull"}: Fix numpydoc parameter formatting - `12434`{.interpreted-text role="ghpull"}: Clarify documentation for textprops keyword parameter of TextArea - `12427`{.interpreted-text role="ghpull"}: Document Artist.get_cursor_data - `10322`{.interpreted-text role="ghpull"}: Use np.hypot wherever possible. - `10809`{.interpreted-text role="ghpull"}: Fix for scatter not showing points with valid x/y but invalid color - `12423`{.interpreted-text role="ghpull"}: Minor simplifications to backend_svg. - `10356`{.interpreted-text role="ghpull"}: fix detecting which artist(s) the mouse is over - `10268`{.interpreted-text role="ghpull"}: Dvi caching - `10238`{.interpreted-text role="ghpull"}: Call kpsewhich with more arguments at one time - `10236`{.interpreted-text role="ghpull"}: Cache kpsewhich results persistently - `4675`{.interpreted-text role="ghpull"}: Deprecate color keyword argument in scatter - `5054`{.interpreted-text role="ghpull"}: Diverging norm - `12416`{.interpreted-text role="ghpull"}: Move font cache rebuild out of exception handler - `4762`{.interpreted-text role="ghpull"}: Traitlets - `5414`{.interpreted-text role="ghpull"}: WIP: New FreeType wrappers - `3875`{.interpreted-text role="ghpull"}: ENH: passing colors (and other optional keyword arguments) to violinplot() - `1959`{.interpreted-text role="ghpull"}: PS backend optionally jpeg-compresses the embedded images - `11891`{.interpreted-text role="ghpull"}: Group some print()s in backend_ps. - `12165`{.interpreted-text role="ghpull"}: Remove deprecated mlab code - `12387`{.interpreted-text role="ghpull"}: Update HTML animation as slider is dragged - `12333`{.interpreted-text role="ghpull"}: ENH: add colorbar method to axes - `10088`{.interpreted-text role="ghpull"}: Deprecate Tick.{gridOn,tick1On,label1On,\...} in favor of set_visible. - `12393`{.interpreted-text role="ghpull"}: Deprecate to-days converters in matplotlib dates - `11232`{.interpreted-text role="ghpull"}: FIX: fix figure.set_dpi when pixel ratio not 1 - `12247`{.interpreted-text role="ghpull"}: Machinery for deprecating properties. - `12371`{.interpreted-text role="ghpull"}: Move check for ImageMagick Windows path to bin_path(). - `12384`{.interpreted-text role="ghpull"}: Cleanup axislines style. - `9565`{.interpreted-text role="ghpull"}: Stem performance boost - `12368`{.interpreted-text role="ghpull"}: Don\'t use stdlib private API in animation.py. - `12351`{.interpreted-text role="ghpull"}: dviread: find_tex_file: Ensure the encoding on windows - `12372`{.interpreted-text role="ghpull"}: Remove two examples. - `12356`{.interpreted-text role="ghpull"}: Fix stripping of CRLF on Windows. - `12283`{.interpreted-text role="ghpull"}: FIX: errorbar xywhere should return ndarray - `12304`{.interpreted-text role="ghpull"}: TST: Merge Qt tests into one file. - `12340`{.interpreted-text role="ghpull"}: Catch test deprecation warnings for mlab.demean - `12296`{.interpreted-text role="ghpull"}: Make FooConverter inherit from ConversionInterface in examples - `12309`{.interpreted-text role="ghpull"}: Deduplicate implementations of FooNorm.autoscale{,\_None} - `7716`{.interpreted-text role="ghpull"}: \[NF\] Add \'truncate\' and \'join\' methods to colormaps. - `12314`{.interpreted-text role="ghpull"}: Deprecate `axis('normal')` in favor of `axis('auto')`. - `12307`{.interpreted-text role="ghpull"}: Clarify missing-property error message. - `12260`{.interpreted-text role="ghpull"}: Fix docs : change from issue #12191, remove \"if 1:\" blocks in examples - `12253`{.interpreted-text role="ghpull"}: Handle utf-8 output by kpathsea on Windows. - `12292`{.interpreted-text role="ghpull"}: TST: Modify the bar3d test to show three more angles - `12284`{.interpreted-text role="ghpull"}: Don\'t try to autoscale if no data present to autoscale to - `12255`{.interpreted-text role="ghpull"}: Deduplicate inherited docstrings. - `12222`{.interpreted-text role="ghpull"}: Remove extraneous if 1 statements in demo_axisline_style.py - `12137`{.interpreted-text role="ghpull"}: MAINT: Vectorize bar3d - `12219`{.interpreted-text role="ghpull"}: Merge OSXInstalledFonts into findSystemFonts. - `12229`{.interpreted-text role="ghpull"}: Less ACCEPTS, more numpydoc. - `11621`{.interpreted-text role="ghpull"}: TST: make E402 a universal flake8 ignore - `12231`{.interpreted-text role="ghpull"}: CI: Speed up Appveyor repository cloning - `11661`{.interpreted-text role="ghpull"}: Update blocking_input.py - `12199`{.interpreted-text role="ghpull"}: Allow disabling specific mouse actions in blocking_input - `12210`{.interpreted-text role="ghpull"}: Axes.tick_params() argument checking - `12211`{.interpreted-text role="ghpull"}: Fix typo - `12200`{.interpreted-text role="ghpull"}: Slightly clarify some invalid shape exceptions for image data. - `12151`{.interpreted-text role="ghpull"}: Don\'t pretend \@deprecated applies to classmethods. - `12190`{.interpreted-text role="ghpull"}: Remove some unused variables and imports - `12192`{.interpreted-text role="ghpull"}: Exclude examples from lgtm analysis - `12196`{.interpreted-text role="ghpull"}: Give Carreau the ability to mention the backport bot. - `12171`{.interpreted-text role="ghpull"}: Remove internal warning due to zsort deprecation - `12030`{.interpreted-text role="ghpull"}: Speed up canvas redraw for GTK3Agg backend. - `12156`{.interpreted-text role="ghpull"}: Cleanup the GridSpec demos. - `12144`{.interpreted-text role="ghpull"}: Add explicit getters and setters for Annotation.anncoords. - `12152`{.interpreted-text role="ghpull"}: Use \_warn_external for deprecations warnings. - `12147`{.interpreted-text role="ghpull"}: DOC: update the gh_stats code - `12139`{.interpreted-text role="ghpull"}: Unbreak build re: mplot3d style. - `11367`{.interpreted-text role="ghpull"}: Raise TypeError on unsupported kwargs of spy() - `9990`{.interpreted-text role="ghpull"}: Fix and document lightsource argument in mplot3d - `12124`{.interpreted-text role="ghpull"}: Correctly infer units from empty arrays - `11994`{.interpreted-text role="ghpull"}: Cleanup unused variables and imports - `12122`{.interpreted-text role="ghpull"}: MNT: re-add cbook import art3d - `12086`{.interpreted-text role="ghpull"}: FIX: make MaxNLocator only follow visible ticks for order of magnitude - `12032`{.interpreted-text role="ghpull"}: Remove unused imports - `12093`{.interpreted-text role="ghpull"}: Correct the removal of -Wstrict-prototypes from compiler flags. - `12069`{.interpreted-text role="ghpull"}: Style fixes for mplot3d. - `11997`{.interpreted-text role="ghpull"}: Cleanup some axes_grid1 examples - `12098`{.interpreted-text role="ghpull"}: Improve layout of HTML animation - `12094`{.interpreted-text role="ghpull"}: Fine-tune logging notes in contributing.rst. - `12079`{.interpreted-text role="ghpull"}: Clarifications to **im_show()** doc regarding *interpolation=\'none\'*. - `12068`{.interpreted-text role="ghpull"}: More style fixes. - `11499`{.interpreted-text role="ghpull"}: FIX: layout for mixed descent multiline text objects - `11921`{.interpreted-text role="ghpull"}: FIX: allow reshape 2-D to return a bare 1-d list - `12070`{.interpreted-text role="ghpull"}: Avoid some uses of np.isscalar. - `12067`{.interpreted-text role="ghpull"}: DOC: make Line2D docstring definition easier to find - `12054`{.interpreted-text role="ghpull"}: More style fixes. - `12066`{.interpreted-text role="ghpull"}: fix indentation in docstring interpolation for spy. - `11931`{.interpreted-text role="ghpull"}: Remove separate autosummary_inher template. - `12049`{.interpreted-text role="ghpull"}: Make Poly3DCollection.set_zsort less lenient. - `12050`{.interpreted-text role="ghpull"}: Various cleanups. - `12038`{.interpreted-text role="ghpull"}: Modernize ArtistInspector a bit\... - `12033`{.interpreted-text role="ghpull"}: DOC: formatting fixes to mplot3d - `12051`{.interpreted-text role="ghpull"}: Is bool - `12045`{.interpreted-text role="ghpull"}: Fix 999.9\... edge case in ticker.EngFormatter for negative numbers - `12044`{.interpreted-text role="ghpull"}: Update doc on the *progressive* and *optimize* keywords in savefig - `12061`{.interpreted-text role="ghpull"}: Small refactor/simplification. - `12060`{.interpreted-text role="ghpull"}: INSTALL.rst fixes - `12055`{.interpreted-text role="ghpull"}: Fix invalid escape in docstring. - `12026`{.interpreted-text role="ghpull"}: whitespace(-mostly) style cleanup. - `12043`{.interpreted-text role="ghpull"}: Deprecate get_py2exe_datafiles. - `12046`{.interpreted-text role="ghpull"}: Make HTMLWriter constructor a bit more strict. - `12034`{.interpreted-text role="ghpull"}: Doc markup fixes. - `11972`{.interpreted-text role="ghpull"}: FIX: close mem leak for repeated draw - `12024`{.interpreted-text role="ghpull"}: Fix typos - `11996`{.interpreted-text role="ghpull"}: Minor javascript cleanup - `11989`{.interpreted-text role="ghpull"}: Remove support for ghostscript 8.60. - `12004`{.interpreted-text role="ghpull"}: Update acorr and xcorr docs to match numpy docs - `11998`{.interpreted-text role="ghpull"}: No clf() needed after creating a figure - `12001`{.interpreted-text role="ghpull"}: Do not use an explicit figum in plt.figure(1, \...) in simple cases - `11999`{.interpreted-text role="ghpull"}: Do not use an explicit fignum plt.figure(1) in simple cases - `11995`{.interpreted-text role="ghpull"}: Don\'t use bare except statements - `11993`{.interpreted-text role="ghpull"}: DOC: fixed typos - `11992`{.interpreted-text role="ghpull"}: Use pytest.warns instead of home-baked warnings capture. - `11975`{.interpreted-text role="ghpull"}: Derive plt.figlegend.\_\_doc\_\_ from Figure.legend.\_\_doc\_\_. - `11980`{.interpreted-text role="ghpull"}: Remove \_\_version\_\_numpy\_\_; simplify dependencies check. - `11982`{.interpreted-text role="ghpull"}: Remove and old keyword documentation. - `11981`{.interpreted-text role="ghpull"}: Some extra typos - `11979`{.interpreted-text role="ghpull"}: Fix a couple of typos. - `11959`{.interpreted-text role="ghpull"}: cbook.iterable -\> np.iterable. - `11965`{.interpreted-text role="ghpull"}: Move the removal of the -Wstrict-prototypes flag to setup.py. - `11958`{.interpreted-text role="ghpull"}: Remove unused code - `11960`{.interpreted-text role="ghpull"}: Make jpl_units a bit less painful to read. - `11951`{.interpreted-text role="ghpull"}: Improve Artist docstrings - `11954`{.interpreted-text role="ghpull"}: No need to define \_log twice in matplotlib.dates. - `11948`{.interpreted-text role="ghpull"}: Minor fixes to docs and gitignore. - `11777`{.interpreted-text role="ghpull"}: Avoid incorrect warning in savefig - `11942`{.interpreted-text role="ghpull"}: Deprecate Artist.aname and Axes.aname - `11935`{.interpreted-text role="ghpull"}: Remove ginput demo example - `11939`{.interpreted-text role="ghpull"}: Improve alias signatures - `11940`{.interpreted-text role="ghpull"}: Do not use aliases of properties in internal code - `11941`{.interpreted-text role="ghpull"}: Fix test_large_subscript_title() - `11938`{.interpreted-text role="ghpull"}: More docstring cleanup of Line2D. - `11920`{.interpreted-text role="ghpull"}: Add LGTM.com code quality badge - `11922`{.interpreted-text role="ghpull"}: Improve docstrings of Line2D - `11924`{.interpreted-text role="ghpull"}: Minor formatting update on alias docstrings - `11926`{.interpreted-text role="ghpull"}: Minor fix to ginput_demo. - `11912`{.interpreted-text role="ghpull"}: BLD: update PR template for flake8 - `11909`{.interpreted-text role="ghpull"}: Simplify linestyle and fillstyle reference docs. - `11502`{.interpreted-text role="ghpull"}: FIX: move title(s) up if subscripts hang too low. - `11906`{.interpreted-text role="ghpull"}: fix format of bar_of_pie example - `11741`{.interpreted-text role="ghpull"}: Factor out common code between Patch.draw and FancyArrowPatch.draw. - `11784`{.interpreted-text role="ghpull"}: Argument checking for grid() - `11888`{.interpreted-text role="ghpull"}: Factor out a subprocess log-and-check helper. - `11740`{.interpreted-text role="ghpull"}: Deprecate support for 3rd-party backends without set_hatch_color. - `11884`{.interpreted-text role="ghpull"}: Deprecate the tk_window_focus function. - `11689`{.interpreted-text role="ghpull"}: Don\'t cache the renderer on the Axes instance. - `11698`{.interpreted-text role="ghpull"}: For property, use decorator or lambdas. - `11872`{.interpreted-text role="ghpull"}: Make all builtin cmaps picklable. - `11870`{.interpreted-text role="ghpull"}: More style fixes. - `11873`{.interpreted-text role="ghpull"}: Remove mention of deprecated/removed methods from mlab\'s docstring. - `11869`{.interpreted-text role="ghpull"}: Style fixes. - `11874`{.interpreted-text role="ghpull"}: Remove some remnants of Py2-handling in test_rcparams. - `11865`{.interpreted-text role="ghpull"}: example file for making a bar of pie chart - `11868`{.interpreted-text role="ghpull"}: mathtext.py style fixes. - `11854`{.interpreted-text role="ghpull"}: Accept anything that\'s not a directory for \$MATPLOTLIBRC. - `11589`{.interpreted-text role="ghpull"}: WIP ENH secondary axes: - `8449`{.interpreted-text role="ghpull"}: Including Additional Metadata using the SVG Backend - `11465`{.interpreted-text role="ghpull"}: ENH: optimize Collection non-affine transform to call transform once Issues (161): - `4001`{.interpreted-text role="ghissue"}: Qt5 Backend: dblclick is always False on \'mouse_release_event\' - `14152`{.interpreted-text role="ghissue"}: qt_compat.py performing wrong test for PyQt5 - `10875`{.interpreted-text role="ghissue"}: Annotation.contains and FancyArrow.contains return incorrect values - `458`{.interpreted-text role="ghissue"}: JPG quality keyword in savefig - `4354`{.interpreted-text role="ghissue"}: scatter not showing valid x/y points with invalid color - `14113`{.interpreted-text role="ghissue"}: scatter could not raise when colors are provided but position data are empty - `14003`{.interpreted-text role="ghissue"}: numpydoc 0.9 breaks doc build - `14054`{.interpreted-text role="ghissue"}: ticks sometimes disappear when zooming interactively - `10189`{.interpreted-text role="ghissue"}: The data decorator does not integrate well with numpydoc - `14034`{.interpreted-text role="ghissue"}: pyplot plot raises ValueError when plotting NaN against datetime dates - `14039`{.interpreted-text role="ghissue"}: bar plot yerr lines/caps should respect zorder - `14042`{.interpreted-text role="ghissue"}: dynamic_image.py + saving animation broken - `14013`{.interpreted-text role="ghissue"}: osx backend not usable with ipython/jupyter from conda? - `13993`{.interpreted-text role="ghissue"}: Tests files installed by default? - `13991`{.interpreted-text role="ghissue"}: MaxNLocator.default_params deprecation may break Cartopy - `5045`{.interpreted-text role="ghissue"}: Axes.grid() not honoring specified \"zorder\" kwarg - `4371`{.interpreted-text role="ghissue"}: LaTeX and PGF preambles do not allow commas - `13982`{.interpreted-text role="ghissue"}: hist() no longer respects range=\... when density=True - `13963`{.interpreted-text role="ghissue"}: Dataless colorbars break when updated - `10381`{.interpreted-text role="ghissue"}: Issue when setting scatter color in separate method call - `13618`{.interpreted-text role="ghissue"}: Minor ticklabels are missing at positions of major ticks. - `13880`{.interpreted-text role="ghissue"}: Adding documentation for Text.fontfamily default, set_fontfamily(None)? - `13865`{.interpreted-text role="ghissue"}: Appveyor broken - `8636`{.interpreted-text role="ghissue"}: plt.hist chooses improper range when using string-based bin options - `7300`{.interpreted-text role="ghissue"}: weird mathtext doc markup - `8862`{.interpreted-text role="ghissue"}: Replace mathcircled by textcircled - `13759`{.interpreted-text role="ghissue"}: DOC: matplotlib.patches.Arc - `13785`{.interpreted-text role="ghissue"}: Imshow gives values out of the extent - `13786`{.interpreted-text role="ghissue"}: Cannot import matplotlib.animation - `13561`{.interpreted-text role="ghissue"}: Progress of animation.save (for long animations) - `13735`{.interpreted-text role="ghissue"}: title doesn\'t move for ticklables\.... - `12175`{.interpreted-text role="ghissue"}: Example link near markevery in the \"What\'s new in 3.0\" page is malformed/broken - `13713`{.interpreted-text role="ghissue"}: Boxplot xlim not correctly calculated - `11070`{.interpreted-text role="ghissue"}: Add a \"density\" kwarg to hist2d - `11337`{.interpreted-text role="ghissue"}: Cannot plot fully masked array against datetimes - `10165`{.interpreted-text role="ghissue"}: Adapt stem plot - `10976`{.interpreted-text role="ghissue"}: ENH: secondary axis for a x or y scale. - `10763`{.interpreted-text role="ghissue"}: Cairo in 2.2.0 not working for new backends - `9737`{.interpreted-text role="ghissue"}: setupext should not explicitly add /usr/{,local/}include to the include path - `11217`{.interpreted-text role="ghissue"}: Crash on zero-length FancyArrow - `13623`{.interpreted-text role="ghissue"}: do not cause warning in seaborn - `13480`{.interpreted-text role="ghissue"}: Segfault on help(\'modules\') command when matplotlib is installed - `13604`{.interpreted-text role="ghissue"}: legend\'s framealpha kwarg does not apply when writing to an eps file - `12311`{.interpreted-text role="ghissue"}: \'off\' vs. False bug - `10237`{.interpreted-text role="ghissue"}: Setting an alpha value to a Poly3DCollection - `11781`{.interpreted-text role="ghissue"}: fill_between interpolation & nan issue - `1077`{.interpreted-text role="ghissue"}: 3d plots with aspect=\'equal\' - `11761`{.interpreted-text role="ghissue"}: Still naming inconsistency in API on axes limits - `11623`{.interpreted-text role="ghissue"}: Regression: \"TypeError: Period(\'2000-12-31\', \'D\') is not a string\" when a Series with date index was plotted - `12655`{.interpreted-text role="ghissue"}: auto-ticks do not handle values near bounds gracefully - `13487`{.interpreted-text role="ghissue"}: labelpad is not the spacing between the axis and the label - `13540`{.interpreted-text role="ghissue"}: Docs for matplotlib.pyplot.specgram() reference an unsupported mode setting - `8997`{.interpreted-text role="ghissue"}: Proposal: Grid arrangement by number of plots - `6928`{.interpreted-text role="ghissue"}: Cannot run `setup.py build` with numpy master - `12697`{.interpreted-text role="ghissue"}: Axes are drawn at wrong positions - `13478`{.interpreted-text role="ghissue"}: FuncAnimation: interactive zoom/pan with blitting does not work - `11575`{.interpreted-text role="ghissue"}: Setting axis ticks in log scale produces duplicate tick labels. - `13464`{.interpreted-text role="ghissue"}: set_rlim(bottom=\...) no longer works - `12628`{.interpreted-text role="ghissue"}: Write canonical example of how to use Matplotlib inside a webserver - `10022`{.interpreted-text role="ghissue"}: boxplot: positions used to take Int64Index - `11647`{.interpreted-text role="ghissue"}: Disable buttons in ginput - `12987`{.interpreted-text role="ghissue"}: issues parsing AFM fonts - `12667`{.interpreted-text role="ghissue"}: Colorbar ticks\.... - `13137`{.interpreted-text role="ghissue"}: Travis for Python 3.7 sometimes fails due to missing font - `7969`{.interpreted-text role="ghissue"}: Stem is slow and will crash if I try to close the window - `13002`{.interpreted-text role="ghissue"}: Hist color kwarg broken for multiple empty datasets - `5581`{.interpreted-text role="ghissue"}: \[mpl_toolkits\] Things drawn on parasite axes don\'t fire pick events - `13417`{.interpreted-text role="ghissue"}: Secondary axis doesn\'t resize properly - `8120`{.interpreted-text role="ghissue"}: Inconsistent inset_axes position between show(), savefig(format=\'png\') and savefig(format=\'pdf\') - `8947`{.interpreted-text role="ghissue"}: Different result, slower runtime of heatmap between 2.0.0 and 2.0.1 - `13264`{.interpreted-text role="ghissue"}: Use of logging in matplotlib - `11602`{.interpreted-text role="ghissue"}: animation error - `12925`{.interpreted-text role="ghissue"}: Python pandas datetime plot xticks in unexpected location - `11025`{.interpreted-text role="ghissue"}: AxesGrid ticks missing on x-axis - `10974`{.interpreted-text role="ghissue"}: Examples not shown in API docs for many methods. - `13392`{.interpreted-text role="ghissue"}: boxplot broken for empty inputs - `12345`{.interpreted-text role="ghissue"}: Need more tests for units and errorbar - `10361`{.interpreted-text role="ghissue"}: FigureCanvas.draw() with tight_layout () needs to be called twice with Matplotlib 2.1.0 - `11376`{.interpreted-text role="ghissue"}: Temporary styling ignores color cycle - `11546`{.interpreted-text role="ghissue"}: import time - `13286`{.interpreted-text role="ghissue"}: AttributeError: \'float\' object has no attribute \'deg2rad\' - `11508`{.interpreted-text role="ghissue"}: bi-directional perceptually flat colormaps in matplotlib? - `12918`{.interpreted-text role="ghissue"}: Mac shows an icon in the dock when using matplotlib.pyplot. - `13339`{.interpreted-text role="ghissue"}: Log Colorbar minorticks_off reverted if ticks set\... - `13228`{.interpreted-text role="ghissue"}: MPL 3 + Colorbar + PowerNorm bug - `13096`{.interpreted-text role="ghissue"}: Matplotlib.get_backend()/matplotlib.use() cause NSException with Anaconda - `7712`{.interpreted-text role="ghissue"}: Number of ticks for dates still gives overlapping labels - `9978`{.interpreted-text role="ghissue"}: General poor default formatting of datetimes on plot x-axis - `13253`{.interpreted-text role="ghissue"}: imsave outputs JPEG with wrong dimension - `11391`{.interpreted-text role="ghissue"}: Use data argument for scatter plotting timestamps from pandas - `13145`{.interpreted-text role="ghissue"}: widgets.RadioButtons: select by closest in position - `13267`{.interpreted-text role="ghissue"}: \"double-pendulum\" example\'s speed not correct / varying - `13257`{.interpreted-text role="ghissue"}: Allow turning off minorticks for Colorbar with LogNorm? - `13237`{.interpreted-text role="ghissue"}: Sankey basic gallery example is not rendered properly. - `12836`{.interpreted-text role="ghissue"}: matplotlib.rc_file resets to default template before updating rcparams - `13186`{.interpreted-text role="ghissue"}: ax.bar throws when x axis is pandas datetime - `5397`{.interpreted-text role="ghissue"}: Expose compression and filter PNG options through savefig - `13142`{.interpreted-text role="ghissue"}: Cannot plot bar graph with dates: \"TypeError: ufunc subtract cannot use operands with types dtype(\'\ bool to prevent deprecation warning) - `15168`{.interpreted-text role="ghpull"}: MNT: explicitly cast `np.bool_` -\> bool to prevent deprecation warning - `15183`{.interpreted-text role="ghpull"}: Backport PR #15181 on branch v3.1.x (FIX: proper call to zero_formats) - `15181`{.interpreted-text role="ghpull"}: FIX: proper call to zero_formats - `15172`{.interpreted-text role="ghpull"}: Backport PR #15166 on branch v3.1.x - `15166`{.interpreted-text role="ghpull"}: FIX: indexed pandas bar - `15153`{.interpreted-text role="ghpull"}: Backport PR #14456 on branch v3.1.x (PyQT5 Backend Partial Redraw Fix) - `14456`{.interpreted-text role="ghpull"}: PyQT5 Backend Partial Redraw Fix - `15140`{.interpreted-text role="ghpull"}: Fix ScalarFormatter formatting of masked values - `15135`{.interpreted-text role="ghpull"}: Backport PR #15132 on branch v3.1.x (Update documenting guide on rcParams) - `15128`{.interpreted-text role="ghpull"}: Backport PR #15115 on branch v3.1.x (Doc: highlight rcparams) - `15125`{.interpreted-text role="ghpull"}: Backport PR #15110 on branch v3.1.x (Add inheritance diagram to mpl.ticker docs) - `15116`{.interpreted-text role="ghpull"}: Backport PR #15114 on branch v3.1.x (DOC: update language around NF) - `15058`{.interpreted-text role="ghpull"}: Backport PR #15055 on branch v3.1.x (Remove mention of now-removed feature in docstring.) - `15055`{.interpreted-text role="ghpull"}: Remove mention of now-removed feature in docstring. - `15047`{.interpreted-text role="ghpull"}: Backport PR #14919 on branch v3.1.x (FIX constrained_layout w/ hidden axes) - `14919`{.interpreted-text role="ghpull"}: FIX constrained_layout w/ hidden axes - `15022`{.interpreted-text role="ghpull"}: Backport PR #15020 on branch v3.1.x (Let connectionpatch be drawn on figure level) - `15020`{.interpreted-text role="ghpull"}: Let connectionpatch be drawn on figure level - `15017`{.interpreted-text role="ghpull"}: Backport PR #15007 on branch v3.1.x (FIX: support pandas 0.25) - `14979`{.interpreted-text role="ghpull"}: FIX: Don\'t enable IPython integration if not entering REPL. - `14987`{.interpreted-text role="ghpull"}: Merge pull request #14915 from AWhetter/fix_14585 - `14985`{.interpreted-text role="ghpull"}: Backport PR #14982 on branch v3.1.x (DOC: correct table docstring) - `14982`{.interpreted-text role="ghpull"}: DOC: correct table docstring - `14975`{.interpreted-text role="ghpull"}: Backport PR #14974 on branch v3.1.x (grammar) - `14972`{.interpreted-text role="ghpull"}: Backport PR #14971 on branch v3.1.x (typo) - `14965`{.interpreted-text role="ghpull"}: Fix typo in documentation of table - `14951`{.interpreted-text role="ghpull"}: Backport PR #14934 on branch v3.1.x (DOC: update axes_demo to directly manipulate fig, ax) - `14938`{.interpreted-text role="ghpull"}: Backport PR #14905 on branch v3.1.x (Gracefully handle encoding problems when querying external executables.) - `14935`{.interpreted-text role="ghpull"}: Backport PR #14933 on branch v3.1.x (DOC: typo x2 costum -\> custom) - `14936`{.interpreted-text role="ghpull"}: Backport PR #14932 on branch v3.1.x (DOC: Update invert_example to directly manipulate axis.) - `14905`{.interpreted-text role="ghpull"}: Gracefully handle encoding problems when querying external executables. - `14933`{.interpreted-text role="ghpull"}: DOC: typo x2 costum -\> custom - `14910`{.interpreted-text role="ghpull"}: Backport PR #14901 on branch v3.1.x (Fix GH14900: numpy 1.17.0 breaks test_colors.) - `14864`{.interpreted-text role="ghpull"}: Backport PR #14830 on branch v3.1.x (FIX: restore special casing of shift-enter in notebook) - `14861`{.interpreted-text role="ghpull"}: Don\'t use pandas 0.25.0 for testing - `14855`{.interpreted-text role="ghpull"}: Backport PR #14839 on branch v3.1.x - `14839`{.interpreted-text role="ghpull"}: Improve docstring of Axes.hexbin - `14837`{.interpreted-text role="ghpull"}: Backport PR #14757 on branch v3.1.x (Remove incorrect color/cmap docstring line in contour.py) - `14836`{.interpreted-text role="ghpull"}: Backport PR #14764 on branch v3.1.x (DOC: Fixes the links in the see-also section of Axes.get_tightbbox) - `14818`{.interpreted-text role="ghpull"}: Backport PR #14510 on branch v3.1.x (Improve example for fill_between) - `14819`{.interpreted-text role="ghpull"}: Backport PR #14704 on branch v3.1.x (Small patches on Docs (Tutorials and FAQ)) - `14820`{.interpreted-text role="ghpull"}: Backport PR #14765 on branch v3.1.x (DOC: Fix documentation location for patheffects) - `14821`{.interpreted-text role="ghpull"}: Backport PR #14741 on branch v3.1.x (DOC: Update description of properties of Line2D in \'plot\' documentation.) - `14822`{.interpreted-text role="ghpull"}: Backport PR #14714 on branch v3.1.x (Point towards how to save output of non-interactive backends) - `14823`{.interpreted-text role="ghpull"}: Backport PR #14784 on branch v3.1.x (Tiny docs/comments cleanups.) - `14824`{.interpreted-text role="ghpull"}: Backport PR #14798 on branch v3.1.x (Cleanup dates.py module docstrings.) - `14825`{.interpreted-text role="ghpull"}: Backport PR #14802 on branch v3.1.x (Fix some broken refs in the docs.) - `14826`{.interpreted-text role="ghpull"}: Backport PR #14806 on branch v3.1.x (Remove unnecessary uses of transFigure from examples.) - `14827`{.interpreted-text role="ghpull"}: Backport PR #14525 on branch v3.1.x (improve documentation of OffsetBox) - `14828`{.interpreted-text role="ghpull"}: Backport PR #14548: Link to matplotlibrc of used version - `14817`{.interpreted-text role="ghpull"}: Backport PR #14697 on branch v3.1.x (Fix NavigationToolbar2QT height) - `14692`{.interpreted-text role="ghpull"}: Backport PR #14688 on branch v3.1.x (Revise the misleading title for subplots demo) - `14816`{.interpreted-text role="ghpull"}: Backport PR #14677 on branch v3.1.x (Don\'t misclip axis when calling set_ticks on inverted axes.) - `14815`{.interpreted-text role="ghpull"}: Backport PR #14658 on branch v3.1.x (Fix numpydoc formatting) - `14813`{.interpreted-text role="ghpull"}: Backport PR #14488 on branch v3.1.x (Make sure EventCollection doesn\'t modify input in-place) - `14806`{.interpreted-text role="ghpull"}: Remove unnecessary uses of transFigure from examples. - `14802`{.interpreted-text role="ghpull"}: Fix some broken refs in the docs. - `14798`{.interpreted-text role="ghpull"}: Cleanup dates.py module docstrings. - `14784`{.interpreted-text role="ghpull"}: Tiny docs/comments cleanups. - `14764`{.interpreted-text role="ghpull"}: DOC: Fixes the links in the see-also section of Axes.get_tightbbox - `14777`{.interpreted-text role="ghpull"}: Backport PR #14775 on branch v3.1.x (DOC: Fix CircleCI builds) - `14769`{.interpreted-text role="ghpull"}: Backport PR #14759 on branch v3.1.x (DOC: note about having to rebuild after switching to local freetype) - `14714`{.interpreted-text role="ghpull"}: Point towards how to save output of non-interactive backends - `14741`{.interpreted-text role="ghpull"}: DOC: Update description of properties of Line2D in \'plot\' documentation. - `14771`{.interpreted-text role="ghpull"}: Backport PR #14760 on branch v3.1.x (DOC: minor CoC wording change) - `14765`{.interpreted-text role="ghpull"}: DOC: Fix documentation location for patheffects - `14735`{.interpreted-text role="ghpull"}: Backport PR #14734 on branch v3.1.x (Add geoplot to third-party example libraries page.) - `14711`{.interpreted-text role="ghpull"}: Backport PR #14706 on branch v3.1.x (Mention gr backend in docs.) - `14704`{.interpreted-text role="ghpull"}: Small patches on Docs (Tutorials and FAQ) - `14700`{.interpreted-text role="ghpull"}: Backport PR #14698 on branch v3.1.x (Make property name be consistent with rc parameter.) - `14510`{.interpreted-text role="ghpull"}: Improve example for fill_between - `14683`{.interpreted-text role="ghpull"}: For non-html output, let sphinx pick the best format. - `14697`{.interpreted-text role="ghpull"}: Fix NavigationToolbar2QT height - `14677`{.interpreted-text role="ghpull"}: Don\'t misclip axis when calling set_ticks on inverted axes. - `14658`{.interpreted-text role="ghpull"}: Fix numpydoc formatting - `14488`{.interpreted-text role="ghpull"}: Make sure EventCollection doesn\'t modify input in-place - `14570`{.interpreted-text role="ghpull"}: Remove print statements - `14525`{.interpreted-text role="ghpull"}: improve documentation of OffsetBox - `14548`{.interpreted-text role="ghpull"}: Link to matplotlibrc of used version - `14395`{.interpreted-text role="ghpull"}: MAINT: work around non-zero exit status of \"pdftops -v\" command. Issues (28): - `15295`{.interpreted-text role="ghissue"}: Can\'t install matplotlib with pip for Python 3.8b4 - `15714`{.interpreted-text role="ghissue"}: Publish 3.8 wheels - `15706`{.interpreted-text role="ghissue"}: Python 3.8 - Installation error: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType - `15690`{.interpreted-text role="ghissue"}: Should xlim support single-entry arrays? - `15608`{.interpreted-text role="ghissue"}: imshow rendering changed from 3.1.0 to 3.1.1 - `14903`{.interpreted-text role="ghissue"}: \'MPLBACKEND=webagg\' is overwritten by agg when \$DISPLAY is not set on Linux - `15351`{.interpreted-text role="ghissue"}: Bar width expands between subsequent bars - `15240`{.interpreted-text role="ghissue"}: Can\'t specify integer `font.weight` in custom style sheet any more - `15255`{.interpreted-text role="ghissue"}: `imshow` in `v3.1.1`: y-axis chopped-off - `15186`{.interpreted-text role="ghissue"}: 3D quiver plot fails when pivot = \"middle\" - `14160`{.interpreted-text role="ghissue"}: PySide2/PyQt5: Graphics issues in QScrollArea for OSX - `15178`{.interpreted-text role="ghissue"}: mdates.ConciseDateFormatter() doesn\'t work with zero_formats parameter - `15179`{.interpreted-text role="ghissue"}: Patch 3.1.1 broke imshow() heatmaps: Tiles cut off on y-axis - `15162`{.interpreted-text role="ghissue"}: axes.bar fails when x is int-indexed pandas.Series - `15103`{.interpreted-text role="ghissue"}: Colorbar for imshow messes interactive cursor with masked data - `8744`{.interpreted-text role="ghissue"}: ConnectionPatch hidden by plots - `14950`{.interpreted-text role="ghissue"}: plt.ioff() not suppressing figure generation - `14959`{.interpreted-text role="ghissue"}: Typo in Docs - `14902`{.interpreted-text role="ghissue"}: from matplotlib import animation UnicodeDecodeError - `14897`{.interpreted-text role="ghissue"}: New yticks behavior in 3.1.1 vs 3.1.0 - `14811`{.interpreted-text role="ghissue"}: How to save hexbin binned data in a text file. - `14551`{.interpreted-text role="ghissue"}: Non functional API links break docs builds downstream - `14720`{.interpreted-text role="ghissue"}: Line2D properties should state units - `10891`{.interpreted-text role="ghissue"}: Toolbar icons too large in PyQt5 (Qt5Agg backend) - `14675`{.interpreted-text role="ghissue"}: Heatmaps are being truncated when using with seaborn - `14487`{.interpreted-text role="ghissue"}: eventplot sorts np.array positions, but not list positions - `14547`{.interpreted-text role="ghissue"}: Changing mplstyle: axes.titlelocation causes Bad Key error - `10410`{.interpreted-text role="ghissue"}: eventplot alters data in some cases --- ::: redirect-from /users/prev_whats_new/github_stats_3.1.3 ::: # GitHub statistics for 3.1.3 (Feb 03, 2020) {#github-stats-3-1-3} GitHub statistics for 2019/11/05 (tag: v3.1.2) - 2020/02/03 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 7 issues and merged 45 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/50?closed=1) The following 13 authors contributed 125 commits. - Antony Lee - David Stansby - Elliott Sales de Andrade - hannah - Jody Klymak - MeeseeksMachine - Nelle Varoquaux - Nikita Kniazev - Paul Ivanov - SamSchott - Steven G. Johnson - Thomas A Caswell - Tim Hoffmann GitHub issues and pull requests: Pull Requests (45): - `16382`{.interpreted-text role="ghpull"}: Backport PR #16379 on branch v3.1.x (FIX: catch on message content, not module) - `16362`{.interpreted-text role="ghpull"}: Backport PR #16347: FIX: catch warnings from pandas in cbook.\_check_1d - `16356`{.interpreted-text role="ghpull"}: Backport PR #16330 on branch v3.1.x (Clearer signal handling) - `16330`{.interpreted-text role="ghpull"}: Clearer signal handling - `16348`{.interpreted-text role="ghpull"}: Backport PR #16255 on branch v3.1.x (Move version info to sidebar) - `16345`{.interpreted-text role="ghpull"}: Backport PR #16298 on branch v3.1.x (Don\'t recursively call draw_idle when updating artists at draw time.) - `16298`{.interpreted-text role="ghpull"}: Don\'t recursively call draw_idle when updating artists at draw time. - `16322`{.interpreted-text role="ghpull"}: Backport PR #16250: Fix zerolen intersect - `16320`{.interpreted-text role="ghpull"}: Backport PR #16311 on branch v3.1.x (don\'t override non-Python signal handlers) - `16311`{.interpreted-text role="ghpull"}: don\'t override non-Python signal handlers - `16250`{.interpreted-text role="ghpull"}: Fix zerolen intersect - `16237`{.interpreted-text role="ghpull"}: Backport PR #16235 on branch v3.1.x (FIX: AttributeError in TimerBase.start) - `16235`{.interpreted-text role="ghpull"}: FIX: AttributeError in TimerBase.start - `16208`{.interpreted-text role="ghpull"}: Backport PR #15556 on branch v3.1.x (Fix test suite compat with ghostscript 9.50.) - `16213`{.interpreted-text role="ghpull"}: Backport PR #15763 on branch v3.1.x (Skip webagg test if tornado is not available.) - `16167`{.interpreted-text role="ghpull"}: Backport PR #16166 on branch v3.1.x (Add badge for citing 3.1.2) - `16166`{.interpreted-text role="ghpull"}: Add badge for citing 3.1.2 - `16144`{.interpreted-text role="ghpull"}: Backport PR #16053 on branch v3.1.x (Fix v_interval setter) - `16053`{.interpreted-text role="ghpull"}: Fix v_interval setter - `16136`{.interpreted-text role="ghpull"}: Backport PR #16112 on branch v3.1.x (CI: Fail when failed to install dependencies) - `16131`{.interpreted-text role="ghpull"}: Backport PR #16126 on branch v3.1.x (TST: test_fork: Missing join) - `16126`{.interpreted-text role="ghpull"}: TST: test_fork: Missing join - `16091`{.interpreted-text role="ghpull"}: Backport PR #16086 on branch v3.1.x (FIX: use supported attribute to check pillow version) - `16040`{.interpreted-text role="ghpull"}: Backport PR #16031 on branch v3.1.x (Fix docstring of hillshade().) - `16032`{.interpreted-text role="ghpull"}: Backport PR #16028 on branch v3.1.x (Prevent FigureCanvasQT_draw_idle recursively calling itself.) - `16028`{.interpreted-text role="ghpull"}: Prevent FigureCanvasQT_draw_idle recursively calling itself. - `16020`{.interpreted-text role="ghpull"}: Backport PR #16007 on branch v3.1.x (Fix search on nested pages) - `16018`{.interpreted-text role="ghpull"}: Backport PR #15735 on branch v3.1.x (Cleanup some mplot3d docstrings.) - `16007`{.interpreted-text role="ghpull"}: Fix search on nested pages - `15957`{.interpreted-text role="ghpull"}: Backport PR #15953 on branch v3.1.x (Update donation link) - `15763`{.interpreted-text role="ghpull"}: Skip webagg test if tornado is not available. - `15881`{.interpreted-text role="ghpull"}: Backport PR #15859 on branch v3.1.x (Doc: Move search field into nav bar) - `15863`{.interpreted-text role="ghpull"}: Backport PR #15244 on branch v3.1.x: Change documentation format of rcParams defaults - `15859`{.interpreted-text role="ghpull"}: Doc: Move search field into nav bar - `15860`{.interpreted-text role="ghpull"}: Backport PR #15851 on branch v3.1.x (ffmpeg is available on default ubuntu packages now) - `15851`{.interpreted-text role="ghpull"}: ffmpeg is available on default ubuntu packages now. - `15843`{.interpreted-text role="ghpull"}: Backport PR #15737 on branch v3.1.x (Fix env override in WebAgg backend test.) - `15760`{.interpreted-text role="ghpull"}: Backport PR #15752 on branch v3.1.x (Update boxplot/violinplot faq.) - `15757`{.interpreted-text role="ghpull"}: Backport PR #15751 on branch v3.1.x (Modernize FAQ entry for plt.show().) - `15735`{.interpreted-text role="ghpull"}: Cleanup some mplot3d docstrings. - `15753`{.interpreted-text role="ghpull"}: Backport PR #15661 on branch v3.1.x (Document scope of 3D scatter depthshading.) - `15741`{.interpreted-text role="ghpull"}: Backport PR #15729 on branch v3.1.x (Catch correct parse error type for dateutil \>= 2.8.1) - `15729`{.interpreted-text role="ghpull"}: Catch correct parse error type for dateutil \>= 2.8.1 - `15737`{.interpreted-text role="ghpull"}: Fix env override in WebAgg backend test. - `15244`{.interpreted-text role="ghpull"}: Change documentation format of rcParams defaults Issues (7): - `16294`{.interpreted-text role="ghissue"}: BUG: Interactive mode slow - `15842`{.interpreted-text role="ghissue"}: Path.intersects_path returns True when it shouldn\'t - `16163`{.interpreted-text role="ghissue"}: libpng error: Read Error when using matplotlib after setting usetex=True - `15960`{.interpreted-text role="ghissue"}: v3.1.2 - test suite \"frozen\" after it finishes - `16083`{.interpreted-text role="ghissue"}: Pillow 7.0.0 Support - `15481`{.interpreted-text role="ghissue"}: Recursion error - `15717`{.interpreted-text role="ghissue"}: Move search field into nav bar --- ::: redirect-from /users/prev_whats_new/github_stats_3.10.0 ::: # GitHub statistics for 3.10.0 (Dec 13, 2024) {#github-stats-3_10_0} GitHub statistics for 2024/05/15 (tag: v3.9.0) - 2024/12/13 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 100 issues and merged 337 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/84?closed=1) The following 128 authors contributed 1932 commits. - abhi-jha - Adam J. Stewart - Aditi Gautam - Aditya Vidyadhar Kamath - Aishling Cooke - Alan - Alan Sosa - Alice - Aman Nijjar - Ammar Qazi - Ancheng - anpaulan - Anson0028 - Anthony Lee - anTon - Antony Lee - Ayoub Gouasmi - Brigitta Sipőcz - Caitlin Hathaway - cesar - Charlie LeWarne - Christian Mattsson - ClarkeAC - Clemens Brunner - Clement Gilli - cmp0xff - Costa Paraskevopoulos - dale - Dani Pinyol - Daniel Weiss - Danny - David Bakaj - David Lowry-Duda - David Meyer - David Stansby - dbakaj - dependabot\[bot\] - Diogo Cardoso - Doron Behar - Edgar Andrés Margffoy Tuay - Elliott Sales de Andrade - Eytan Adler - farquh - Felipe Cybis Pereira - Filippo Balzaretti - FMasson - Francisco Cardozo - Gavin S - Greg Lucas - haaris - hannah - Ian Thomas - Illviljan - James Addison - James Spencer - Jody Klymak - john - Jonas Eschle - Jouni K. Seppänen - juanis2112 - Juanita Gomez - Justin Hendrick - K900 - Kaustbh - Kaustubh - Kherim Willems - Kyle Sunden - Kyra Cho - Larry Bradley - litchi - Lorenzo - Lucx33 - Lumberbot (aka Jack) - MadPhysicist - malhar2460 - Martino Sorbaro - Mathias Hauser - Matthew Feickert - Matthew Petroff - Melissa Weber Mendonça - Michael - Michael Droettboom - Michael Hinton - MischaMegens2 - Moritz Wolter - muchojp - Nabil - nakamura yuki - odile - OdileVidrine - Oscar Gustafsson - Panicks28 - Paul An - Pedro Barão - PedroBittarBarao - Peter Talley - Pierre-antoine Comby - Pranav - Pranav Raghu - pre-commit-ci\[bot\] - proximalf - r3kste - Randolf Scholz - Refael Ackermann - RickyP24 - rnhmjoj - Ruth Comer - Ryan May - Sai Chaitanya, Sanivada - saranti - scaccol - Scott Shambaugh - Sean Smith - Simon May - simond07 - smcgrawDotNet - Takumasa N - Takumasa N. - Takumasa Nakamura - thiagoluisbecker - Thomas A Caswell - Tiago Lubiana - Tim Hoffmann - trananso - Trygve Magnus Ræder - Victor Liu - vittoboa - Xeniya Shoiko GitHub issues and pull requests: Pull Requests (337): - `29299`{.interpreted-text role="ghpull"}: Merge v3.9.x into v3.10.x - `29296`{.interpreted-text role="ghpull"}: Backport PR #29295 on branch v3.10.x (BLD: Pin meson-python to \<0.17.0) - `29290`{.interpreted-text role="ghpull"}: Backport PR #29254 on branch v3.10.x (DOC: Add note to align_labels()) - `29289`{.interpreted-text role="ghpull"}: Backport PR #29260 on branch v3.10.x (DOC: Better explanation of rcParams \"patch.edgecolor\" and \"patch.force_edgecolor\") - `29288`{.interpreted-text role="ghpull"}: Backport PR #29285 on branch v3.10.x (Retarget PR#29175 to main) - `29254`{.interpreted-text role="ghpull"}: DOC: Add note to align_labels() - `29260`{.interpreted-text role="ghpull"}: DOC: Better explanation of rcParams \"patch.edgecolor\" and \"patch.force_edgecolor\" - `29285`{.interpreted-text role="ghpull"}: Retarget PR#29175 to main - `29286`{.interpreted-text role="ghpull"}: Backport PR #29274 on branch v3.10.x (Bump the actions group across 1 directory with 2 updates) - `29274`{.interpreted-text role="ghpull"}: Bump the actions group across 1 directory with 2 updates - `29283`{.interpreted-text role="ghpull"}: Backport PR #29272 on branch v3.10.x (DOC: Add section on translating between Axes and pyplot interface) - `29272`{.interpreted-text role="ghpull"}: DOC: Add section on translating between Axes and pyplot interface - `29279`{.interpreted-text role="ghpull"}: Backport PR #29265 on branch v3.10.x (DOC: Slightly improve the LineCollection docstring) - `29276`{.interpreted-text role="ghpull"}: Backport PR #29247 on branch v3.10.x (Fix building freetype 2.6.1 on macOS clang 18) - `29244`{.interpreted-text role="ghpull"}: Switch to a 3d rotation trackball implementation with path independence - `29265`{.interpreted-text role="ghpull"}: DOC: Slightly improve the LineCollection docstring - `29247`{.interpreted-text role="ghpull"}: Fix building freetype 2.6.1 on macOS clang 18 - `29268`{.interpreted-text role="ghpull"}: Bump the actions group with 2 updates - `29266`{.interpreted-text role="ghpull"}: Backport PR #29251 on branch v3.10.x (Zizmor audit) - `29269`{.interpreted-text role="ghpull"}: Backport PR #29267 on branch v3.10.x (Exclude pylab from mypy checks) - `29267`{.interpreted-text role="ghpull"}: Exclude pylab from mypy checks - `29251`{.interpreted-text role="ghpull"}: Zizmor audit - `29255`{.interpreted-text role="ghpull"}: Backport PR #29249 on branch v3.10.x (\[Bug Fix\] Fix reverse mapping for \_translate_tick_params) - `29249`{.interpreted-text role="ghpull"}: \[Bug Fix\] Fix reverse mapping for \_translate_tick_params - `29250`{.interpreted-text role="ghpull"}: Backport PR #29243 on branch v3.10.x (Add quotes around \[dev\] in environment.yml) - `29243`{.interpreted-text role="ghpull"}: Add quotes around \[dev\] in environment.yml - `29246`{.interpreted-text role="ghpull"}: Backport PR #29240 on branch v3.10.x (DOC: Add plt.show() to introductory pyplot example) - `29240`{.interpreted-text role="ghpull"}: DOC: Add plt.show() to introductory pyplot example - `29239`{.interpreted-text role="ghpull"}: Backport PR #29236 on branch v3.10.x (ANI: Reduce Pillow frames to RGB when opaque) - `29238`{.interpreted-text role="ghpull"}: Backport PR #29167 on branch v3.10.x (BUGFIX: use axes unit information in ConnectionPatch ) - `29236`{.interpreted-text role="ghpull"}: ANI: Reduce Pillow frames to RGB when opaque - `29167`{.interpreted-text role="ghpull"}: BUGFIX: use axes unit information in ConnectionPatch - `29232`{.interpreted-text role="ghpull"}: Merge branch v3.9.x into v3.10.x - `29230`{.interpreted-text role="ghpull"}: Backport PR #29188 on branch v3.10.x (Bump pypa/cibuildwheel from 2.21.3 to 2.22.0 in the actions group) - `29188`{.interpreted-text role="ghpull"}: Bump pypa/cibuildwheel from 2.21.3 to 2.22.0 in the actions group - `29225`{.interpreted-text role="ghpull"}: Backport PR #29213 on branch v3.10.x (avoid-unnecessary-warning-in-\_pcolorargs-function) - `29211`{.interpreted-text role="ghpull"}: Backport PR #29133 on branch v3.10.x (Creating_parse_bar_color_args to unify color handling in plt.bar with precedence and sequence support for facecolor and edgecolor) - `29177`{.interpreted-text role="ghpull"}: Backport PR #29148 on branch v3.10.x (Don\'t fail on equal-but-differently-named cmaps in qt figureoptions.) - `29226`{.interpreted-text role="ghpull"}: Backport PR #29206 on branch v3.10.x (Skip more tests on pure-Wayland systems) - `29206`{.interpreted-text role="ghpull"}: Skip more tests on pure-Wayland systems - `29213`{.interpreted-text role="ghpull"}: avoid-unnecessary-warning-in-\_pcolorargs-function - `29210`{.interpreted-text role="ghpull"}: Backport PR #29209 on branch v3.10.x (FIX: pcolormesh with no x y args and nearest interp) - `29133`{.interpreted-text role="ghpull"}: Creating_parse_bar_color_args to unify color handling in plt.bar with precedence and sequence support for facecolor and edgecolor - `29209`{.interpreted-text role="ghpull"}: FIX: pcolormesh with no x y args and nearest interp - `29200`{.interpreted-text role="ghpull"}: Backport PR #29182 on branch v3.10.x (Update backend_qt.py: parent not passed to \_\_init\_\_ on subplottool) - `29207`{.interpreted-text role="ghpull"}: Backport PR #29169 on branch v3.10.x (Minor fixes to text intro explainer) - `29169`{.interpreted-text role="ghpull"}: Minor fixes to text intro explainer - `29159`{.interpreted-text role="ghpull"}: Pending warning for deprecated parameter \'vert\' of box and violin on 3.10 - `29196`{.interpreted-text role="ghpull"}: Backport PR #29191 on branch v3.10.x (ci: Simplify 3.13t test setup) - `29182`{.interpreted-text role="ghpull"}: Update backend_qt.py: parent not passed to \_\_init\_\_ on subplottool - `29189`{.interpreted-text role="ghpull"}: Backport PR #28934 on branch v3.10.x (ci: Unpin micromamba again) - `29186`{.interpreted-text role="ghpull"}: Backport PR #28335 on branch v3.10.x (DOC: do not posting LLM output as your own work) - `28934`{.interpreted-text role="ghpull"}: ci: Unpin micromamba again - `28335`{.interpreted-text role="ghpull"}: DOC: do not posting LLM output as your own work - `29178`{.interpreted-text role="ghpull"}: Backport PR #29163 on branch v3.9.x (ci: Remove outdated pkg-config package on macOS) - `29170`{.interpreted-text role="ghpull"}: Backport PR #29154 on branch v3.10.x (Relax conditions for warning on updating converters) - `29154`{.interpreted-text role="ghpull"}: Relax conditions for warning on updating converters - `29166`{.interpreted-text role="ghpull"}: Backport PR #29153 on branch v3.10.x (Bump codecov/codecov-action from 4 to 5 in the actions group) - `29164`{.interpreted-text role="ghpull"}: Backport PR #29163 on branch v3.10.x (ci: Remove outdated pkg-config package on macOS) - `29168`{.interpreted-text role="ghpull"}: Backport PR #29073 on branch v3.10.x (Update secondary_axis tutorial) - `29073`{.interpreted-text role="ghpull"}: Update secondary_axis tutorial - `29163`{.interpreted-text role="ghpull"}: ci: Remove outdated pkg-config package on macOS - `29145`{.interpreted-text role="ghpull"}: Backport PR #29144 on branch v3.10.x (Use both TCL_SETVAR and TCL_SETVAR2 for tcl 9 support) - `29144`{.interpreted-text role="ghpull"}: Use both TCL_SETVAR and TCL_SETVAR2 for tcl 9 support - `29140`{.interpreted-text role="ghpull"}: Backport PR #29080 on branch v3.10.x (Updates the `galleries/tutorials/artists.py` file in response to issue #28920) - `29080`{.interpreted-text role="ghpull"}: Updates the `galleries/tutorials/artists.py` file in response to issue #28920 - `29138`{.interpreted-text role="ghpull"}: Backport PR #29134 on branch v3.10.x (MNT: Temporarily skip failing test to unbreak CI) - `29134`{.interpreted-text role="ghpull"}: MNT: Temporarily skip failing test to unbreak CI - `29132`{.interpreted-text role="ghpull"}: Backport PR #29128 on branch v3.10.x (Tweak AutoMinorLocator docstring.) - `29128`{.interpreted-text role="ghpull"}: Tweak AutoMinorLocator docstring. - `29123`{.interpreted-text role="ghpull"}: Bump the actions group with 2 updates - `29122`{.interpreted-text role="ghpull"}: Backport PR #29120 on branch v3.10.x (DOC: Switch nested pie example from cmaps to color_sequences) - `29100`{.interpreted-text role="ghpull"}: Backport PR #29099 on branch v3.10.x (MNT: remove \_ttconv.pyi) - `29099`{.interpreted-text role="ghpull"}: MNT: remove \_ttconv.pyi - `29098`{.interpreted-text role="ghpull"}: Backport PR #29097 on branch v3.10.x (ENH: add back/forward buttons to osx backend move) - `29097`{.interpreted-text role="ghpull"}: ENH: add back/forward buttons to osx backend move - `29095`{.interpreted-text role="ghpull"}: Backport PR #29071 on branch v3.10.x (Bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0 in the actions group) - `29096`{.interpreted-text role="ghpull"}: Backport PR #29094 on branch v3.10.x (DOC: fix link in See Also section of axes.violin) - `29092`{.interpreted-text role="ghpull"}: Backport PR #29088 on branch v3.10.x (DOC: Format aliases in kwargs tables) - `29094`{.interpreted-text role="ghpull"}: DOC: fix link in See Also section of axes.violin - `29091`{.interpreted-text role="ghpull"}: Backport PR #29085 on branch v3.10.x (FIX: Update GTK3Agg backend export name for consistency) - `29088`{.interpreted-text role="ghpull"}: DOC: Format aliases in kwargs tables - `29089`{.interpreted-text role="ghpull"}: Backport PR #29065 on branch v3.10.x (DOC: Update docstring of triplot()) - `29085`{.interpreted-text role="ghpull"}: FIX: Update GTK3Agg backend export name for consistency - `29084`{.interpreted-text role="ghpull"}: Backport PR #29081 on branch v3.10.x (Document \"none\" as color value) - `29065`{.interpreted-text role="ghpull"}: DOC: Update docstring of triplot() - `29081`{.interpreted-text role="ghpull"}: Document \"none\" as color value - `29061`{.interpreted-text role="ghpull"}: Backport PR #29024 on branch v3.10.x (Fix saving animations to transparent formats) - `29069`{.interpreted-text role="ghpull"}: Backport PR #29068 on branch v3.10.x (\[DOC\] Fix indentation in sync_cmaps example) - `29070`{.interpreted-text role="ghpull"}: Backport PR #29048 on branch v3.10.x (DOC: integrated pr workflow from contributing guide into install and workflow) - `29048`{.interpreted-text role="ghpull"}: DOC: integrated pr workflow from contributing guide into install and workflow - `29068`{.interpreted-text role="ghpull"}: \[DOC\] Fix indentation in sync_cmaps example - `29024`{.interpreted-text role="ghpull"}: Fix saving animations to transparent formats - `29059`{.interpreted-text role="ghpull"}: Cleanup converter docs and StrCategoryConverter behavior - `29058`{.interpreted-text role="ghpull"}: \[DOC\] Update missing-references.json - `29057`{.interpreted-text role="ghpull"}: DOC/TST: lock numpy\<2.1 in environment.yml - `29053`{.interpreted-text role="ghpull"}: Factor out common formats strings in LogFormatter, LogFormatterExponent. - `28970`{.interpreted-text role="ghpull"}: Add explicit converter setting to Axis - `28048`{.interpreted-text role="ghpull"}: Enables setting hatch linewidth in Patches and Collections, also fixes setting hatch linewidth by rcParams - `29017`{.interpreted-text role="ghpull"}: DOC: Document preferred figure size for examples - `28871`{.interpreted-text role="ghpull"}: updated contribution doc #28476 - `28453`{.interpreted-text role="ghpull"}: Stop relying on dead-reckoning mouse buttons for motion_notify_event. - `28495`{.interpreted-text role="ghpull"}: ticker.EngFormatter: allow offset - `29039`{.interpreted-text role="ghpull"}: MNT: Add provisional get_backend(resolve=False) flag - `28946`{.interpreted-text role="ghpull"}: MNT: Deprecate plt.polar() with an existing non-polar Axes - `29013`{.interpreted-text role="ghpull"}: FIX: auto_fmtxdate for constrained layout - `29022`{.interpreted-text role="ghpull"}: Fixes AIX internal CI build break. - `28830`{.interpreted-text role="ghpull"}: Feature: Support passing DataFrames to table.table - `27766`{.interpreted-text role="ghpull"}: Return filename from save_figure - `27167`{.interpreted-text role="ghpull"}: ENH: add long_axis property to colorbar - `29021`{.interpreted-text role="ghpull"}: Update minimum pybind11 to 2.13.2 - `28863`{.interpreted-text role="ghpull"}: Improved documentation for quiver - `29019`{.interpreted-text role="ghpull"}: Update requirements to add PyStemmer to doc-requirements and environment - `28653`{.interpreted-text role="ghpull"}: Mnt/generalize plot varargs - `28967`{.interpreted-text role="ghpull"}: Fix MSVC cast warnings - `29016`{.interpreted-text role="ghpull"}: DOC: Better explain suptitle / supxlabel / supylabel naming - `28842`{.interpreted-text role="ghpull"}: FT2Font extension improvements - `28658`{.interpreted-text role="ghpull"}: New data → color pipeline - `29012`{.interpreted-text role="ghpull"}: Bump required pybind11 to 2.13 - `29007`{.interpreted-text role="ghpull"}: MNT: Deprecate changing Figure.number - `28861`{.interpreted-text role="ghpull"}: Break Artist.\_remove_method reference cycle - `28478`{.interpreted-text role="ghpull"}: bugfix for `PathSimplifier` - `28992`{.interpreted-text role="ghpull"}: DOC: Refresh transform tree example - `28890`{.interpreted-text role="ghpull"}: MNT: Add missing dependency to environment.yml - `28354`{.interpreted-text role="ghpull"}: Add Quiverkey zorder option - `28966`{.interpreted-text role="ghpull"}: Fix polar error bar cap orientation - `28819`{.interpreted-text role="ghpull"}: Mark all extensions as free-threading safe - `28986`{.interpreted-text role="ghpull"}: DOC: Add tags for 3D fill_between examples - `28984`{.interpreted-text role="ghpull"}: DOC / BUG: Better example for 3D axlim_clip argument - `20866`{.interpreted-text role="ghpull"}: Remove ttconv and implement Type-42 embedding using fontTools - `28975`{.interpreted-text role="ghpull"}: Set guiEvent where applicable for gtk4. - `28568`{.interpreted-text role="ghpull"}: added tags to mplot3d examples - `28976`{.interpreted-text role="ghpull"}: Bump pypa/cibuildwheel from 2.21.2 to 2.21.3 in the actions group - `28978`{.interpreted-text role="ghpull"}: CI: Resolve mypy stubtest build errors - `28823`{.interpreted-text role="ghpull"}: Fix 3D rotation precession - `28841`{.interpreted-text role="ghpull"}: Make mplot3d mouse rotation style adjustable - `28971`{.interpreted-text role="ghpull"}: DOC: correct linestyle example and reference rcParams - `28702`{.interpreted-text role="ghpull"}: \[MNT\]: #28701 separate the generation of polygon vertices in fill_between to enable resampling - `28965`{.interpreted-text role="ghpull"}: Suggest imageio_ffmpeg to provide ffmpeg as animation writer. - `28964`{.interpreted-text role="ghpull"}: FIX macos: Use the agg buffer_rgba rather than private attribute - `28963`{.interpreted-text role="ghpull"}: Remove refs to outdated writers in animation.py. - `28948`{.interpreted-text role="ghpull"}: Raise ValueError for RGB values outside the \[0, 1\] range in rgb_to_hsv function - `28857`{.interpreted-text role="ghpull"}: Pybind11 cleanup - `28949`{.interpreted-text role="ghpull"}: \[pre-commit.ci\] pre-commit autoupdate - `28950`{.interpreted-text role="ghpull"}: Bump the actions group with 2 updates - `28904`{.interpreted-text role="ghpull"}: Agg: Remove 16-bit limits - `28856`{.interpreted-text role="ghpull"}: Convert remaining code to pybind11 - `28874`{.interpreted-text role="ghpull"}: Remove remaining 3.8 deprecations - `28943`{.interpreted-text role="ghpull"}: DOC: Clarify the returned line of axhline()/axvline() - `28935`{.interpreted-text role="ghpull"}: DOC: Fix invalid rcParam references - `28942`{.interpreted-text role="ghpull"}: In colorbar docs, add ref from \'boundaries\' doc to \'spacing\' doc. - `28933`{.interpreted-text role="ghpull"}: Switch AxLine.set_xy{1,2} to take a single argument. - `28869`{.interpreted-text role="ghpull"}: ci: Bump build image on AppVeyor to MSVC 2019 - `28906`{.interpreted-text role="ghpull"}: Re-fix exception caching in dviread. - `27349`{.interpreted-text role="ghpull"}: \[ENH\] Implement dynamic clipping to axes limits for 3D plots - `28913`{.interpreted-text role="ghpull"}: DOC: Fix Axis.set_label reference - `28911`{.interpreted-text role="ghpull"}: MNT: Fix double evaluation of \_LazyTickList - `28584`{.interpreted-text role="ghpull"}: MNT: Prevent users from erroneously using legend label API on Axis - `28853`{.interpreted-text role="ghpull"}: MNT: Check the input sizes of regular X,Y in pcolorfast - `28838`{.interpreted-text role="ghpull"}: TST: Fix minor issues in interactive backend test - `28795`{.interpreted-text role="ghpull"}: MNT: Cleanup docstring substitution mechanisms - `28897`{.interpreted-text role="ghpull"}: Fix minor issues in stubtest wrapper - `28899`{.interpreted-text role="ghpull"}: Don\'t cache exception with traceback reference loop in dviread. - `28888`{.interpreted-text role="ghpull"}: DOC: Better visualization for the default color cycle example - `28896`{.interpreted-text role="ghpull"}: doc: specify non-python dependencies in dev install docs - `28843`{.interpreted-text role="ghpull"}: MNT: Cleanup FontProperties \_\_init\_\_ API - `28683`{.interpreted-text role="ghpull"}: MNT: Warn if fixed aspect overwrites explicitly set data limits - `25645`{.interpreted-text role="ghpull"}: Fix issue with sketch not working on PathCollection in Agg - `28886`{.interpreted-text role="ghpull"}: DOC: Cross-link Axes attributes - `28880`{.interpreted-text role="ghpull"}: Remove \'in\' from removal substitution for deprecation messages - `28875`{.interpreted-text role="ghpull"}: DOC: Fix documentation of hist() kwarg lists - `28825`{.interpreted-text role="ghpull"}: DOC: Fix non-working code object references - `28862`{.interpreted-text role="ghpull"}: Improve pie chart error messages - `28844`{.interpreted-text role="ghpull"}: DOC: Add illustration to Figure.subplots_adjust - `28588`{.interpreted-text role="ghpull"}: Fix scaling in Tk on non-Windows systems - `28849`{.interpreted-text role="ghpull"}: DOC: Mark subfigures as no longer provisional - `26000`{.interpreted-text role="ghpull"}: making onselect a keyword argument on selectors - `26013`{.interpreted-text role="ghpull"}: Support unhashable callbacks in CallbackRegistry - `27011`{.interpreted-text role="ghpull"}: Convert Agg extension to pybind11 - `28845`{.interpreted-text role="ghpull"}: In examples, prefer named locations rather than location numbers. - `27218`{.interpreted-text role="ghpull"}: API: finish LocationEvent.lastevent removal - `26870`{.interpreted-text role="ghpull"}: Removed the deprecated code from axis.py - `27996`{.interpreted-text role="ghpull"}: Create `InsetIndicator` artist - `28532`{.interpreted-text role="ghpull"}: TYP: Fix xycoords and friends - `28785`{.interpreted-text role="ghpull"}: Convert ft2font extension to pybind11 - `28815`{.interpreted-text role="ghpull"}: DOC: Document policy on colormaps and styles - `28826`{.interpreted-text role="ghpull"}: MNT: Replace \_docstring.dedent_interpd by its alias \_docstring.interpd - `27567`{.interpreted-text role="ghpull"}: DOC: batch of tags - `27302`{.interpreted-text role="ghpull"}: Tags for simple_scatter.py demo - `28820`{.interpreted-text role="ghpull"}: DOC: Fix missing cross-reference checks for sphinx-tags - `28786`{.interpreted-text role="ghpull"}: Handle single color in ContourSet - `28808`{.interpreted-text role="ghpull"}: DOC: Add a plot to margins() to visualize the effect - `27938`{.interpreted-text role="ghpull"}: feat: add dunder method for math operations on Axes Size divider - `28569`{.interpreted-text role="ghpull"}: Adding tags to many examples - `28183`{.interpreted-text role="ghpull"}: Expire deprecations - `28801`{.interpreted-text role="ghpull"}: DOC: Clarify AxLine.set_xy2 / AxLine.set_slope - `28788`{.interpreted-text role="ghpull"}: TST: Skip webp tests if it isn\'t available - `28550`{.interpreted-text role="ghpull"}: Remove internal use of `Artist.figure` - `28767`{.interpreted-text role="ghpull"}: MNT: expire `ContourSet` deprecations - `28755`{.interpreted-text role="ghpull"}: TYP: Add typing for internal \_tri extension - `28765`{.interpreted-text role="ghpull"}: Add tests for most of FT2Font, and fix some bugs - `28781`{.interpreted-text role="ghpull"}: TST: Fix test_pickle_load_from_subprocess in a dirty tree - `28783`{.interpreted-text role="ghpull"}: Fix places where \"auto\" was not listed as valid interpolation_stage. - `28779`{.interpreted-text role="ghpull"}: DOC/TST: lock numpy \< 2.1 - `28771`{.interpreted-text role="ghpull"}: Ensure SketchParams is always fully initialized - `28375`{.interpreted-text role="ghpull"}: FIX: Made AffineDeltaTransform pass-through properly - `28454`{.interpreted-text role="ghpull"}: MultivarColormap and BivarColormap - `27891`{.interpreted-text role="ghpull"}: Refactor some parts of ft2font extension - `28752`{.interpreted-text role="ghpull"}: quick fix dev build by locking out numpy version that\'s breaking things - `28749`{.interpreted-text role="ghpull"}: Add sphinxcontrib-video to environment.yml - `27851`{.interpreted-text role="ghpull"}: Add ten-color accessible color cycle as style sheet - `28501`{.interpreted-text role="ghpull"}: ConciseDateFormatter\'s offset string is correct on an inverted axis - `28734`{.interpreted-text role="ghpull"}: Compressed layout moves suptitle - `28736`{.interpreted-text role="ghpull"}: Simplify some code in dviread - `28347`{.interpreted-text role="ghpull"}: Doc: added triage section to new contributor docs - `28735`{.interpreted-text role="ghpull"}: ci: Avoid setuptools 72.2.0 when installing kiwi on PyPy - `28728`{.interpreted-text role="ghpull"}: MNT: Deprecate reimported functions in top-level namespace - `28730`{.interpreted-text role="ghpull"}: MNT: Don\'t rely on RcParams being a dict subclass in internal code - `28714`{.interpreted-text role="ghpull"}: Simplify \_api.warn_external on Python 3.12+ - `28727`{.interpreted-text role="ghpull"}: MNT: Better workaround for format_cursor_data on ScalarMappables - `28725`{.interpreted-text role="ghpull"}: Stop disabling FH4 Exception Handling on MSVC - `28711`{.interpreted-text role="ghpull"}: Merge branch v3.9.x into main - `28713`{.interpreted-text role="ghpull"}: DOC: Add a few more notes to release guide - `28720`{.interpreted-text role="ghpull"}: DOC: Clarify axhline() uses axes coordinates - `28718`{.interpreted-text role="ghpull"}: DOC: Update missing references for numpydoc 1.8.0 - `28710`{.interpreted-text role="ghpull"}: DOC: clarify alpha handling for indicate_inset\[\_zoom\] - `28704`{.interpreted-text role="ghpull"}: Fixed arrowstyle doc interpolation in FancyPatch.set_arrow() #28698. - `28709`{.interpreted-text role="ghpull"}: Bump actions/attest-build-provenance from 1.4.0 to 1.4.1 in the actions group - `28707`{.interpreted-text role="ghpull"}: Avoid division-by-zero in Sketch::Sketch - `28610`{.interpreted-text role="ghpull"}: CI: Add CI to test matplotlib against free-threaded Python - `28262`{.interpreted-text role="ghpull"}: Fix PolygonSelector cursor to temporarily hide during active zoom/pan - `28670`{.interpreted-text role="ghpull"}: API: deprecate unused helper in patch.\_Styles - `28589`{.interpreted-text role="ghpull"}: Qt embedding example: Separate drawing and data retrieval timers - `28655`{.interpreted-text role="ghpull"}: Inline annotation and PGF user demos - `28654`{.interpreted-text role="ghpull"}: DOC: Remove long uninstructive examples - `28652`{.interpreted-text role="ghpull"}: Fix docstring style inconsistencies in lines.py - `28641`{.interpreted-text role="ghpull"}: DOC: Standardize example titles - part 2 - `28642`{.interpreted-text role="ghpull"}: DOC: Simplify heatmap example - `28638`{.interpreted-text role="ghpull"}: DOC: Remove hint on PRs from origin/main - `28587`{.interpreted-text role="ghpull"}: Added dark-mode diverging colormaps - `28546`{.interpreted-text role="ghpull"}: DOC: Clarify/simplify example of multiple images with one colorbar - `28613`{.interpreted-text role="ghpull"}: Added documentation for parameters vmin and vmax inside specgram function. - `28627`{.interpreted-text role="ghpull"}: DOC: Bump minimum Sphinx to 5.1.0 - `28628`{.interpreted-text role="ghpull"}: DOC: Sub-structure next API changes overview - `28629`{.interpreted-text role="ghpull"}: FIX: `Axis.set_in_layout` respected - `28575`{.interpreted-text role="ghpull"}: Add branch tracking to development workflow instructions - `28616`{.interpreted-text role="ghpull"}: CI: Build docs on latest Python - `28617`{.interpreted-text role="ghpull"}: DOC: Enable parallel builds - `28544`{.interpreted-text role="ghpull"}: DOC: Standardize example titles - `28615`{.interpreted-text role="ghpull"}: DOC: hack to suppress sphinx-gallery 17.0 warning - `28293`{.interpreted-text role="ghpull"}: BLD: Enable building Python 3.13 wheels for nightlies - `27385`{.interpreted-text role="ghpull"}: Fix 3D lines being visible when behind camera - `28609`{.interpreted-text role="ghpull"}: svg: Ensure marker-only lines get URLs - `28599`{.interpreted-text role="ghpull"}: Upgrade code to Python 3.10 - `28593`{.interpreted-text role="ghpull"}: Update ruff to 0.2.0 - `28603`{.interpreted-text role="ghpull"}: Simplify ttconv python\<-\>C++ conversion using std::optional. - `28557`{.interpreted-text role="ghpull"}: DOC: apply toc styling to remove nesting - `28542`{.interpreted-text role="ghpull"}: CI: adjust pins in mypy GHA job - `28504`{.interpreted-text role="ghpull"}: Changes in SVG backend to improve compatibility with Affinity designer - `28122`{.interpreted-text role="ghpull"}: Disable clipping in Agg resamplers. - `28597`{.interpreted-text role="ghpull"}: Pin PyQt6 back on Ubuntu 20.04 - `28073`{.interpreted-text role="ghpull"}: Add support for multiple hatches, edgecolors and linewidths in histograms - `28594`{.interpreted-text role="ghpull"}: MNT: Raise on GeoAxes limits manipulation - `28312`{.interpreted-text role="ghpull"}: Remove one indirection layer in ToolSetCursor. - `28573`{.interpreted-text role="ghpull"}: ENH: include property name in artist AttributeError - `28503`{.interpreted-text role="ghpull"}: Bump minimum Python to 3.10 - `28525`{.interpreted-text role="ghpull"}: FIX: colorbar pad for `ImageGrid` - `28558`{.interpreted-text role="ghpull"}: DOC: Change \_make_image signature to numpydoc - `28061`{.interpreted-text role="ghpull"}: API: add antialiased to interpolation-stage in image - `28536`{.interpreted-text role="ghpull"}: \[svg\] Add rcParam\[\"svg.id\"\] to add a top-level id attribute to \ - `28540`{.interpreted-text role="ghpull"}: Subfigures become stale when their artists are stale - `28177`{.interpreted-text role="ghpull"}: Rationalise artist get_figure methods; make figure attribute a property - `28527`{.interpreted-text role="ghpull"}: DOC: improve tagging guidelines page - `28530`{.interpreted-text role="ghpull"}: DOC: Simplify axhspan example - `28537`{.interpreted-text role="ghpull"}: DOC: Update timeline example for newer releases - `27833`{.interpreted-text role="ghpull"}: \[SVG\] Introduce sequential ID-generation scheme for clip-paths. - `28512`{.interpreted-text role="ghpull"}: DOC: Fix version switcher for stable docs - `28492`{.interpreted-text role="ghpull"}: MNT: Remove PolyQuadMesh deprecations - `28509`{.interpreted-text role="ghpull"}: CI: Use micromamba on AppVeyor - `28510`{.interpreted-text role="ghpull"}: Merge v3.9.1 release into main - `28494`{.interpreted-text role="ghpull"}: \[pre-commit.ci\] pre-commit autoupdate - `28497`{.interpreted-text role="ghpull"}: Add words to ignore for codespell - `28455`{.interpreted-text role="ghpull"}: Expand ticklabels_rotation example to cover rotating default ticklabels. - `28282`{.interpreted-text role="ghpull"}: DOC: clarify no-build-isolation & mypy ignoring new functions - `28306`{.interpreted-text role="ghpull"}: Fixed PolarAxes not using fmt_xdata and added simple test (#4568) - `28400`{.interpreted-text role="ghpull"}: DOC: Improve doc wording of data parameter - `28225`{.interpreted-text role="ghpull"}: \[ENH\]: fill_between extended to 3D - `28371`{.interpreted-text role="ghpull"}: Bump pypa/cibuildwheel from 2.18.1 to 2.19.0 in the actions group - `28390`{.interpreted-text role="ghpull"}: Inline RendererBase.\_get_text_path_transform. - `28381`{.interpreted-text role="ghpull"}: Take hinting rcParam into account in MathTextParser cache. - `28363`{.interpreted-text role="ghpull"}: flip subfigures axes to match subplots - `28340`{.interpreted-text role="ghpull"}: Fix missing font error when using MiKTeX - `28379`{.interpreted-text role="ghpull"}: PathEffectsRenderer can plainly inherit RendererBase.\_draw_text_as_path. - `28275`{.interpreted-text role="ghpull"}: Revive sanitizing default filenames extracted from UI window titles - `28360`{.interpreted-text role="ghpull"}: DOC: fixed code for testing check figures equal example - `28370`{.interpreted-text role="ghpull"}: Reorder Axes3D parameters semantically. - `28350`{.interpreted-text role="ghpull"}: Typo in communication guide: extensiblity -\> extensibility - `28290`{.interpreted-text role="ghpull"}: Introduce natural 3D rotation with mouse - `28186`{.interpreted-text role="ghpull"}: apply unary minus spacing directly after equals sign - `28311`{.interpreted-text role="ghpull"}: Update 3D orientation indication right away - `28300`{.interpreted-text role="ghpull"}: Faster title alignment - `28313`{.interpreted-text role="ghpull"}: Factor out handling of missing spines in alignment calculations. - `28196`{.interpreted-text role="ghpull"}: TST: add timeouts to font_manager + threading test - `28279`{.interpreted-text role="ghpull"}: Doc/ipython dep - `28091`{.interpreted-text role="ghpull"}: \[MNT\]: create build-requirements.txt and update dev-requirements.txt - `27992`{.interpreted-text role="ghpull"}: Add warning for multiple pyplot.figure calls with same ID - `28238`{.interpreted-text role="ghpull"}: DOC: Update release guide to match current automations - `28232`{.interpreted-text role="ghpull"}: Merge v3.9.0 release into main - `28228`{.interpreted-text role="ghpull"}: DOC: Fix typo in release_guide.rst - `28074`{.interpreted-text role="ghpull"}: Add `orientation` parameter to Boxplot and deprecate `vert` - `27998`{.interpreted-text role="ghpull"}: Add a new `orientation` parameter to Violinplot and deprecate `vert` - `28217`{.interpreted-text role="ghpull"}: Better group logging of font handling by texmanager. - `28130`{.interpreted-text role="ghpull"}: Clarify the role of out_mask and out_alpha in \_make_image. - `28201`{.interpreted-text role="ghpull"}: Deprecate `Poly3DCollection.get_vector` - `28046`{.interpreted-text role="ghpull"}: DOC: Clarify merge policy - `26893`{.interpreted-text role="ghpull"}: PGF: Consistently set LaTeX document font size - `28156`{.interpreted-text role="ghpull"}: Don\'t set savefig.facecolor/edgecolor in dark_background/538 styles. - `28030`{.interpreted-text role="ghpull"}: Fix #28016: wrong lower ylim when baseline=None on stairs - `28127`{.interpreted-text role="ghpull"}: GOV: write up policy on not updating req for CVEs in dependencies - `28106`{.interpreted-text role="ghpull"}: Fix: \[Bug\]: Setting norm by string doesn\'t work for hexbin #28105 - `28143`{.interpreted-text role="ghpull"}: Merge branch v3.9.x into main - `28133`{.interpreted-text role="ghpull"}: Make `functions` param to secondary_x/yaxis not keyword-only. - `28083`{.interpreted-text role="ghpull"}: Convert TensorFlow to numpy for plots - `28116`{.interpreted-text role="ghpull"}: FIX: Correct names of aliased cmaps - `28118`{.interpreted-text role="ghpull"}: Remove redundant baseline tests in test_image. - `28093`{.interpreted-text role="ghpull"}: Minor maintenance on pgf docs/backends. - `27818`{.interpreted-text role="ghpull"}: Set polygon offsets for log scaled hexbin - `28058`{.interpreted-text role="ghpull"}: TYP: add float to to_rgba x type - `27964`{.interpreted-text role="ghpull"}: BUG: Fix NonUniformImage with nonlinear scale - `28054`{.interpreted-text role="ghpull"}: DOC: Clarify that parameters to gridded data plotting functions are p... - `27882`{.interpreted-text role="ghpull"}: Deleting all images that have passed tests before upload - `28033`{.interpreted-text role="ghpull"}: API: warn if stairs used in way that is likely not desired - `27786`{.interpreted-text role="ghpull"}: Deprecate positional use of most arguments of plotting functions - `28025`{.interpreted-text role="ghpull"}: DOC: Clarify interface terminology - `28043`{.interpreted-text role="ghpull"}: MNT: Add git blame ignore for docstring parameter indentation fix - `28037`{.interpreted-text role="ghpull"}: DOC: Fix inconsistent spacing in some docstrings in \_axes.py - `28031`{.interpreted-text role="ghpull"}: Be more specific in findobj return type Issues (100): - `29298`{.interpreted-text role="ghissue"}: \[Doc\]: The link at \"see also\" is incorrect. (Axes.violin) - `29248`{.interpreted-text role="ghissue"}: \[Bug\]: Figure.align_labels() confused by GridSpecFromSubplotSpec - `26738`{.interpreted-text role="ghissue"}: Improve LineCollection docstring further - `29263`{.interpreted-text role="ghissue"}: \[Bug\]: mypy failures in CI - `27416`{.interpreted-text role="ghissue"}: \[Bug\]: get_tick_params on xaxis shows wrong keywords - `29241`{.interpreted-text role="ghissue"}: \[Bug\]: Instructions for setting up conda dev environment in environment.yml give issues with MacOS/zsh - `29227`{.interpreted-text role="ghissue"}: \[Bug\]: Introductory example on the pyplot API page does not show - missing plt.show() - `29190`{.interpreted-text role="ghissue"}: \[Bug\]: inconsistent 'animation.FuncAnimation' between display and save - `29090`{.interpreted-text role="ghissue"}: \[MNT\]: More consistent color parameters for bar() - `29179`{.interpreted-text role="ghissue"}: \[Bug\]: Incorrect pcolormesh when shading=\'nearest\' and only the mesh data C is provided. - `29067`{.interpreted-text role="ghissue"}: \[Bug\]: `secondary_xaxis` produces ticks at incorrect locations - `29126`{.interpreted-text role="ghissue"}: \[Bug\]: TkAgg backend is broken with tcl/tk 9.0 - `29045`{.interpreted-text role="ghissue"}: \[ENH\]: implement back/forward buttons on mouse move events on macOS - `27173`{.interpreted-text role="ghissue"}: \[Bug\]: Gifs no longer create transparent background - `19229`{.interpreted-text role="ghissue"}: Add public API for setting an axis unit converter - `21108`{.interpreted-text role="ghissue"}: \[Bug\]: Hatch linewidths cannot be modified in an rcParam context - `27784`{.interpreted-text role="ghissue"}: \[Bug\]: Polar plot error bars don\'t rotate with angle for `set_theta_direction` and `set_theta_offset` - `29011`{.interpreted-text role="ghissue"}: \[Bug\]: Figure.autofmt_xdate() not working in presence of colorbar with constrained layout - `29020`{.interpreted-text role="ghissue"}: AIX internal CI build break #Matplotlib - `28726`{.interpreted-text role="ghissue"}: feature request: support passing DataFrames to table.table - `28570`{.interpreted-text role="ghissue"}: \[MNT\]: Try improving doc build speed by using PyStemmer - `13388`{.interpreted-text role="ghissue"}: Typo in the figure API (fig.suptitle) - `28994`{.interpreted-text role="ghissue"}: \[Bug\]: Figure Number Gives Type Error - `28985`{.interpreted-text role="ghissue"}: \[ENH\]: Cannot disable coordinate display in ToolManager/Toolbar (it\'s doable in NavigationToolbar2) - `17914`{.interpreted-text role="ghissue"}: `PathSimplifier` fails to ignore `CLOSEPOLY` vertices - `28885`{.interpreted-text role="ghissue"}: \[Bug\]: Strange errorbar caps when polar axes have non-default theta direction or theta zero location - `12418`{.interpreted-text role="ghissue"}: replace ttconv for ps/pdf - `28962`{.interpreted-text role="ghissue"}: \[Bug\]: gtk4 backend does not set guiEvent attribute - `28408`{.interpreted-text role="ghissue"}: \[ENH\]: mplot3d mouse rotation style - `28701`{.interpreted-text role="ghissue"}: \[MNT\]: Separate the generation of polygon vertices from `_fill_between_x_or_y` - `28941`{.interpreted-text role="ghissue"}: \[Bug\]: unexplicit error message when using `matplotlib.colors.rgb_to_hsv()` with wrong input - `23846`{.interpreted-text role="ghissue"}: \[MNT\]: Pybind11 transition plan - `28866`{.interpreted-text role="ghissue"}: Possible memory leak in pybind11 migration - `26368`{.interpreted-text role="ghissue"}: \[Bug\]: Long audio files result in incomplete spectrogram visualizations - `23826`{.interpreted-text role="ghissue"}: \[Bug\]: Overflow of 16-bit integer in Agg renderer causes PolyCollections to be drawn at incorrect locations - `28927`{.interpreted-text role="ghissue"}: \[Bug\]: Enforce that Line data modifications are sequences - `12312`{.interpreted-text role="ghissue"}: colorbar(boundaries=\...) doesn\'t work so well with nonlinear norms - `28800`{.interpreted-text role="ghissue"}: \[ENH\]: AxLine xy1/xy2 setters should take xy as single parameters, (possibly) not separate ones - `28893`{.interpreted-text role="ghissue"}: \[Bug\]: Lines between points are invisible when there are more than 7 subfigures per row - `28908`{.interpreted-text role="ghissue"}: \[Bug\]: Possible performance issue with \_LazyTickList - `27971`{.interpreted-text role="ghissue"}: \[Bug\]: ax.xaxis.set_label(\...) doesn\'t set the x-axis label - `28059`{.interpreted-text role="ghissue"}: \[Bug\]: pcolorfast should validate that regularly spaced X or Y inputs have the right size - `28892`{.interpreted-text role="ghissue"}: \[Doc\]: Be more specific on dependencies that need to be installed for a \"reasonable\" dev environment - `19693`{.interpreted-text role="ghissue"}: path.sketch doesn\'t apply to PolyCollection - `28873`{.interpreted-text role="ghissue"}: \[Bug\]: hist()\'s doc for edgecolors/facecolors does not match behavior (which is itself not very consistent) - `23005`{.interpreted-text role="ghissue"}: \[Doc\]: Add figure to `subplots_adjust` - `25947`{.interpreted-text role="ghissue"}: \[Doc\]: Subfigures still marked as provisional - `26012`{.interpreted-text role="ghissue"}: \[Bug\]: \"Unhashable type\" when event callback is a method of a `dict` subclass - `23425`{.interpreted-text role="ghissue"}: \[Bug\]: Axes.indicate_inset connectors affect constrained layout - `23424`{.interpreted-text role="ghissue"}: \[Bug\]: Axes.indicate_inset(linewidth=\...) doesn\'t affect connectors - `19768`{.interpreted-text role="ghissue"}: Overlay created by `Axes.indicate_inset_zoom` does not adjust when changing inset ranges - `27673`{.interpreted-text role="ghissue"}: \[Doc\]: Confusing page on color changes - `28782`{.interpreted-text role="ghissue"}: \[Bug\]: String `contour(colors)` gives confusing error when `extend` used - `27930`{.interpreted-text role="ghissue"}: \[ENH\]: Make axes_grid1.Size more math friendly. - `28372`{.interpreted-text role="ghissue"}: \[Bug\]: AffineDeltaTransform does not appear to invalidate properly - `27866`{.interpreted-text role="ghissue"}: \[Bug\]: Adding suptitle in compressed layout causes weird spacing - `28731`{.interpreted-text role="ghissue"}: \[Bug\]: Plotting numpy.array of dtype float32 with pyplot.imshow and specified colors.LogNorm produces wrong colors - `28715`{.interpreted-text role="ghissue"}: \[Bug\]: CI doc builds fail since a couple of days - `28698`{.interpreted-text role="ghissue"}: \[bug\]: arrowstyle doc interpolation in FancyPatch.set_arrow() - `28669`{.interpreted-text role="ghissue"}: \[Bug\]: division-by-zero error in Sketch::Sketch with Agg backend - `28548`{.interpreted-text role="ghissue"}: \[Doc\]: matplotlib.pyplot.specgram parameters vmin and vmax are not documented - `28165`{.interpreted-text role="ghissue"}: \[Bug\]: PolygonSelector should hide itself when zoom/pan is active - `18608`{.interpreted-text role="ghissue"}: Feature proposal: \"Dark mode\" divergent colormaps - `28623`{.interpreted-text role="ghissue"}: \[Bug\]: `Axis.set_in_layout` not respected? - `6305`{.interpreted-text role="ghissue"}: Matplotlib 3D plot - parametric curve "wraparound" from certain perspectives - `28595`{.interpreted-text role="ghissue"}: \[Bug\]: set_url without effect for instances of Line2D with linestyle \'none\' - `20910`{.interpreted-text role="ghissue"}: \[Bug\]: Exported SVG files are no longer imported Affinity Designer correctly - `28600`{.interpreted-text role="ghissue"}: \[TST\] Upcoming dependency test failures - `26718`{.interpreted-text role="ghissue"}: \[Bug\]: stacked histogram does not properly handle edgecolor and hatches - `28590`{.interpreted-text role="ghissue"}: \[ENH\]: Geo Projections support for inverting axis - `27954`{.interpreted-text role="ghissue"}: \[ENH\]: Iterables in grouped histogram labels - `27878`{.interpreted-text role="ghissue"}: \[ENH\]: AttributeError(\'\... got an unexpected keyword argument \...\') should set the .name attribute to the keyword - `28489`{.interpreted-text role="ghissue"}: \[TST\] Upcoming dependency test failures - `28343`{.interpreted-text role="ghissue"}: \[Bug\]: inconsistent colorbar pad for `ImageGrid` with `cbar_mode="single"` - `28535`{.interpreted-text role="ghissue"}: \[ENH\]: Add id attribute to top level svg tag - `28170`{.interpreted-text role="ghissue"}: \[Doc\]: `get_figure` may return a `SubFigure` - `27831`{.interpreted-text role="ghissue"}: \[Bug\]: Nondeterminism in SVG clipPath element id attributes - `4568`{.interpreted-text role="ghissue"}: Add `fmt_r` and `fmt_theta` methods to polar axes - `28105`{.interpreted-text role="ghissue"}: \[Bug\]: Setting norm by string doesn\'t work for hexbin - `28142`{.interpreted-text role="ghissue"}: \[ENH\]: Add fill between support for 3D plots - `28344`{.interpreted-text role="ghissue"}: \[Bug\]: subfigures are added in column major order - `28212`{.interpreted-text role="ghissue"}: \[Bug\]: Matplotlib not work with MiKTeX. - `28288`{.interpreted-text role="ghissue"}: \[ENH\]: Natural 3D rotation with mouse - `28180`{.interpreted-text role="ghissue"}: \[Bug\]: mathtext should distinguish between unary and binary minus - `26150`{.interpreted-text role="ghissue"}: \[Bug\]: Savefig slow with subplots - `28310`{.interpreted-text role="ghissue"}: \[Bug\]: orientation indication shows up late in mplot3d, and then lingers - `16263`{.interpreted-text role="ghissue"}: Apply NEP29 (time-limited support) to IPython - `28192`{.interpreted-text role="ghissue"}: \[MNT\]: Essential build requirements not included in dev-requirements - `27978`{.interpreted-text role="ghissue"}: \[Bug\]: strange behaviour when redefining figure size - `13435`{.interpreted-text role="ghissue"}: boxplot/violinplot orientation-setting API - `28199`{.interpreted-text role="ghissue"}: \[MNT\]: Misleading function name `Poly3DCollection.get_vector()` - `26892`{.interpreted-text role="ghissue"}: \[Bug\]: PGF font size mismatch between measurement and output - `28016`{.interpreted-text role="ghissue"}: \[Bug\]: Unexpected ylim of stairs with baseline=None - `28114`{.interpreted-text role="ghissue"}: \[Bug\]: mpl.colormaps\[ \"Grays\" \].name is \"Greys\", not \"Grays\" - `18045`{.interpreted-text role="ghissue"}: Cannot access hexbin data when `xscale='log'` and `yscale='log'` are set. - `27820`{.interpreted-text role="ghissue"}: \[Bug\]: Logscale Axis + NonUniformImage + GUI move tool = Distortion - `28047`{.interpreted-text role="ghissue"}: \[Bug\]: plt.barbs is a command that cannot be passed in a c parameter by parameter name, but can be passed in the form of a positional parameter - `23400`{.interpreted-text role="ghissue"}: Only upload failed images on failure - `26752`{.interpreted-text role="ghissue"}: \[Bug\]: `ax.stairs()` creates inaccurate `fill` for the plot - `21817`{.interpreted-text role="ghissue"}: \[Doc/Dev\]: style guide claims \"object oriented\" is verboten. --- # GitHub statistics for 3.10.1 (Feb 27, 2025) {#github-stats-3_10_1} GitHub statistics for 2024/12/14 (tag: v3.10.0) - 2025/02/27 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 14 issues and merged 107 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/98?closed=1) The following 28 authors contributed 241 commits. - Anselm Hahn - Antony Lee - Ben Greiner - Chaoyi Hu - Christine P. Chai - dependabot\[bot\] - Elliott Sales de Andrade - G.D. McBain - Greg Lucas - hannah - hu-xiaonan - Khushi_29 - Khushikela29 - KIU Shueng Chuan - Kyle Martin - Kyle Sunden - Lumberbot (aka Jack) - Manthan Nagvekar - musvaage - Nathan G. Wiseman - Oscar Gustafsson - Owl - Ruth Comer - saikarna913 - Scott Shambaugh - Thomas A Caswell - Tim Hoffmann - Trygve Magnus Ræder GitHub issues and pull requests: Pull Requests (107): - `29682`{.interpreted-text role="ghpull"}: Backport PR #29680 on branch v3.10.x (DOC: fix the bug of examplesevent_handling) - `29683`{.interpreted-text role="ghpull"}: Backport PR #29670 on branch v3.10.x (DOC: change marginal scatter plot to subplot_mosaic) - `29680`{.interpreted-text role="ghpull"}: DOC: fix the bug of examplesevent_handling - `29676`{.interpreted-text role="ghpull"}: Backport PR #29666 on branch v3.10.x (DOC: Revising the Figure Legend Demo Example) - `29675`{.interpreted-text role="ghpull"}: Backport PR #29662 on branch v3.10.x (DOC: Move Colorbar parameters to \_\_init\_\_) - `29662`{.interpreted-text role="ghpull"}: DOC: Move Colorbar parameters to \_\_init\_\_ - `29668`{.interpreted-text role="ghpull"}: Backport PR #29667 on branch v3.10.x (DOC: remove redundant gridspec from example) - `29664`{.interpreted-text role="ghpull"}: Backport PR #29642 on branch v3.10.x (DOC: Add docstrings to get_usetex and set_usetex in ticker.py) - `29663`{.interpreted-text role="ghpull"}: Backport PR #29075 on branch v3.10.x (Add xaxis and yaxis attributes to Axes docs) - `29642`{.interpreted-text role="ghpull"}: DOC: Add docstrings to get_usetex and set_usetex in ticker.py - `29661`{.interpreted-text role="ghpull"}: Backport PR #29652 on branch v3.10.x (Reorder kwonly kwargs in Colorbar & related docs.) - `29652`{.interpreted-text role="ghpull"}: Reorder kwonly kwargs in Colorbar & related docs. - `29075`{.interpreted-text role="ghpull"}: Add xaxis and yaxis attributes to Axes docs - `29656`{.interpreted-text role="ghpull"}: Backport PR #28437 on branch v3.10.x (Respect array alpha with interpolation_stage=\'rgba\' in \_Imagebase::\_make_image) - `29448`{.interpreted-text role="ghpull"}: Backport PR #29362 on branch v3.10.0-doc (TYP: semantics of enums in stub files changed) - `28437`{.interpreted-text role="ghpull"}: Respect array alpha with interpolation_stage=\'rgba\' in \_Imagebase::\_make_image - `29651`{.interpreted-text role="ghpull"}: Backport PR #29650 on branch v3.10.x (Copy-edit \"interactive figures & async programming\" guide.) - `29650`{.interpreted-text role="ghpull"}: Copy-edit \"interactive figures & async programming\" guide. - `29633`{.interpreted-text role="ghpull"}: Backport PR #29631 on branch v3.10.x (Add inline notebook to test data) - `29631`{.interpreted-text role="ghpull"}: Add inline notebook to test data - `29627`{.interpreted-text role="ghpull"}: Backport PR #29617 on branch v3.10.x (DOC: Add docstrings to matplotlib.cbook.GrouperView) - `29617`{.interpreted-text role="ghpull"}: DOC: Add docstrings to matplotlib.cbook.GrouperView - `29625`{.interpreted-text role="ghpull"}: Backport PR #29622 on branch v3.10.x (DOC: Move \"Infinite lines\" example from section \"pyplot\" to \"Lines, bars and markers) - `29623`{.interpreted-text role="ghpull"}: Backport PR #29621 on branch v3.10.x (DOC: Cleanup text rotation in data coordinates example) - `29619`{.interpreted-text role="ghpull"}: Backport PR #29616 on branch v3.10.x (FIX: Fix unit example so that we can unpin numpy\<2.1) - `29616`{.interpreted-text role="ghpull"}: FIX: Fix unit example so that we can unpin numpy\<2.1 - `29611`{.interpreted-text role="ghpull"}: Backport PR #29608 on branch v3.10.x (Remove md5 usage to prevent issues on FIPS enabled systems (closes #29603)) - `29608`{.interpreted-text role="ghpull"}: Remove md5 usage to prevent issues on FIPS enabled systems (closes #29603) - `29609`{.interpreted-text role="ghpull"}: Backport PR #29607 on branch v3.10.x (Correct doc for axvline arg x which sets x not y) - `29604`{.interpreted-text role="ghpull"}: Backport PR #29601 on branch v3.10.x (DOC: Duplicate categorical values are mapped to the same position) - `29598`{.interpreted-text role="ghpull"}: Backport PR #29597 on branch v3.10.x (Fix typo in deprecation notes for 3.10.0) - `29591`{.interpreted-text role="ghpull"}: Backport PR #29585 on branch v3.10.x (DOC: Document that tight_layout may not converge) - `29585`{.interpreted-text role="ghpull"}: DOC: Document that tight_layout may not converge - `29587`{.interpreted-text role="ghpull"}: Backport PR #25801 on branch v3.10.x (Remove some examples from Userdemo) - `29577`{.interpreted-text role="ghpull"}: Backport PR #29576 on branch v3.10.x (Remove documentation for no-longer existent ContourSet attributes.) - `29576`{.interpreted-text role="ghpull"}: Remove documentation for no-longer existent ContourSet attributes. - `29530`{.interpreted-text role="ghpull"}: Bump the actions group with 5 updates - `29564`{.interpreted-text role="ghpull"}: Backport PR #29563 on branch v3.10.x (DOC: add color sequences reference example) - `29563`{.interpreted-text role="ghpull"}: DOC: add color sequences reference example - `29557`{.interpreted-text role="ghpull"}: Backport PR #29518: TST: Increase tolerance on more arches - `29555`{.interpreted-text role="ghpull"}: Backport PR #29546 on branch v3.10.x (FIX: pyplot.matshow figure handling) - `29546`{.interpreted-text role="ghpull"}: FIX: pyplot.matshow figure handling - `29518`{.interpreted-text role="ghpull"}: TST: Increase tolerance on more arches - `29547`{.interpreted-text role="ghpull"}: Backport PR #29543 on branch v3.10.x (DOC: Minor improvement on broken_barh()) - `29538`{.interpreted-text role="ghpull"}: Backport PR #29536 on branch v3.10.x (Fix typo in solarized example plot.) - `29531`{.interpreted-text role="ghpull"}: Backport PR #29520 on branch v3.10.x (FIX: Correct variable name from \_frame to \_frames in PillowWriter class) - `29520`{.interpreted-text role="ghpull"}: FIX: Correct variable name from \_frame to \_frames in PillowWriter class - `29521`{.interpreted-text role="ghpull"}: Backport PR #29509 on branch v3.10.x (MNT: Discourage arrow()) - `29509`{.interpreted-text role="ghpull"}: MNT: Discourage arrow() - `29514`{.interpreted-text role="ghpull"}: Backport PR #29511 on branch v3.10.x (DOC: Document the behavior of bar() for categorical x data) - `29513`{.interpreted-text role="ghpull"}: Backport PR #29471 on branch v3.10.x (Fix subplot docs) - `29511`{.interpreted-text role="ghpull"}: DOC: Document the behavior of bar() for categorical x data - `29471`{.interpreted-text role="ghpull"}: Fix subplot docs - `29500`{.interpreted-text role="ghpull"}: Backport PR #29478 on branch v3.10.x (DOC: Added blurb for colorizer objects in what\'s new for 3.10) - `29498`{.interpreted-text role="ghpull"}: Backport PR #29488 on branch v3.10.x (DOC: Update broken_barh example) - `29490`{.interpreted-text role="ghpull"}: Backport PR #29476 on branch v3.10.x (ci: Enable native ARM builders for wheels) - `29476`{.interpreted-text role="ghpull"}: ci: Enable native ARM builders for wheels - `29462`{.interpreted-text role="ghpull"}: Backport PR #29404 on branch v3.10.x (DOC: scales - built in options and custom scale usefulness) - `29459`{.interpreted-text role="ghpull"}: Backport PR #29456 on branch v3.10.x (DOC: Fix type descriptions in fill_between docstring) - `29404`{.interpreted-text role="ghpull"}: DOC: scales - built in options and custom scale usefulness - `29458`{.interpreted-text role="ghpull"}: Backport PR #29457 on branch v3.10.x (DOC: Use float instead for scalar for type descriptions in docstrings) - `29456`{.interpreted-text role="ghpull"}: DOC: Fix type descriptions in fill_between docstring - `29457`{.interpreted-text role="ghpull"}: DOC: Use float instead for scalar for type descriptions in docstrings - `29452`{.interpreted-text role="ghpull"}: Backport PR #29411 on branch v3.10.x (fix #29410 Modifying Axes\' position also alters the original Bbox object used for initialization) - `29411`{.interpreted-text role="ghpull"}: fix #29410 Modifying Axes\' position also alters the original Bbox object used for initialization - `29451`{.interpreted-text role="ghpull"}: Backport PR #29449 on branch v3.10.x (ci: Install libnotify4 on all Ubuntu) - `29449`{.interpreted-text role="ghpull"}: ci: Install libnotify4 on all Ubuntu - `29444`{.interpreted-text role="ghpull"}: Backport PR #29442 on branch v3.10.x (DOC: put section headings in 3.10 what\'s new) - `29436`{.interpreted-text role="ghpull"}: Backport PR #29407 on branch v3.10.x (DOC: Improve log scale example) - `29432`{.interpreted-text role="ghpull"}: Backport PR #29431 on branch v3.10.x (ft2font: Split named instance count from style flags) - `29431`{.interpreted-text role="ghpull"}: ft2font: Split named instance count from style flags - `29423`{.interpreted-text role="ghpull"}: Backport PR #29130 on branch v3.10.x (Raise warning if both c and facecolors are used in scatter plot (\... and related improvements in the test suite).) - `29420`{.interpreted-text role="ghpull"}: Backport PR #29406 on branch v3.10.x (DOC: Update scales overview) - `29417`{.interpreted-text role="ghpull"}: Backport PR #29409 on branch v3.10.x (Fixed test case(test_axes.py) failing on ppc64le) - `29416`{.interpreted-text role="ghpull"}: Backport PR #29382 on branch v3.10.x (Fix title position for polar plots) - `29382`{.interpreted-text role="ghpull"}: Fix title position for polar plots - `29412`{.interpreted-text role="ghpull"}: Backport PR #29363 on branch v3.10.x (FIX: Add version gate to GTK4 calls when necessary) - `29409`{.interpreted-text role="ghpull"}: Fixed test case(test_axes.py) failing on ppc64le - `29363`{.interpreted-text role="ghpull"}: FIX: Add version gate to GTK4 calls when necessary - `29408`{.interpreted-text role="ghpull"}: Backport PR #29401 on branch v3.10.x (FIX: add errorbars with `add_container`) - `29401`{.interpreted-text role="ghpull"}: FIX: add errorbars with `add_container` - `29130`{.interpreted-text role="ghpull"}: Raise warning if both c and facecolors are used in scatter plot (\... and related improvements in the test suite). - `29390`{.interpreted-text role="ghpull"}: Backport PR #29389 on branch v3.10.x (DOC: Minor improvements on VPacker, HPacker, PaddedBox docs) - `29389`{.interpreted-text role="ghpull"}: DOC: Minor improvements on VPacker, HPacker, PaddedBox docs - `29371`{.interpreted-text role="ghpull"}: Backport PR #29353 on branch v3.10.x (DOC: Improve module docs of matplotlib.scale) - `29361`{.interpreted-text role="ghpull"}: Backport PR #29355 on branch v3.10.x (Add QtCore.Slot() decorations to FigureCanvasQT) - `29369`{.interpreted-text role="ghpull"}: Backport PR #29362 on branch v3.10.x (TYP: semantics of enums in stub files changed) - `29353`{.interpreted-text role="ghpull"}: DOC: Improve module docs of matplotlib.scale - `29362`{.interpreted-text role="ghpull"}: TYP: semantics of enums in stub files changed - `29365`{.interpreted-text role="ghpull"}: Backport PR #29364 on branch v3.10.x (fix typo) - `29366`{.interpreted-text role="ghpull"}: Backport PR #29347 on branch v3.10.x (DOC: Explain parameters linthresh and linscale of symlog scale) - `29364`{.interpreted-text role="ghpull"}: fix typo - `29355`{.interpreted-text role="ghpull"}: Add QtCore.Slot() decorations to FigureCanvasQT - `29351`{.interpreted-text role="ghpull"}: Backport PR #29348 on branch v3.10.x (DOC: Cleanup scales examples) - `29336`{.interpreted-text role="ghpull"}: Backport PR #29328 on branch v3.10.x (Bump github/codeql-action from 3.27.6 to 3.27.9 in the actions group) - `29328`{.interpreted-text role="ghpull"}: Bump github/codeql-action from 3.27.6 to 3.27.9 in the actions group - `29330`{.interpreted-text role="ghpull"}: Backport PR #29321 on branch v3.10.x (DOC: List min. Python version for Matplotlib 3.10) - `29324`{.interpreted-text role="ghpull"}: Backport PR #29258 on branch v3.10.x (Adding font Size as default parameter) - `29326`{.interpreted-text role="ghpull"}: Backport PR #29323 on branch v3.10.x (DOC: Don\'t put quotes around coordinate system names) - `29323`{.interpreted-text role="ghpull"}: DOC: Don\'t put quotes around coordinate system names - `29258`{.interpreted-text role="ghpull"}: Adding font Size as default parameter - `29320`{.interpreted-text role="ghpull"}: Backport PR #29317 on branch v3.10.x (FIX: pass renderer through `_auto_legend_data`) - `29317`{.interpreted-text role="ghpull"}: FIX: pass renderer through `_auto_legend_data` - `29315`{.interpreted-text role="ghpull"}: Backport PR #29314 on branch v3.10.x (DOC: fix footnote in choosing colormaps guide) - `29309`{.interpreted-text role="ghpull"}: Backport PR #29308 on branch v3.10.x (Update cibuildwheel workflow) - `29310`{.interpreted-text role="ghpull"}: Backport PR #29292 on branch v3.10.x (Update dependencies.rst) - `29308`{.interpreted-text role="ghpull"}: Update cibuildwheel workflow Issues (14): - `28382`{.interpreted-text role="ghissue"}: \[Bug\]: interpolation_stage=\"rgba\" does not respect array-alpha - `28780`{.interpreted-text role="ghissue"}: Doc build fails with numpy\>=2.1.0 - `29603`{.interpreted-text role="ghissue"}: \[Bug\]: Setting `text.usetex=True` in `pyplot.rcParams` Raises FIPS Compliance Errors - `29575`{.interpreted-text role="ghissue"}: \[Doc\]: QuadContourSet does not contain a collections attribute like stated in the manual - `29519`{.interpreted-text role="ghissue"}: \[Bug\]: \'PillowWriter\' object has no attribute \'\_frame\' shouldn\'t be \'\_frames\'? - `29507`{.interpreted-text role="ghissue"}: \[Bug\]: Duplicating the labels in the `height`/`width` argument in `barh()`/`bar` leads to undrawn bars - `29447`{.interpreted-text role="ghissue"}: \[Doc\]: `subplot` behavior is not same as the doc reads in 3.10(stable) - `29410`{.interpreted-text role="ghissue"}: \[Bug\]: Modifying Axes\' position also alters the original Bbox object used for initialization - `29396`{.interpreted-text role="ghissue"}: \[Bug\]: Style flag errors trying to save figures as PDF with font Inter - `29381`{.interpreted-text role="ghissue"}: \[Bug\]: title position incorrect for polar plot - `29350`{.interpreted-text role="ghissue"}: \[Bug\]: Matplotlib causes segmentation fault when hovering mouse over graph - `25274`{.interpreted-text role="ghissue"}: \[Bug\]: .remove() on ErrorbarContainer object does not remove the corresponding item from the legend - `29202`{.interpreted-text role="ghissue"}: \[Bug\]: `fontsize` in tables not working - `29301`{.interpreted-text role="ghissue"}: \[Bug\]: Blank EPS output with legend and annotate --- # GitHub statistics for 3.10.3 (May 08, 2025) {#github-stats_3-10-3} GitHub statistics for 2025/02/27 (tag: v3.10.1) - 2025/05/08 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 16 issues and merged 78 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/101?closed=1) The following 28 authors contributed 128 commits. - Alexandra Khoo - Antony Lee - Carlos Ramos Carreño - David Lowry-Duda - David Stansby - DerWeh - Elliott Sales de Andrade - guillermodotn - hannah - Hassan Kibirige - Ian Thomas - James Addison - Jody Klymak - Kyle Sunden - Marten H. van Kerkwijk - Marten Henric van Kerkwijk - martincornejo - Mateusz Sokół - Nicolai Weitkemper - Oscar Gustafsson - Praful Gulani - prafulgulani555 - Qian Zhang - Raphael Erik Hviding - Ruth Comer - Thomas A Caswell - Tim Hoffmann - Weh Andreas GitHub issues and pull requests: Pull Requests (78): - `30018`{.interpreted-text role="ghpull"}: Backport PR #29907 on branch v3.10.x (Ensure text metric calculation always uses the text cache) - `30010`{.interpreted-text role="ghpull"}: Backport PR #29992 on v3.10.x: Update pinned oldest win image on azure - `29992`{.interpreted-text role="ghpull"}: Update pinned oldest win image on azure - `29867`{.interpreted-text role="ghpull"}: Backport PR #29827 on branch v3.10.x (TST: Remove unnecessary test images) - `30002`{.interpreted-text role="ghpull"}: Backport PR #29673 on branch v3.10.x (DOC: document the issues with overlaying new mpl on old mpl) - `29673`{.interpreted-text role="ghpull"}: DOC: document the issues with overlaying new mpl on old mpl - `29999`{.interpreted-text role="ghpull"}: Backport PR #29997 on branch v3.10.x (BLD: Ensure meson.build has the right version of Python) - `29997`{.interpreted-text role="ghpull"}: BLD: Ensure meson.build has the right version of Python - `29996`{.interpreted-text role="ghpull"}: Backport PR #29995 on branch v3.10.x (Fix typo: missing singlequote in unrecognized backend exception) - `29995`{.interpreted-text role="ghpull"}: Fix typo: missing singlequote in unrecognized backend exception - `29990`{.interpreted-text role="ghpull"}: Backport PR #29789 on branch v3.10.x (Improve layout of cheatsheets in sidebar) - `29987`{.interpreted-text role="ghpull"}: Backport PR #29370 on branch v3.10.x (DOC: Improve NonUniformImage docs) - `29370`{.interpreted-text role="ghpull"}: DOC: Improve NonUniformImage docs - `29983`{.interpreted-text role="ghpull"}: Backport PR #29975 on branch v3.10.x (DOC: correct signature for animation update function in rain example) - `29974`{.interpreted-text role="ghpull"}: Backport PR #29970 on branch v3.10.x (TST: Make refcount tests more resilient to Python changes) - `29975`{.interpreted-text role="ghpull"}: DOC: correct signature for animation update function in rain example - `29980`{.interpreted-text role="ghpull"}: Backport PR #29979 on branch v3.10.x (Fix typos: horizonatal -\> horizontal) - `29979`{.interpreted-text role="ghpull"}: Fix typos: horizonatal -\> horizontal - `29970`{.interpreted-text role="ghpull"}: TST: Make refcount tests more resilient to Python changes - `29969`{.interpreted-text role="ghpull"}: Backport PR #29965 on branch v3.10.x (Document Axes.spines) - `29965`{.interpreted-text role="ghpull"}: Document Axes.spines - `29949`{.interpreted-text role="ghpull"}: Backport PR #29796 on branch v3.10.x: ci: rotate soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner out of roster - `29901`{.interpreted-text role="ghpull"}: Backport PR #29872 on branch v3.10.x (TST: Use placeholders for text in layout tests) - `29933`{.interpreted-text role="ghpull"}: Backport PR #29931 on branch v3.10.x (Allow Python native sequences in Matplotlib `imsave()`.) - `29943`{.interpreted-text role="ghpull"}: Fix doc build on 3.10.x - `29940`{.interpreted-text role="ghpull"}: Backport PR #29919 on branch v3.10.x (Handle MOVETO\'s, CLOSEPOLY\'s and empty paths in Path.interpolated) - `29919`{.interpreted-text role="ghpull"}: Handle MOVETO\'s, CLOSEPOLY\'s and empty paths in Path.interpolated - `29908`{.interpreted-text role="ghpull"}: TST: Use text placeholders for empty legends - `29931`{.interpreted-text role="ghpull"}: Allow Python native sequences in Matplotlib `imsave()`. - `29932`{.interpreted-text role="ghpull"}: Backport PR #29920 on branch v3.10.x (Allow `None` in set_prop_cycle (in type hints)) - `29920`{.interpreted-text role="ghpull"}: Allow `None` in set_prop_cycle (in type hints) - `29927`{.interpreted-text role="ghpull"}: Backport PR #29897 on branch v3.10.x (BUG: ensure that errorbar does not error on masked negative errors.) - `29930`{.interpreted-text role="ghpull"}: Backport PR #29929 on branch v3.10.x (Correct rightparen typo) - `29929`{.interpreted-text role="ghpull"}: Correct rightparen typo - `29897`{.interpreted-text role="ghpull"}: BUG: ensure that errorbar does not error on masked negative errors. - `29907`{.interpreted-text role="ghpull"}: Ensure text metric calculation always uses the text cache - `29902`{.interpreted-text role="ghpull"}: Backport PR #29899 on branch v3.10.x (\[doc\] minimally document what basic units is doing) - `29900`{.interpreted-text role="ghpull"}: Backport PR #29896 on branch v3.10.x (Change `.T` to `.transpose()` in `_reshape_2D`) - `29872`{.interpreted-text role="ghpull"}: TST: Use placeholders for text in layout tests - `29896`{.interpreted-text role="ghpull"}: Change `.T` to `.transpose()` in `_reshape_2D` - `29888`{.interpreted-text role="ghpull"}: Backport PR #29803 on branch v3.10.x (DOC: Improve FancyArrowPatch docstring) - `29880`{.interpreted-text role="ghpull"}: Backport PR #29853 on branch v3.10.x (Update lib/matplotlib/stackplot.py) - `29853`{.interpreted-text role="ghpull"}: Update lib/matplotlib/stackplot.py - `29868`{.interpreted-text role="ghpull"}: Backport PR #29834 on branch v3.10.x (TST: pin flake8) - `29827`{.interpreted-text role="ghpull"}: TST: Remove unnecessary test images - `29861`{.interpreted-text role="ghpull"}: Backport PR #29773 on branch v3.10.x (DOC: Improve interactive figures guide / Blocking input) - `29859`{.interpreted-text role="ghpull"}: Backport PR #29545 on branch v3.10.x (DOC: correctly specify return type of `figaspect`) - `29545`{.interpreted-text role="ghpull"}: DOC: correctly specify return type of `figaspect` - `29858`{.interpreted-text role="ghpull"}: Backport PR #29842 on branch v3.10.x (Don\'t drag draggables on scroll events) - `29842`{.interpreted-text role="ghpull"}: Don\'t drag draggables on scroll events - `29848`{.interpreted-text role="ghpull"}: Backport PR #29839 on branch v3.10.x (Improve docs regarding plt.close().) - `29839`{.interpreted-text role="ghpull"}: Improve docs regarding plt.close(). - `29818`{.interpreted-text role="ghpull"}: Backport PR #29801 on branch v3.10.x (DOC: Slightly further improve arrowstyle demo) - `29814`{.interpreted-text role="ghpull"}: Backport PR #29552 on branch v3.10.x (Bug Fix: Normalize kwargs for Histogram) - `29792`{.interpreted-text role="ghpull"}: Backport PR #29770 on branch v3.10.x (MNT: Move test for old ipython behavior to minver tests) - `29750`{.interpreted-text role="ghpull"}: Backport PR #29748 on branch v3.10.x (Fix PyGObject version pinning in macOS tests) - `29754`{.interpreted-text role="ghpull"}: Backport PR #29721 on branch v3.10.x (FIX: pyplot auto-backend detection case-sensitivity fixup) - `29786`{.interpreted-text role="ghpull"}: Backport PR #29755 on branch v3.10.x (DOC: Simplify annotation arrow style reference) - `29784`{.interpreted-text role="ghpull"}: Backport PR #29781 on branch v3.10.x (Fix escaping of nulls and \"0\" in default filenames.) - `29781`{.interpreted-text role="ghpull"}: Fix escaping of nulls and \"0\" in default filenames. - `29771`{.interpreted-text role="ghpull"}: Backport PR #29752 on branch v3.10.x (DOC: Add install instructions for pixi and uv) - `29768`{.interpreted-text role="ghpull"}: Backport PR #29767 on branch v3.10.x (Add description to logit_demo.py script) - `29721`{.interpreted-text role="ghpull"}: FIX: pyplot auto-backend detection case-sensitivity fixup - `29737`{.interpreted-text role="ghpull"}: Backport PR #29734 on branch v3.10.x (ci: MacOS 14: temporarily upper-bound the \'PyGObject\' Python package version) - `29735`{.interpreted-text role="ghpull"}: Backport PR #29719 on branch v3.10.x (Fix passing singleton sequence-type styles to hist) - `29719`{.interpreted-text role="ghpull"}: Fix passing singleton sequence-type styles to hist - `29730`{.interpreted-text role="ghpull"}: Backport PR #29724 on branch v3.10.x (Fix SubplotSpec.get_gridspec type hint) - `29724`{.interpreted-text role="ghpull"}: Fix SubplotSpec.get_gridspec type hint - `29727`{.interpreted-text role="ghpull"}: Backport PR #29726 on branch v3.10.x (Add reference tag to Hatch style reference) - `29709`{.interpreted-text role="ghpull"}: Backport PR #29708 on branch v3.10.x (MNT: correct version in plotting method deprecation warnings) - `29708`{.interpreted-text role="ghpull"}: MNT: correct version in plotting method deprecation warnings - `29692`{.interpreted-text role="ghpull"}: Backport PR #29689 on branch v3.10.x (Fix alt and caption handling in Sphinx directives) - `29693`{.interpreted-text role="ghpull"}: Backport PR #29590 on branch v3.10.x (Blocked set_clim() callbacks to prevent inconsistent state (#29522)) - `29590`{.interpreted-text role="ghpull"}: Blocked set_clim() callbacks to prevent inconsistent state (#29522) - `29689`{.interpreted-text role="ghpull"}: Fix alt and caption handling in Sphinx directives - `29691`{.interpreted-text role="ghpull"}: Backport PR #29584 on branch v3.10.x (DOC: Recommend constrained_layout over tight_layout) - `29584`{.interpreted-text role="ghpull"}: DOC: Recommend constrained_layout over tight_layout - `29552`{.interpreted-text role="ghpull"}: Bug Fix: Normalize kwargs for Histogram Issues (16): - `29183`{.interpreted-text role="ghissue"}: \[Bug\]: I give an RGB image to imsave but I don\'t have the right color map! - `29797`{.interpreted-text role="ghissue"}: \[MNT\]: Flaky Windows_py31x tests on Azure Pipelines - `26827`{.interpreted-text role="ghissue"}: \[Bug\]: ImportError when using Matplotlib v3.8.0 in Python package tests - `29964`{.interpreted-text role="ghissue"}: \[Doc\]: object description for \"spines\"of matplot.axes.Axes not found - `29917`{.interpreted-text role="ghissue"}: \[Bug\]: Contour plots using mollweide-projection - `29540`{.interpreted-text role="ghissue"}: \[Bug\]: matshow(\..., fignum=\...) broken - `29142`{.interpreted-text role="ghissue"}: \[MNT\]: Draggable legend gets stuck on cursor after scroll event - `29857`{.interpreted-text role="ghissue"}: \[Bug\]: Unexpected behavior of the line style specifiers in the histogram method - `29766`{.interpreted-text role="ghissue"}: \[MNT\]: ci: ubuntu-20.04 GitHub Actions runner will soon be unmaintained - `29812`{.interpreted-text role="ghissue"}: \[MNT\]: Backport request for #29552 to 3.10.x - `29779`{.interpreted-text role="ghissue"}: \[Bug\]: get_default_filename removes \'0\' from file name instead of \'0\' from window title - `29713`{.interpreted-text role="ghissue"}: \[Bug\]: Matplotlib selects TkAgg backend on LXC containers - `29717`{.interpreted-text role="ghissue"}: \[Bug\]: Using a linestyle tuple with a histogram crashes with matplotlib 3.10 - `29522`{.interpreted-text role="ghissue"}: \[Bug\]: Image color limits not correctly updated with set_clim() IFF color bar present AND new norm.vmin \> old norm.vmax - `17339`{.interpreted-text role="ghissue"}: Clarify that constrained_layout and tight_layout conflict with each other - `28884`{.interpreted-text role="ghissue"}: \[ENH\]: Expand `hist()` signature to support aliases and plural kwargs --- # GitHub statistics for 3.10.5 (Jul 31, 2025) {#github-stats-3_10_5} GitHub statistics for 2024/12/14 (tag: v3.10.0) - 2025/07/31 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 18 issues and merged 67 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/102?closed=1) The following 36 authors contributed 371 commits. - Antony Lee - Brian Christian - chrisjbillington - Christine P. Chai - Clément Robert - David Stansby - dependabot\[bot\] - Elliott Sales de Andrade - G.D. McBain - Greg Lucas - hannah - hu-xiaonan - Ian Thomas - ianlv - IdiotCoffee - Ines Cachola - Inês Cachola - Jody Klymak - Jouni K. Seppänen - Khushi_29 - Kyle Sunden - Lumberbot (aka Jack) - N R Navaneet - Nathan G. Wiseman - Oscar Gustafsson - Praful Gulani - Qian Zhang - Raphael Erik Hviding - Roman - Roman A - Ruth Comer - saikarna913 - Scott Shambaugh - Thomas A Caswell - Tim Hoffmann - Trygve Magnus Ræder GitHub issues and pull requests: Pull Requests (67): - `30357`{.interpreted-text role="ghpull"}: CIBW updates: fix pypy sections, update cibw version - `30356`{.interpreted-text role="ghpull"}: Manual Backport PR #30195 on branch v3.10.x (ci: Enable wheel builds on Python 3.14) - `30352`{.interpreted-text role="ghpull"}: Backport PR #28554 on branch v3.10.x (BLD: Enable wheels on Windows-on-ARM) - `30353`{.interpreted-text role="ghpull"}: Backport PR #30345 on branch v3.10.x (qt: Use better devicePixelRatio event to refresh scaling) - `30350`{.interpreted-text role="ghpull"}: Backport PR #30344 on branch v3.10.x (Support fractional HiDPI in GTK4 backend) - `30277`{.interpreted-text role="ghpull"}: Backport PR #30271 on branch v3.10.x (Reduce pause time in interactive timer test) - `30351`{.interpreted-text role="ghpull"}: Backport PR #30327 on branch v3.10.x (FIX Update Axes limits from Axes.add_collection(\... autolim=True)) - `30345`{.interpreted-text role="ghpull"}: qt: Use better devicePixelRatio event to refresh scaling - `28554`{.interpreted-text role="ghpull"}: BLD: Enable wheels on Windows-on-ARM - `30292`{.interpreted-text role="ghpull"}: Backport PR #30237: Add explicit `**options: Any` for `add_subplot` m... - `29935`{.interpreted-text role="ghpull"}: Backport PR #29908 on branch v3.10.x (TST: Use text placeholders for empty legends) - `30327`{.interpreted-text role="ghpull"}: FIX Update Axes limits from Axes.add_collection(\... autolim=True) - `30344`{.interpreted-text role="ghpull"}: Support fractional HiDPI in GTK4 backend - `30326`{.interpreted-text role="ghpull"}: Backport PR #30321 on branch v3.10.x (Fix type annotation for Axes.get_legend() to include None) - `30321`{.interpreted-text role="ghpull"}: Fix type annotation for Axes.get_legend() to include None - `30287`{.interpreted-text role="ghpull"}: Backport PR #30286 on branch v3.10.x (Fix whitespace in \_axes.py error message) - `30288`{.interpreted-text role="ghpull"}: Backport PR #30283 on branch v3.10.x (changed the FAQ link to point to the correct path) - `30293`{.interpreted-text role="ghpull"}: Backport PR #30289 on branch v3.10.x (DOC: Fix build with pybind11 3) - `30283`{.interpreted-text role="ghpull"}: changed the FAQ link to point to the correct path - `30286`{.interpreted-text role="ghpull"}: Fix whitespace in \_axes.py error message - `30271`{.interpreted-text role="ghpull"}: Reduce pause time in interactive timer test - `30269`{.interpreted-text role="ghpull"}: Backport PR #30186 on branch v3.10.x (Fix figure legend when drawing stackplots) - `30186`{.interpreted-text role="ghpull"}: Fix figure legend when drawing stackplots - `30268`{.interpreted-text role="ghpull"}: Backport PR #30233 on branch v3.10.x (Check that stem input is 1D) - `30233`{.interpreted-text role="ghpull"}: Check that stem input is 1D - `30259`{.interpreted-text role="ghpull"}: Backport PR #30256 on branch v3.10.x (Time out in \_get_executable_info) - `30256`{.interpreted-text role="ghpull"}: Time out in \_get_executable_info - `30237`{.interpreted-text role="ghpull"}: Add explicit `**options: Any` for `add_subplot` method - `30253`{.interpreted-text role="ghpull"}: Backport PR #30243 on branch v3.10.x (Fix FancyArrow rendering for zero-length arrows) - `30243`{.interpreted-text role="ghpull"}: Fix FancyArrow rendering for zero-length arrows - `30250`{.interpreted-text role="ghpull"}: Backport PR #30244 on branch v3.10.x (DOC: Recommend to use bare Figure instances for saving to file) - `30247`{.interpreted-text role="ghpull"}: Backport PR #30246 on branch v3.10.x (chore: remove redundant words in comment) - `30246`{.interpreted-text role="ghpull"}: chore: remove redundant words in comment - `30240`{.interpreted-text role="ghpull"}: Backport PR #30236 on branch v3.10.x (Copy-edit the docstring of AuxTransformBox.) - `30236`{.interpreted-text role="ghpull"}: Copy-edit the docstring of AuxTransformBox. - `30234`{.interpreted-text role="ghpull"}: Backport PR #30209 on branch v3.10.x (Clean up Qt socket notifier to avoid spurious interrupt handler calls) - `30209`{.interpreted-text role="ghpull"}: Clean up Qt socket notifier to avoid spurious interrupt handler calls - `30195`{.interpreted-text role="ghpull"}: ci: Enable wheel builds on Python 3.14 - `30229`{.interpreted-text role="ghpull"}: Backport PR #30221 on branch v3.10.x (BUG: fix future incompatibility with Pillow 13) - `30221`{.interpreted-text role="ghpull"}: BUG: fix future incompatibility with Pillow 13 - `30228`{.interpreted-text role="ghpull"}: Backport PR #30098 on branch v3.10.x (Fix label_outer in the presence of colorbars.) - `30227`{.interpreted-text role="ghpull"}: Backport PR #30223 on branch v3.10.x (Polar log scale: fix inner patch boundary and spine location) - `30098`{.interpreted-text role="ghpull"}: Fix label_outer in the presence of colorbars. - `30223`{.interpreted-text role="ghpull"}: Polar log scale: fix inner patch boundary and spine location - `30217`{.interpreted-text role="ghpull"}: Backport PR #30198 on branch v3.10.x (Implement Path.\_\_deepcopy\_\_ avoiding infinite recursion) - `30198`{.interpreted-text role="ghpull"}: Implement Path.\_\_deepcopy\_\_ avoiding infinite recursion - `30213`{.interpreted-text role="ghpull"}: Backport PR #30212 on branch v3.10.x (\[Doc\]: fix bug in release notes for matplotlib v3.5.0 and v3.7.0) - `30189`{.interpreted-text role="ghpull"}: Backport PR #30180 on branch v3.10.x (DOC: expand polar example) - `30167`{.interpreted-text role="ghpull"}: Backport PR #30162 on branch v3.10.x (TST: Fix runtime error checking NaN input to format_cursor_data) - `30162`{.interpreted-text role="ghpull"}: TST: Fix runtime error checking NaN input to format_cursor_data - `30146`{.interpreted-text role="ghpull"}: Backport PR #30144 on branch v3.10.x (js: Fix externally-controlled format strings) - `30144`{.interpreted-text role="ghpull"}: js: Fix externally-controlled format strings - `30140`{.interpreted-text role="ghpull"}: Backport PR #30118 on branch v3.10.x (CI: Skip jobs on forks) - `30120`{.interpreted-text role="ghpull"}: Backport PR #30114 on branch v3.10.x (Fix \_is_tensorflow_array.) - `30122`{.interpreted-text role="ghpull"}: Backport PR #30119 on branch v3.10.x (Add some types to \_mathtext.py) - `30119`{.interpreted-text role="ghpull"}: Add some types to \_mathtext.py - `30114`{.interpreted-text role="ghpull"}: Fix \_is_tensorflow_array. - `30106`{.interpreted-text role="ghpull"}: Backport PR #30089 on branch v3.10.x (FIX: fix submerged margins algorithm being applied twice) - `30089`{.interpreted-text role="ghpull"}: FIX: fix submerged margins algorithm being applied twice - `30101`{.interpreted-text role="ghpull"}: Backport PR #30096 on branch v3.10.x (Fix OffsetBox custom picker) - `30096`{.interpreted-text role="ghpull"}: Fix OffsetBox custom picker - `30081`{.interpreted-text role="ghpull"}: Backport PR #30079 on branch v3.10.x (FIX: cast legend handles to list) - `30079`{.interpreted-text role="ghpull"}: FIX: cast legend handles to list - `30057`{.interpreted-text role="ghpull"}: Backport PR #29895 on branch v3.10.x (The \'lines.markeredgecolor\' now doesn\'t interfere on the color of errorbar caps)\" - `29895`{.interpreted-text role="ghpull"}: The \'lines.markeredgecolor\' now doesn\'t interfere on the color of errorbar caps - `30033`{.interpreted-text role="ghpull"}: Backport PR #30029 on branch v3.10.x (Update diagram in subplots_adjust documentation to clarify parameters) Issues (18): - `30370`{.interpreted-text role="ghissue"}: \[Bug\]: matplotlib simple example fails in Python 3.14 - `30218`{.interpreted-text role="ghissue"}: \[Bug\]: Rendering on Wayland with fractional scaling looks bad - `30318`{.interpreted-text role="ghissue"}: \[Bug\]: type annotation of `Axes.get_legend()` misses `None` - `30169`{.interpreted-text role="ghissue"}: \[Doc\]: Incorrect FAQ Link on Tutorials Page - `30285`{.interpreted-text role="ghissue"}: \[Bug\]: Missing whitespace in \_axes.py error message - `30280`{.interpreted-text role="ghissue"}: \[Bug\]: Pillow 11.3 raises a deprecation warning when using TkAgg - `30158`{.interpreted-text role="ghissue"}: \[Bug\]: Stackplot in SubFigure raises when drawing Legend - `30216`{.interpreted-text role="ghissue"}: \[Bug\]: stem complaining about PyTorch\'s Tensor - `30242`{.interpreted-text role="ghissue"}: \[Bug\]: Cannot create empty FancyArrow (expired numpy deprecation) - `30249`{.interpreted-text role="ghissue"}: \[Bug\]: DeprecationWarning from Pillow 11.3.0 about \'mode\' parameter of PIL.Image.fromarray() - `29688`{.interpreted-text role="ghissue"}: \[Bug\]: \"Bad file descriptor\" raised repeatedly when plt.pause() interrupted in IPython - `27305`{.interpreted-text role="ghissue"}: \[Bug\]: Axes.label_outer() does not work when there is a colorbar - `30179`{.interpreted-text role="ghissue"}: \[Bug\]: Inner border is not rendered correctly when using log-scale and polar projection. - `29157`{.interpreted-text role="ghissue"}: FUTURE BUG: reconsider how we deep-copy path objects - `30152`{.interpreted-text role="ghissue"}: \[Bug\]: Test pipeline failure on windows - `30076`{.interpreted-text role="ghissue"}: \[Bug\]: Layout Managers are confused by complex arrangement of sub-figures and gridspec\'s - `30078`{.interpreted-text role="ghissue"}: \[Bug\]: legend no longer works with itertools.chain - `29780`{.interpreted-text role="ghissue"}: \[Bug\]: Setting \'lines.markeredgecolor\' affects color of errorbar caps. --- # GitHub statistics for 3.10.6 (Aug 29, 2025) {#github-stats-3_10_6} GitHub statistics for 2024/12/14 (tag: v3.10.0) - 2025/08/29 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 4 issues and merged 19 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/103?closed=1) The following 31 authors contributed 380 commits. - Alan Burlot - Antony Lee - Christine P. Chai - David Stansby - dependabot\[bot\] - Doron Behar - Elliott Sales de Andrade - G.D. McBain - Greg Lucas - hannah - hu-xiaonan - Ian Thomas - Inês Cachola - Jody Klymak - Jouni K. Seppänen - Khushi_29 - Kyle Sunden - Lumberbot (aka Jack) - N R Navaneet - Nathan G. Wiseman - Oscar Gustafsson - Praful Gulani - Qian Zhang - Raphael Erik Hviding - Roman - Ruth Comer - saikarna913 - Scott Shambaugh - Thomas A Caswell - Tim Hoffmann - Trygve Magnus Ræder GitHub issues and pull requests: Pull Requests (19): - `30487`{.interpreted-text role="ghpull"}: Backport PR #30484 on branch v3.10.x (FIX: be more cautious about checking widget size) - `30484`{.interpreted-text role="ghpull"}: FIX: be more cautious about checking widget size - `30481`{.interpreted-text role="ghpull"}: Backport PR #30394 on branch v3.10.x (ENH: Gracefully handle python-build-standalone ImportError with Tk) - `30477`{.interpreted-text role="ghpull"}: Backport PR #30476 on branch v3.10.x (ci: Remove cibuildwheel override for win_arm64/Py3.14) - `30394`{.interpreted-text role="ghpull"}: ENH: Gracefully handle python-build-standalone ImportError with Tk - `30476`{.interpreted-text role="ghpull"}: ci: Remove cibuildwheel override for win_arm64/Py3.14 - `30461`{.interpreted-text role="ghpull"}: Backport PR #30451 on branch v3.10.x (doc: factor out quick install tab for reuse) - `30448`{.interpreted-text role="ghpull"}: Backport PR #30412 on branch v3.10.x ({Check,Radio}Buttons: Improve docs of label_props) - `30412`{.interpreted-text role="ghpull"}: {Check,Radio}Buttons: Improve docs of label_props - `30445`{.interpreted-text role="ghpull"}: Backport PR #30444 on branch v3.10.x (Small correction of a typo in the galleries: axis instead of axes) - `30444`{.interpreted-text role="ghpull"}: Small correction of a typo in the galleries: axis instead of axes - `30430`{.interpreted-text role="ghpull"}: Backport PR #30426 on branch v3.10.x (Fix a race condition in TexManager.make_dvi.) - `30434`{.interpreted-text role="ghpull"}: Backport PR #30426: Fix a race condition in TexManager.make_dvi & make_png. - `30431`{.interpreted-text role="ghpull"}: Use pathlib in texmanager. - `30428`{.interpreted-text role="ghpull"}: Backport PR #30399 on branch v3.10.x (Qt: Fix HiDPI handling on X11/Windows) - `30426`{.interpreted-text role="ghpull"}: Fix a race condition in TexManager.make_dvi. - `30399`{.interpreted-text role="ghpull"}: Qt: Fix HiDPI handling on X11/Windows - `30415`{.interpreted-text role="ghpull"}: Backport PR #30414 on branch v3.10.x (DOC: update Cartopy url) - `30414`{.interpreted-text role="ghpull"}: DOC: update Cartopy url Issues (4): - `29618`{.interpreted-text role="ghissue"}: \[Bug\]: FigureCanvasQT is seemingly prematurely freed under certain conditions - `30390`{.interpreted-text role="ghissue"}: \[ENH\]: Gracefully handle python-build-standalone ImportError - `30420`{.interpreted-text role="ghissue"}: \[ENH\]: Support parallel plotting - `30386`{.interpreted-text role="ghissue"}: BUG: Qt hi-dpi regression on windows and X11 with mpl 3.10.5 --- ::: redirect-from /users/prev_whats_new/github_stats_3.2.0 ::: # GitHub statistics for 3.2.0 (Mar 04, 2020) {#github-stats-3-2-0} GitHub statistics for 2019/05/18 (tag: v3.1.0) - 2020/03/04 These lists are automatically generated, and may be incomplete or contain duplicates. We closed 125 issues and merged 839 pull requests. The full list can be seen [on GitHub](https://github.com/matplotlib/matplotlib/milestone/43?closed=1) The following 164 authors contributed 3455 commits. - Abhinav Sagar - Abhinuv Nitin Pitale - Adam Gomaa - Akshay Nair - Alex Rudy - Alexander Rudy - Antony Lee - Ao Liu (frankliuao) - Ardie Orden - Ashley Whetter - Ben Root - Benjamin Bengfort - Benjamin Congdon - Bharat123rox - Bingyao Liu - Brigitta Sipocz - Bruno Pagani - brut - Carsten - Carsten Schelp - chaoyi1 - Cho Yin Yong - Chris Barnes - Christer Jensen - Christian Brodbeck - Christoph Pohl - chuanzhu xu - Colin - Cong Ma - dabana - DanielMatu - David Chudzicki - David Stansby - Deng Tian - - djdt - donchanee - Dora Fraeman Caswell - Elan Ernest - Elliott Sales de Andrade - Emlyn Price - Eric Firing - Eric Wieser - Federico Ariza - Filipe Fernandes - fourpoints - fredrik-1 - Gazing - Greg Lucas - hannah - Harshal Prakash Patankar - Ian Hincks - Ian Thomas - ilopata1 - ImportanceOfBeingErnest - Jacobson Okoro - James A. Bednar - Jarrod Millman - Javad - jb-leger - Jean-Benoist Leger - jfbu - joaonsg - Jody Klymak - Joel Frederico - Johannes H. Jensen - Johnny Gill - Jonas Camillus Jeppesen - Jorge Moraleda - Joscha Reimer - Joseph Albert - Jouni K. Seppänen - Joy Bhalla - Juanjo Bazán - Julian Mehne - kolibril13 - krishna katyal - ksunden - Kyle Sunden - Larry Bradley - lepuchi - luftek - Maciej Dems - Maik Riechert - Marat K - Mark Wolf - Mark Wolfman - Matte - Matthias Bussonnier - Matthias Geier - MatthieuDartiailh - Max Chen - Max Humber - Max Shinn - MeeseeksMachine - Michael Droettboom - Mingkai Dong - MinRK - miquelastein - Molly Rossow - Nathan Goldbaum - nathan78906 - Nelle Varoquaux - Nick White - Nicolas Courtemanche - Nikita Kniazev - njwhite - O. Castany - Oliver Natt - Olivier - Om Sitapara - omsitapara23 - Oriol (Prodesk) - Oriol Abril - Patrick Feiring - Patrick Shriwise - PatrickFeiring - Paul - Paul Hobson - Paul Hoffman - Paul Ivanov - Peter Schutt - pharshalp - Phil Elson - Philippe Pinard - Rebecca W Perry - ResidentMario - Richard Ji-Cathriner - RoryIAngus - Ryan May - S. Fukuda - Samesh - Samesh Lakhotia - sasoripathos - SBCV - Sebastian Bullinger - Sergey Royz - Siddhesh Poyarekar - Simon Legner - SojiroFukuda - Steve Dower - Taras - Ted Drain - teddyrendahl - Thomas A Caswell - Thomas Hisch - Thomas Robitaille - Till Hoffmann - tillahoffmann - Tim Hoffmann - Tom Flannaghan - Travis CI - V. Armando Solé - Vincent L.M. Mazoyer - Viraj Mohile - Wafa Soofi - Warren Weckesser - y1thof - yeo - Yong Cho Yin - Yuya - Zhili (Jerry) Pan - zhoubecky - Zulko GitHub issues and pull requests: Pull Requests (839): - `16626`{.interpreted-text role="ghpull"}: Updated Readme + Setup.py for PyPa - `16627`{.interpreted-text role="ghpull"}: ci: Restore nuget install step on Azure for v3.2.x. - `16625`{.interpreted-text role="ghpull"}: v3.2.x: Make Azure use local FreeType. - `16622`{.interpreted-text role="ghpull"}: Backport PR #16613 on branch v3.2.x (Fix edge-case in preprocess_data, if label_namer is optional and unset.) - `16613`{.interpreted-text role="ghpull"}: Fix edge-case in preprocess_data, if label_namer is optional and unset. - `16612`{.interpreted-text role="ghpull"}: Backport PR #16605: CI: tweak the vm images we use on azure - `16611`{.interpreted-text role="ghpull"}: Backport PR #16585 on branch v3.2.x (Fix \_preprocess_data for Py3.9.) - `16605`{.interpreted-text role="ghpull"}: CI: tweak the vm images we use on azure - `16585`{.interpreted-text role="ghpull"}: Fix \_preprocess_data for Py3.9. - `16541`{.interpreted-text role="ghpull"}: Merge pull request #16404 from jklymak/fix-add-base-symlognorm - `16542`{.interpreted-text role="ghpull"}: Backport PR #16006: Ignore pos in StrCategoryFormatter.\_\_call\_\_ to di... - `16543`{.interpreted-text role="ghpull"}: Backport PR #16532: Document default value of save_count parameter in... - `16532`{.interpreted-text role="ghpull"}: Document default value of save_count parameter in FuncAnimation - `16526`{.interpreted-text role="ghpull"}: Backport PR #16480 on v.3.2.x: Re-phrase doc for bottom kwarg to hist - `16404`{.interpreted-text role="ghpull"}: FIX: add base kwarg to symlognor - `16518`{.interpreted-text role="ghpull"}: Backport PR #16502 on branch v3.2.x (Document theta getters/setters) - `16519`{.interpreted-text role="ghpull"}: Backport PR #16513 on branch v3.2.x (Add more FreeType tarball hashes.) - `16513`{.interpreted-text role="ghpull"}: Add more FreeType tarball hashes. - `16502`{.interpreted-text role="ghpull"}: Document theta getters/setters - `16506`{.interpreted-text role="ghpull"}: Backport PR #16505 on branch v3.2.x (Add link to blog to front page) - `16505`{.interpreted-text role="ghpull"}: Add link to blog to front page - `16480`{.interpreted-text role="ghpull"}: Re-phrase doc for bottom kwarg to hist - `16494`{.interpreted-text role="ghpull"}: Backport PR #16490 on branch v3.2.x (Fix some typos on the front page) - `16489`{.interpreted-text role="ghpull"}: Backport PR #16272 on branch v3.2.x (Move mplot3d autoregistration api changes to 3.2.) - `16490`{.interpreted-text role="ghpull"}: Fix some typos on the front page - `16465`{.interpreted-text role="ghpull"}: Backport PR #16450 on branch v3.2.x (Fix interaction between sticky_edges and shared axes.) - `16466`{.interpreted-text role="ghpull"}: Backport PR #16392: FIX colorbars for Norms that do not have a scale. - `16392`{.interpreted-text role="ghpull"}: FIX colorbars for Norms that do not have a scale. - `16450`{.interpreted-text role="ghpull"}: Fix interaction between sticky_edges and shared axes. - `16453`{.interpreted-text role="ghpull"}: Backport PR #16452 on branch v3.2.x (Don\'t make InvertedLogTransform inherit from deprecated base class.) - `16452`{.interpreted-text role="ghpull"}: Don\'t make InvertedLogTransform inherit from deprecated base class. - `16436`{.interpreted-text role="ghpull"}: Backport PR #16435 on branch v3.2.x (Reword intro to colors api docs.) - `16435`{.interpreted-text role="ghpull"}: Reword intro to colors api docs. - `16399`{.interpreted-text role="ghpull"}: Backport PR #16396 on branch v3.2.x (font_manager docs cleanup.) - `16396`{.interpreted-text role="ghpull"}: font_manager docs cleanup. - `16397`{.interpreted-text role="ghpull"}: Backport PR #16394 on branch v3.2.x (Mark inkscape 1.0 as unsupported (at least for now).) - `16394`{.interpreted-text role="ghpull"}: Mark inkscape 1.0 as unsupported (at least for now). - `16286`{.interpreted-text role="ghpull"}: Fix cbars for different norms - `16385`{.interpreted-text role="ghpull"}: Backport PR #16226 on branch v3.2.x: Reorganize intro section on main page - `16383`{.interpreted-text role="ghpull"}: Backport PR #16379 on branch v3.2.x (FIX: catch on message content, not module) - `16226`{.interpreted-text role="ghpull"}: Reorganize intro section on main page - `16364`{.interpreted-text role="ghpull"}: Backport PR #16344 on branch v3.2.x (Cast vmin/vmax to floats before nonsingular-expanding them.) - `16344`{.interpreted-text role="ghpull"}: Cast vmin/vmax to floats before nonsingular-expanding them. - `16360`{.interpreted-text role="ghpull"}: Backport PR #16347 on branch v3.2.x (FIX: catch warnings from pandas in cbook.\_check_1d) - `16357`{.interpreted-text role="ghpull"}: Backport PR #16330 on branch v3.2.x (Clearer signal handling) - `16349`{.interpreted-text role="ghpull"}: Backport PR #16255 on branch v3.2.x (Move version info to sidebar) - `16346`{.interpreted-text role="ghpull"}: Backport PR #16298 on branch v3.2.x (Don\'t recursively call draw_idle when updating artists at draw time.) - `16331`{.interpreted-text role="ghpull"}: Backport PR #16308 on branch v3.2.x (CI: Use Ubuntu Bionic compatible package names) - `16332`{.interpreted-text role="ghpull"}: Backport PR #16308 on v3.2.x: CI: Use Ubuntu Bionic compatible package names - `16324`{.interpreted-text role="ghpull"}: Backport PR #16323 on branch v3.2.x (Add sphinx doc for Axis.axis_name.) - `16325`{.interpreted-text role="ghpull"}: Backport PR #15462 on v3.2.x: Simplify azure setup. - `16323`{.interpreted-text role="ghpull"}: Add sphinx doc for Axis.axis_name. - `16321`{.interpreted-text role="ghpull"}: Backport PR #16311 on branch v3.2.x (don\'t override non-Python signal handlers) - `16308`{.interpreted-text role="ghpull"}: CI: Use Ubuntu Bionic compatible package names - `16306`{.interpreted-text role="ghpull"}: Backport PR #16300 on branch v3.2.x (Don\'t default to negative radii in polar plot.) - `16305`{.interpreted-text role="ghpull"}: Backport PR #16250 on branch v3.2.x (Fix zerolen intersect) - `16300`{.interpreted-text role="ghpull"}: Don\'t default to negative radii in polar plot. - `16278`{.interpreted-text role="ghpull"}: Backport PR #16273 on branch v3.2.x (DOC: Changing the spelling of co-ordinates.) - `16260`{.interpreted-text role="ghpull"}: Backport PR #16259 on branch v3.2.x (TST: something changed in pytest 5.3.3 that breaks our qt fixtures) - `16259`{.interpreted-text role="ghpull"}: TST: something changed in pytest 5.3.3 that breaks our qt fixtures - `16238`{.interpreted-text role="ghpull"}: Backport PR #16235 on branch v3.2.x (FIX: AttributeError in TimerBase.start) - `16211`{.interpreted-text role="ghpull"}: DOC: ValidateInterval was deprecated in 3.2, not 3.1 - `16224`{.interpreted-text role="ghpull"}: Backport PR #16223 on branch v3.2.x (Added DNA Features Viewer description + screenshot in docs/thirdparty/) - `16223`{.interpreted-text role="ghpull"}: Added DNA Features Viewer description + screenshot in docs/thirdparty/ - `16222`{.interpreted-text role="ghpull"}: Backport PR #16212 on branch v3.2.x (Fix deprecation from #13544) - `16212`{.interpreted-text role="ghpull"}: Fix deprecation from #13544 - `16207`{.interpreted-text role="ghpull"}: Backport PR #16189 on branch v3.2.x (MNT: set default canvas when un-pickling) - `16189`{.interpreted-text role="ghpull"}: MNT: set default canvas when un-pickling - `16179`{.interpreted-text role="ghpull"}: Backport PR #16175: FIX: ignore axes that aren\'t visible - `16175`{.interpreted-text role="ghpull"}: FIX: ignore axes that aren\'t visible - `16168`{.interpreted-text role="ghpull"}: Backport PR #16166 on branch v3.2.x (Add badge for citing 3.1.2) - `16148`{.interpreted-text role="ghpull"}: Backport PR #16128 on branch v3.2.x (CI: Do not use nbformat 5.0.0/5.0.1 for testing) - `16145`{.interpreted-text role="ghpull"}: Backport PR #16053 on branch v3.2.x (Fix v_interval setter) - `16128`{.interpreted-text role="ghpull"}: CI: Do not use nbformat 5.0.0/5.0.1 for testing - `16135`{.interpreted-text role="ghpull"}: Backport PR #16112 on branch v3.2.x (CI: Fail when failed to install dependencies) - `16132`{.interpreted-text role="ghpull"}: Backport PR #16126 on branch v3.2.x (TST: test_fork: Missing join) - `16124`{.interpreted-text role="ghpull"}: Backport PR #16105 on branch v3.2.x (Fix legend dragging.) - `16122`{.interpreted-text role="ghpull"}: Backport PR #16113 on branch v3.2.x (Renderer Graphviz inheritance diagrams as svg) - `16105`{.interpreted-text role="ghpull"}: Fix legend dragging. - `16113`{.interpreted-text role="ghpull"}: Renderer Graphviz inheritance diagrams as svg - `16112`{.interpreted-text role="ghpull"}: CI: Fail when failed to install dependencies - `16119`{.interpreted-text role="ghpull"}: Backport PR #16065 on branch v3.2.x (Nicer formatting of community aspects on front page) - `16074`{.interpreted-text role="ghpull"}: Backport PR #16061 on branch v3.2.x (Fix deprecation message for axes_grid1.colorbar.) - `16093`{.interpreted-text role="ghpull"}: Backport PR #16079 on branch v3.2.x (Fix restructured text formatting) - `16094`{.interpreted-text role="ghpull"}: Backport PR #16080 on branch v3.2.x (Cleanup docstrings in backend_bases.py) - `16086`{.interpreted-text role="ghpull"}: FIX: use supported attribute to check pillow version - `16084`{.interpreted-text role="ghpull"}: Backport PR #16077 on branch v3.2.x (Fix some typos) - `16077`{.interpreted-text role="ghpull"}: Fix some typos - `16079`{.interpreted-text role="ghpull"}: Fix restructured text formatting - `16080`{.interpreted-text role="ghpull"}: Cleanup docstrings in backend_bases.py - `16061`{.interpreted-text role="ghpull"}: Fix deprecation message for axes_grid1.colorbar. - `16006`{.interpreted-text role="ghpull"}: Ignore pos in StrCategoryFormatter.\_\_call\_\_ to display correct label in the preview window - `16056`{.interpreted-text role="ghpull"}: Backport PR #15864 on branch v3.2.x (\[Add the info of \'sviewgui\' in thirdparty package\]) - `15864`{.interpreted-text role="ghpull"}: Add \'sviewgui\' to list of thirdparty packages - `16055`{.interpreted-text role="ghpull"}: Backport PR #16037 on branch v3.2.x (Doc: use empty ScalarMappable for colorbars with no associated image.) - `16054`{.interpreted-text role="ghpull"}: Backport PR #16048 on branch v3.2.x (Document that colorbar() takes a label kwarg.) - `16037`{.interpreted-text role="ghpull"}: Doc: use empty ScalarMappable for colorbars with no associated image. - `16048`{.interpreted-text role="ghpull"}: Document that colorbar() takes a label kwarg. - `16042`{.interpreted-text role="ghpull"}: Backport PR #16031 on branch v3.2.x (Fix docstring of hillshade().) - `16033`{.interpreted-text role="ghpull"}: Backport PR #16028 on branch v3.2.x (Prevent FigureCanvasQT_draw_idle recursively calling itself.) - `16021`{.interpreted-text role="ghpull"}: Backport PR #16007 on branch v3.2.x (Fix search on nested pages) - `16019`{.interpreted-text role="ghpull"}: Backport PR #15735 on branch v3.2.x (Cleanup some mplot3d docstrings.) - `15987`{.interpreted-text role="ghpull"}: Backport PR #15886 on branch v3.2.x (Fix Annotation using different units and different coords on x/y.) - `15886`{.interpreted-text role="ghpull"}: Fix Annotation using different units and different coords on x/y. - `15984`{.interpreted-text role="ghpull"}: Backport PR #15970 on branch v3.2.x (Process clip paths the same way as regular Paths.) - `15970`{.interpreted-text role="ghpull"}: Process clip paths the same way as regular Paths. - `15963`{.interpreted-text role="ghpull"}: Backport PR #15937 on branch v3.2.x (Don\'t hide exceptions in FontManager.addfont.) - `15956`{.interpreted-text role="ghpull"}: Backport PR #15901 on branch v3.2.x (Update backend_nbagg for removal of Gcf.\_activeQue.) - `15937`{.interpreted-text role="ghpull"}: Don\'t hide exceptions in FontManager.addfont. - `15959`{.interpreted-text role="ghpull"}: Backport PR #15953 on branch v3.2.x (Update donation link) - `15901`{.interpreted-text role="ghpull"}: Update backend_nbagg for removal of Gcf.\_activeQue. - `15954`{.interpreted-text role="ghpull"}: Backport PR #15914 on branch v3.2.x (Example for sigmoid function with horizontal lines) - `15914`{.interpreted-text role="ghpull"}: Example for sigmoid function with horizontal lines - `15930`{.interpreted-text role="ghpull"}: Backport PR #15925 on branch v3.2.x (Optimize setting units to None when they\'re already None.) - `15925`{.interpreted-text role="ghpull"}: Optimize setting units to None when they\'re already None. - `15915`{.interpreted-text role="ghpull"}: Backport PR #15903 on branch v3.2.x (Correctly handle non-affine transData in Collection.get_datalim.) - `15903`{.interpreted-text role="ghpull"}: Correctly handle non-affine transData in Collection.get_datalim. - `15908`{.interpreted-text role="ghpull"}: Backport PR #15857 on branch v3.2.x (LassoSelection shouldn\'t useblit on canvas not supporting blitting.) - `15857`{.interpreted-text role="ghpull"}: LassoSelection shouldn\'t useblit on canvas not supporting blitting. - `15905`{.interpreted-text role="ghpull"}: Backport PR #15763 on branch v3.2.x (Skip webagg test if tornado is not available.) - `15882`{.interpreted-text role="ghpull"}: Backport PR #15859 on branch v3.2.x (Doc: Move search field into nav bar) - `15868`{.interpreted-text role="ghpull"}: Backport PR #15848 on branch v3.2.x: Cleanup environment variables FAQ - `15872`{.interpreted-text role="ghpull"}: Backport PR #15869 on branch v3.2.x (Update markers docs.) - `15869`{.interpreted-text role="ghpull"}: Update markers docs. - `15867`{.interpreted-text role="ghpull"}: Backport PR #15789 on branch v3.2.x (Cleanup xticks/yticks docstrings.) - `15870`{.interpreted-text role="ghpull"}: Backport PR #15865 on branch v3.2.x (Fix a typo) - `15871`{.interpreted-text role="ghpull"}: Backport PR #15824 on branch v3.2.x (Document doc style for default values) - `15824`{.interpreted-text role="ghpull"}: Document doc style for default values - `15865`{.interpreted-text role="ghpull"}: Fix a typo - `15789`{.interpreted-text role="ghpull"}: Cleanup xticks/yticks docstrings. - `15862`{.interpreted-text role="ghpull"}: Backport PR #15851 on branch v3.2.x (ffmpeg is available on default ubuntu packages now) - `15848`{.interpreted-text role="ghpull"}: Cleanup environment variables FAQ. - `15844`{.interpreted-text role="ghpull"}: Backport PR #15841 on branch v3.2.x (DOC: specify the expected shape in the Collection.set_offset) - `15841`{.interpreted-text role="ghpull"}: DOC: specify the expected shape in the Collection.set_offset - `15837`{.interpreted-text role="ghpull"}: Backport PR #15799 on branch v3.2.x (Improve display of author names on PDF titlepage of matplotlib own docs) - `15799`{.interpreted-text role="ghpull"}: Improve display of author names on PDF titlepage of matplotlib own docs - `15831`{.interpreted-text role="ghpull"}: Backport PR #15829 on branch v3.2.x (In C extensions, use FutureWarning, not DeprecationWarning.) - `15829`{.interpreted-text role="ghpull"}: In C extensions, use FutureWarning, not DeprecationWarning. - `15818`{.interpreted-text role="ghpull"}: Backport PR #15619 on branch v3.2.x (Improve zorder demo) - `15819`{.interpreted-text role="ghpull"}: Backport PR #15601 on branch v3.2.x (Fix FontProperties conversion to/from strings) - `15601`{.interpreted-text role="ghpull"}: Fix FontProperties conversion to/from strings - `15619`{.interpreted-text role="ghpull"}: Improve zorder demo - `15810`{.interpreted-text role="ghpull"}: Backport PR #15809 on branch v3.2.x (Exclude artists from legend using label attributte) - `15809`{.interpreted-text role="ghpull"}: Exclude artists from legend using label attributte - `15808`{.interpreted-text role="ghpull"}: Backport PR #15513 on branch v3.2.x (Separate plots using \#### in make_room_for_ylabel_using_axesgrid.py) - `15513`{.interpreted-text role="ghpull"}: Separate plots using \#### in make_room_for_ylabel_using_axesgrid.py - `15807`{.interpreted-text role="ghpull"}: Backport PR #15791 on branch v3.2.x (Cleanup backend_bases docstrings.) - `15791`{.interpreted-text role="ghpull"}: Cleanup backend_bases docstrings. - `15803`{.interpreted-text role="ghpull"}: Backport PR #15795 on branch v3.2.x (Remove incorrect statement re2: colorbars in image tutorial.) - `15795`{.interpreted-text role="ghpull"}: Remove incorrect statement re: colorbars in image tutorial. - `15794`{.interpreted-text role="ghpull"}: Backport PR #15793 on branch v3.2.x (fix a couple typos in tutorials) - `15793`{.interpreted-text role="ghpull"}: fix a couple typos in tutorials - `15774`{.interpreted-text role="ghpull"}: Backport PR #15748 on branch v3.2.x (Fix incorrect macro in FT2Font setup.) - `15748`{.interpreted-text role="ghpull"}: Fix incorrect macro in FT2Font setup. - `15759`{.interpreted-text role="ghpull"}: Backport PR #15751 on branch v3.2.x (Modernize FAQ entry for plt.show().) - `15762`{.interpreted-text role="ghpull"}: Backport PR #15752 on branch v3.2.x (Update boxplot/violinplot faq.) - `15755`{.interpreted-text role="ghpull"}: Backport PR #15661 on branch v3.2.x (Document scope of 3D scatter depthshading.) - `15742`{.interpreted-text role="ghpull"}: Backport PR #15729 on branch v3.2.x (Catch correct parse error type for dateutil \>= 2.8.1) - `15738`{.interpreted-text role="ghpull"}: Backport PR #15737 on branch v3.2.x (Fix env override in WebAgg backend test.) - `15724`{.interpreted-text role="ghpull"}: Backport PR #15718 on branch v3.2.x (Update donation link) - `15716`{.interpreted-text role="ghpull"}: Backport PR #15683 on branch v3.2.x (Cleanup dates.py docstrings.) - `15683`{.interpreted-text role="ghpull"}: Cleanup dates.py docstrings. - `15688`{.interpreted-text role="ghpull"}: Backport PR #15682 on branch v3.2.x (Make histogram_bin_edges private.) - `15682`{.interpreted-text role="ghpull"}: Make histogram_bin_edges private. - `15666`{.interpreted-text role="ghpull"}: Backport PR #15649 on branch v3.2.x (Fix searchindex.js loading when ajax fails (because e.g. CORS in embedded iframes)) - `15669`{.interpreted-text role="ghpull"}: Backport PR #15654 on branch v3.2.x (Fix some broken links.) - `15660`{.interpreted-text role="ghpull"}: Backport PR #15647 on branch v3.2.x (Update some links) - `15653`{.interpreted-text role="ghpull"}: Backport PR #15623 on branch v3.2.x (Docstring for Artist.mouseover) - `15623`{.interpreted-text role="ghpull"}: Docstring for Artist.mouseover - `15634`{.interpreted-text role="ghpull"}: Backport PR #15626 on branch v3.2.x (Note minimum supported version for fontconfig.) - `15633`{.interpreted-text role="ghpull"}: Backport PR #15620 on branch v3.2.x (TST: Increase tolerance of some tests for aarch64) - `15626`{.interpreted-text role="ghpull"}: Note minimum supported version for fontconfig. - `15632`{.interpreted-text role="ghpull"}: Backport PR #15627 on branch v3.2.x (Make it easier to test various animation writers in examples.) - `15620`{.interpreted-text role="ghpull"}: TST: Increase tolerance of some tests for aarch64 - `15627`{.interpreted-text role="ghpull"}: Make it easier to test various animation writers in examples. - `15618`{.interpreted-text role="ghpull"}: Backport PR #15613 on branch v3.2.x (Revert \"Don\'t bother with manually resizing the Qt main window.\") - `15613`{.interpreted-text role="ghpull"}: Revert \"Don\'t bother with manually resizing the Qt main window.\" - `15593`{.interpreted-text role="ghpull"}: Backport PR #15590 on branch v3.2.x (Rename numpy to NumPy in docs.) - `15590`{.interpreted-text role="ghpull"}: Rename numpy to NumPy in docs. - `15588`{.interpreted-text role="ghpull"}: Backport PR #15478 on branch v3.2.x (Make ConciseDateFormatter obey timezone) - `15478`{.interpreted-text role="ghpull"}: Make ConciseDateFormatter obey timezone - `15583`{.interpreted-text role="ghpull"}: Backport PR #15512 on branch v3.2.x - `15584`{.interpreted-text role="ghpull"}: Backport PR #15579 on branch v3.2.x (Remove matplotlib.sphinxext.tests from \_\_init\_\_.py) - `15579`{.interpreted-text role="ghpull"}: Remove matplotlib.sphinxext.tests from \_\_init\_\_.py - `15577`{.interpreted-text role="ghpull"}: Backport PR #14705 on branch v3.2.x (Correctly size non-ASCII characters in agg backend.) - `14705`{.interpreted-text role="ghpull"}: Correctly size non-ASCII characters in agg backend. - `15572`{.interpreted-text role="ghpull"}: Backport PR #15452 on branch v3.2.x (Improve example for tick formatters) - `15570`{.interpreted-text role="ghpull"}: Backport PR #15561 on branch v3.2.x (Update thirdparty scalebar) - `15452`{.interpreted-text role="ghpull"}: Improve example for tick formatters - `15545`{.interpreted-text role="ghpull"}: Backport PR #15429 on branch v3.2.x (Fix OSX build on azure) - `15544`{.interpreted-text role="ghpull"}: Backport PR #15537 on branch v3.2.x (Add a third party package in the doc: matplotlib-scalebar) - `15561`{.interpreted-text role="ghpull"}: Update thirdparty scalebar - `15567`{.interpreted-text role="ghpull"}: Backport PR #15562 on branch v3.2.x (Improve docsting of AxesImage) - `15562`{.interpreted-text role="ghpull"}: Improve docsting of AxesImage - `15565`{.interpreted-text role="ghpull"}: Backport PR #15556 on branch v3.2.x (Fix test suite compat with ghostscript 9.50.) - `15556`{.interpreted-text role="ghpull"}: Fix test suite compat with ghostscript 9.50. - `15560`{.interpreted-text role="ghpull"}: Backport PR #15553 on branch v3.2.x (DOC: add cache-buster query string to css path) - `15552`{.interpreted-text role="ghpull"}: Backport PR #15528 on branch v3.2.x (Declutter home page) - `15554`{.interpreted-text role="ghpull"}: Backport PR #15523 on branch v3.2.x (numpydoc AxesImage) - `15523`{.interpreted-text role="ghpull"}: numpydoc AxesImage - `15549`{.interpreted-text role="ghpull"}: Backport PR #15516 on branch v3.2.x (Add logo like font) - `15543`{.interpreted-text role="ghpull"}: Backport PR #15539 on branch v3.2.x (Small cleanups to backend docs.) - `15542`{.interpreted-text role="ghpull"}: Backport PR #15540 on branch v3.2.x (axisartist tutorial fixes.) - `15537`{.interpreted-text role="ghpull"}: Add a third party package in the doc: matplotlib-scalebar - `15541`{.interpreted-text role="ghpull"}: Backport PR #15533 on branch v3.2.x (Use svg instead of png for website logo) - `15539`{.interpreted-text role="ghpull"}: Small cleanups to backend docs. - `15540`{.interpreted-text role="ghpull"}: axisartist tutorial fixes. - `15538`{.interpreted-text role="ghpull"}: Backport PR #15535 on branch v3.2.x (Avoid really long lines in event handling docs.) - `15535`{.interpreted-text role="ghpull"}: Avoid really long lines in event handling docs. - `15531`{.interpreted-text role="ghpull"}: Backport PR #15527 on branch v3.2.x (Clarify imshow() docs concerning scaling and grayscale images) - `15527`{.interpreted-text role="ghpull"}: Clarify imshow() docs concerning scaling and grayscale images - `15522`{.interpreted-text role="ghpull"}: Backport PR #15500 on branch v3.2.x (Improve antialiasing example) - `15524`{.interpreted-text role="ghpull"}: Backport PR #15499 on branch v3.2.x (Do not show path in font table example) - `15525`{.interpreted-text role="ghpull"}: Backport PR #15498 on branch v3.2.x (Simplify matshow example) - `15498`{.interpreted-text role="ghpull"}: Simplify matshow example - `15499`{.interpreted-text role="ghpull"}: Do not show path in font table example - `15521`{.interpreted-text role="ghpull"}: Backport PR #15519 on branch v3.2.x (FIX: fix anti-aliasing zoom bug) - `15500`{.interpreted-text role="ghpull"}: Improve antialiasing example - `15519`{.interpreted-text role="ghpull"}: FIX: fix anti-aliasing zoom bug - `15510`{.interpreted-text role="ghpull"}: Backport PR #15489 on branch v3.2.x (DOC: adding main nav to site) - `15495`{.interpreted-text role="ghpull"}: Backport PR #15486 on branch v3.2.x (Fixes an error in the documentation of Ellipse) - `15488`{.interpreted-text role="ghpull"}: Backport PR #15372 on branch v3.2.x (Add example for drawstyle) - `15490`{.interpreted-text role="ghpull"}: Backport PR #15487 on branch v3.2.x (Fix window not always raised in Qt example) - `15487`{.interpreted-text role="ghpull"}: Fix window not always raised in Qt example - `15372`{.interpreted-text role="ghpull"}: Add example for drawstyle - `15485`{.interpreted-text role="ghpull"}: Backport PR #15454 on branch v3.2.x (Rewrite Anscombe\'s quartet example) - `15483`{.interpreted-text role="ghpull"}: Backport PR #15480 on branch v3.2.x (Fix wording in \[packages\] section of setup.cfg) - `15454`{.interpreted-text role="ghpull"}: Rewrite Anscombe\'s quartet example - `15480`{.interpreted-text role="ghpull"}: Fix wording in \[packages\] section of setup.cfg - `15477`{.interpreted-text role="ghpull"}: Backport PR #15464 on branch v3.2.x (Remove unused code (remainder from #15453)) - `15471`{.interpreted-text role="ghpull"}: Backport PR #15460 on branch v3.2.x (Fix incorrect value check in axes_grid.) - `15456`{.interpreted-text role="ghpull"}: Backport PR #15453 on branch v3.2.x (Improve example for tick locators) - `15457`{.interpreted-text role="ghpull"}: Backport PR #15450 on branch v3.2.x (API: rename DivergingNorm to TwoSlopeNorm) - `15450`{.interpreted-text role="ghpull"}: API: rename DivergingNorm to TwoSlopeNorm - `15434`{.interpreted-text role="ghpull"}: In imsave, let pnginfo have precedence over metadata. - `15445`{.interpreted-text role="ghpull"}: Backport PR #15439 on branch v3.2.x (DOC: mention discourse main page) - `15425`{.interpreted-text role="ghpull"}: Backport PR #15422 on branch v3.2.x (FIX: typo in attribute lookup) - `15449`{.interpreted-text role="ghpull"}: DOC: fix build - `15429`{.interpreted-text role="ghpull"}: Fix OSX build on azure - `15420`{.interpreted-text role="ghpull"}: Backport PR #15380 on branch v3.2.x (Update docs of BoxStyle) - `15380`{.interpreted-text role="ghpull"}: Update docs of BoxStyle - `15300`{.interpreted-text role="ghpull"}: CI: use python -m to make sure we are using the pip/pytest we want - `15414`{.interpreted-text role="ghpull"}: Backport PR #15413 on branch v3.2.x (catch OSError instead of FileNotFoundError in \_get_executable_info to resolve #15399) - `15413`{.interpreted-text role="ghpull"}: catch OSError instead of FileNotFoundError in \_get_executable_info to resolve #15399 - `15406`{.interpreted-text role="ghpull"}: Backport PR #15347 on branch v3.2.x (Fix axes.hist bins units) - `15405`{.interpreted-text role="ghpull"}: Backport PR #15391 on branch v3.2.x (Increase fontsize in inheritance graphs) - `15347`{.interpreted-text role="ghpull"}: Fix axes.hist bins units - `15391`{.interpreted-text role="ghpull"}: Increase fontsize in inheritance graphs - `15389`{.interpreted-text role="ghpull"}: Backport PR #15379 on branch v3.2.x (Document formatting strings in the docs) - `15379`{.interpreted-text role="ghpull"}: Document formatting strings in the docs - `15386`{.interpreted-text role="ghpull"}: Backport PR #15385 on branch v3.2.x (Reword hist() doc.) - `15385`{.interpreted-text role="ghpull"}: Reword hist() doc. - `15377`{.interpreted-text role="ghpull"}: Backport PR #15357 on branch v3.2.x (Add \'step\' and \'barstacked\' to histogram_histtypes demo) - `15357`{.interpreted-text role="ghpull"}: Add \'step\' and \'barstacked\' to histogram_histtypes demo - `15366`{.interpreted-text role="ghpull"}: Backport PR #15364 on branch v3.2.x (DOC: fix typo in colormap docs) - `15362`{.interpreted-text role="ghpull"}: Backport PR #15350 on branch v3.2.x (Don\'t generate double-reversed cmaps (\"viridis_r_r\", \...).) - `15360`{.interpreted-text role="ghpull"}: Backport PR #15258 on branch v3.2.x (Don\'t fallback to view limits when autoscale()ing no data.) - `15350`{.interpreted-text role="ghpull"}: Don\'t generate double-reversed cmaps (\"viridis_r_r\", \...). - `15258`{.interpreted-text role="ghpull"}: Don\'t fallback to view limits when autoscale()ing no data. - `15299`{.interpreted-text role="ghpull"}: Backport PR #15296 on branch v3.2.x (Fix typo/bug from 18cecf7) - `15327`{.interpreted-text role="ghpull"}: Backport PR #15326 on branch v3.2.x (List of minimal versions of dependencies) - `15326`{.interpreted-text role="ghpull"}: List of minimal versions of dependencies - `15317`{.interpreted-text role="ghpull"}: Backport PR #15291 on branch v3.2.x (Remove error_msg_qt from backend_qt4.) - `15316`{.interpreted-text role="ghpull"}: Backport PR #15283 on branch v3.2.x (Don\'t default axes_grid colorbar locator to MaxNLocator.) - `15291`{.interpreted-text role="ghpull"}: Remove error_msg_qt from backend_qt4. - `15283`{.interpreted-text role="ghpull"}: Don\'t default axes_grid colorbar locator to MaxNLocator. - `15315`{.interpreted-text role="ghpull"}: Backport PR #15308 on branch v3.2.x (Doc: Add close event to list of events) - `15308`{.interpreted-text role="ghpull"}: Doc: Add close event to list of events - `15312`{.interpreted-text role="ghpull"}: Backport PR #15307 on branch v3.2.x (DOC: center footer) - `15307`{.interpreted-text role="ghpull"}: DOC: center footer - `15276`{.interpreted-text role="ghpull"}: Backport PR #15271 on branch v3.2.x (Fix font weight validation) - `15279`{.interpreted-text role="ghpull"}: Backport PR #15252 on branch v3.2.x (Mention labels and milestones in PR review guidelines) - `15252`{.interpreted-text role="ghpull"}: Mention labels and milestones in PR review guidelines - `15268`{.interpreted-text role="ghpull"}: Backport PR #15266 on branch v3.2.x (Embedding in Tk example: Fix toolbar being clipped.) - `15269`{.interpreted-text role="ghpull"}: Backport PR #15267 on branch v3.2.x (added multi-letter example to mathtext tutorial) - `15267`{.interpreted-text role="ghpull"}: added multi-letter example to mathtext tutorial - `15266`{.interpreted-text role="ghpull"}: Embedding in Tk example: Fix toolbar being clipped. - `15243`{.interpreted-text role="ghpull"}: Move some new API changes to the correct place - `15245`{.interpreted-text role="ghpull"}: Fix incorrect calls to warn_deprecated. - `15239`{.interpreted-text role="ghpull"}: Composite against white, not the savefig.facecolor rc, in print_jpeg. - `15227`{.interpreted-text role="ghpull"}: contains_point() docstring fixes - `15242`{.interpreted-text role="ghpull"}: Cleanup widgets docstrings. - `14889`{.interpreted-text role="ghpull"}: Support pixel-by-pixel alpha in imshow. - `14928`{.interpreted-text role="ghpull"}: Logit scale nonsingular - `14998`{.interpreted-text role="ghpull"}: Fix nonlinear spine positions & inline Spine.\_calc_offset_transform into get_spine_transform. - `15231`{.interpreted-text role="ghpull"}: Doc: Do not write default for non-existing rcParams - `15222`{.interpreted-text role="ghpull"}: Cleanup projections/\_\_init\_\_.py. - `15228`{.interpreted-text role="ghpull"}: Minor docstring style cleanup - `15237`{.interpreted-text role="ghpull"}: Cleanup widgets.py. - `15229`{.interpreted-text role="ghpull"}: Doc: Fix Bbox and BboxBase links - `15235`{.interpreted-text role="ghpull"}: Kill FigureManagerTk.\_num. - `15234`{.interpreted-text role="ghpull"}: Drop mention of msinttypes in Windows build. - `15224`{.interpreted-text role="ghpull"}: Avoid infinite loop when switching actions in qt backend. - `15230`{.interpreted-text role="ghpull"}: Doc: Remove hard-documented rcParams defaults - `15149`{.interpreted-text role="ghpull"}: pyplot.style.use() to accept pathlib.Path objects as arguments - `15220`{.interpreted-text role="ghpull"}: Correctly format floats passed to pgf backend. - `15216`{.interpreted-text role="ghpull"}: Update docstrings of contains_point(s) methods - `15209`{.interpreted-text role="ghpull"}: Exclude s-g generated files from flake8 check. - `15204`{.interpreted-text role="ghpull"}: PEP8ify some variable names. - `15196`{.interpreted-text role="ghpull"}: Force html4 writer for sphinx 2 - `13544`{.interpreted-text role="ghpull"}: Improve handling of subplots spanning multiple gridspec cells. - `15194`{.interpreted-text role="ghpull"}: Trivial style fixes. - `15202`{.interpreted-text role="ghpull"}: Deprecate the renderer parameter to Figure.tight_layout. - `15195`{.interpreted-text role="ghpull"}: Fix integers being passed as length to quiver3d. - `15180`{.interpreted-text role="ghpull"}: Add some more internal links to 3.2.0 what\'s new - `13510`{.interpreted-text role="ghpull"}: Change Locator MAXTICKS checking to emitting a log at WARNING level. - `15184`{.interpreted-text role="ghpull"}: Mark missing_references extension as parallel read safe - `15150`{.interpreted-text role="ghpull"}: Autodetect whether pgf can use includegraphics\[interpolate\]. - `15163`{.interpreted-text role="ghpull"}: 3.2.0 API changes page - `15176`{.interpreted-text role="ghpull"}: What\'s new for 3.2.0 - `11947`{.interpreted-text role="ghpull"}: Ensure streamplot Euler step is always called when going out of bounds. - `13702`{.interpreted-text role="ghpull"}: Deduplicate methods shared between Container and Artist. - `15169`{.interpreted-text role="ghpull"}: TST: verify warnings fail the test suite - `14888`{.interpreted-text role="ghpull"}: Replace some polar baseline images by check_figures_equal. - `15027`{.interpreted-text role="ghpull"}: More readability improvements on axis3d. - `15171`{.interpreted-text role="ghpull"}: Add useful error message when trying to add Slider to 3DAxes - `13775`{.interpreted-text role="ghpull"}: Doc: Scatter Hist example update - `15164`{.interpreted-text role="ghpull"}: removed a typo - `15152`{.interpreted-text role="ghpull"}: Support for shorthand hex colors. - `15159`{.interpreted-text role="ghpull"}: Follow up on #14424 for docstring - `14424`{.interpreted-text role="ghpull"}: ENH: Add argument size validation to quiver. - `15137`{.interpreted-text role="ghpull"}: DOC: add example to power limit API change note - `15144`{.interpreted-text role="ghpull"}: Improve local page contents CSS - `15143`{.interpreted-text role="ghpull"}: Restore doc references. - `15124`{.interpreted-text role="ghpull"}: Replace parameter lists with square brackets - `13077`{.interpreted-text role="ghpull"}: fix FreeType build on Azure - `15123`{.interpreted-text role="ghpull"}: Improve categorical example - `15134`{.interpreted-text role="ghpull"}: Fix missing references in doc build. - `13937`{.interpreted-text role="ghpull"}: Use PYTHONFAULTHANDLER to switch on the Python fault handler. - `13452`{.interpreted-text role="ghpull"}: Replace axis_artist.AttributeCopier by normal inheritance. - `15045`{.interpreted-text role="ghpull"}: Resize canvas when changing figure size - `15122`{.interpreted-text role="ghpull"}: Fixed app creation in qt5 backend (see #15100) - `15099`{.interpreted-text role="ghpull"}: Add lightsource parameter to bar3d - `14876`{.interpreted-text role="ghpull"}: Inline some afm parsing code. - `15119`{.interpreted-text role="ghpull"}: Deprecate a validator for a deprecated rcParam value. - `15121`{.interpreted-text role="ghpull"}: Fix Stacked bar graph example - `15113`{.interpreted-text role="ghpull"}: Cleanup layout_from_subplotspec. - `13543`{.interpreted-text role="ghpull"}: Remove zip_safe=False flag from setup.py. - `12860`{.interpreted-text role="ghpull"}: ENH: LogLocator: check for correct dimension of subs added - `14349`{.interpreted-text role="ghpull"}: Replace ValidateInterval by simpler specialized validators. - `14352`{.interpreted-text role="ghpull"}: Remove redundant is_landscape kwarg from backend_ps helpers. - `15087`{.interpreted-text role="ghpull"}: Pass gid to renderer - `14703`{.interpreted-text role="ghpull"}: Don\'t bother with manually resizing the Qt main window. - `14833`{.interpreted-text role="ghpull"}: Reuse TexManager implementation in convert_psfrags. - `14893`{.interpreted-text role="ghpull"}: Update layout.html for sphinx themes - `15098`{.interpreted-text role="ghpull"}: Simplify symlog range determination logic - `15112`{.interpreted-text role="ghpull"}: Cleanup legend() docstring. - `15108`{.interpreted-text role="ghpull"}: Fix doc build and resync matplotlibrc.template with actual defaults. - `14940`{.interpreted-text role="ghpull"}: Fix text kerning calculations and some FT2Font cleanup - `15082`{.interpreted-text role="ghpull"}: Privatize font_manager.JSONEncoder. - `15106`{.interpreted-text role="ghpull"}: Update docs of GridSpec - `14832`{.interpreted-text role="ghpull"}: ENH:made default tick formatter to switch to scientific notation earlier - `15086`{.interpreted-text role="ghpull"}: Style fixes. - `15073`{.interpreted-text role="ghpull"}: Add entry for blume to thirdparty package index - `15095`{.interpreted-text role="ghpull"}: Simplify \_png extension by handling file open/close in Python. - `15092`{.interpreted-text role="ghpull"}: MNT: Add test for aitoff-projection - `15101`{.interpreted-text role="ghpull"}: Doc: fix typo in contour doc - `14624`{.interpreted-text role="ghpull"}: Fix axis inversion with loglocator and logitlocator. - `15088`{.interpreted-text role="ghpull"}: Fix more doc references. - `15063`{.interpreted-text role="ghpull"}: Add Comic Neue as a fantasy font. - `14867`{.interpreted-text role="ghpull"}: Propose change to PR merging policy. - `15068`{.interpreted-text role="ghpull"}: Add FontManager.addfont to register fonts at specific paths. - `13397`{.interpreted-text role="ghpull"}: Deprecate axes_grid1.colorbar (in favor of matplotlib\'s own). - `14521`{.interpreted-text role="ghpull"}: Move required_interactive_framework to canvas class. - `15083`{.interpreted-text role="ghpull"}: Cleanup spines example. - `14997`{.interpreted-text role="ghpull"}: Correctly set formatters and locators on removed shared axis - `15064`{.interpreted-text role="ghpull"}: Fix eps hatching in MacOS Preview - `15074`{.interpreted-text role="ghpull"}: Write all ACCEPTS markers in docstrings as comments. - `15078`{.interpreted-text role="ghpull"}: Clarify docstring of FT2Font.get_glyph_name. - `15080`{.interpreted-text role="ghpull"}: Fix cross-references in API changes \< 3.0.0. - `15072`{.interpreted-text role="ghpull"}: Cleanup patheffects. - `15071`{.interpreted-text role="ghpull"}: Cleanup offsetbox.py. - `15070`{.interpreted-text role="ghpull"}: Fix cross-references in API changes \< 2.0.0. - `10691`{.interpreted-text role="ghpull"}: Fix for shared axes diverging after setting tick markers - `15069`{.interpreted-text role="ghpull"}: Style fixes for font_manager.py. - `15067`{.interpreted-text role="ghpull"}: Fix cross-references in API changes \< 1.0 - `15061`{.interpreted-text role="ghpull"}: Fix cross-references in tutorials and FAQ - `15060`{.interpreted-text role="ghpull"}: Fix cross-references in examples. - `14957`{.interpreted-text role="ghpull"}: Documentation for using ConnectionPatch across Axes with constrained... - `15053`{.interpreted-text role="ghpull"}: Make citation bit of README less wordy - `15044`{.interpreted-text role="ghpull"}: numpydoc set_size_inches docstring - `15050`{.interpreted-text role="ghpull"}: Clarify unnecessary special handling for colons in paths. - `14797`{.interpreted-text role="ghpull"}: DOC: create a Agg figure without pyplot in buffer example - `14844`{.interpreted-text role="ghpull"}: Add citation info to README - `14884`{.interpreted-text role="ghpull"}: Do not allow canvas size to become smaller than MinSize in wx backend... - `14941`{.interpreted-text role="ghpull"}: Improvements to make_icons.py. - `15048`{.interpreted-text role="ghpull"}: DOC: more nitpick follow up - `15043`{.interpreted-text role="ghpull"}: Fix Docs: Don't warn for unused ignores - `15025`{.interpreted-text role="ghpull"}: Re-write text wrapping logic - `14840`{.interpreted-text role="ghpull"}: Don\'t assume transform is valid on access to matrix. - `14862`{.interpreted-text role="ghpull"}: Make optional in docstrings optional - `15028`{.interpreted-text role="ghpull"}: Python version conf.py - `15033`{.interpreted-text role="ghpull"}: FIX: un-break nightly wheels on py37 - `15046`{.interpreted-text role="ghpull"}: v3.1.x merge up - `15015`{.interpreted-text role="ghpull"}: Fix bad missing-references.json due to PR merge race condition. - `14581`{.interpreted-text role="ghpull"}: Make logscale bar/hist autolimits more consistents. - `15034`{.interpreted-text role="ghpull"}: Doc fix nitpick - `14614`{.interpreted-text role="ghpull"}: Deprecate {x,y,z}axis_date. - `14991`{.interpreted-text role="ghpull"}: Handle inherited is_separable, has_inverse in transform props detection. - `15032`{.interpreted-text role="ghpull"}: Clarify effect of axis(\'equal\') on explicit data limits - `15031`{.interpreted-text role="ghpull"}: Update docs of GridSpec - `14106`{.interpreted-text role="ghpull"}: Describe FigureManager - `15024`{.interpreted-text role="ghpull"}: Update docs of GridSpecBase - `14906`{.interpreted-text role="ghpull"}: Deprecate some FT2Image methods. - `14963`{.interpreted-text role="ghpull"}: More Axis3D cleanup. - `15009`{.interpreted-text role="ghpull"}: Provide signatures to some C-level classes and methods. - `14968`{.interpreted-text role="ghpull"}: DOC: colormap manipulation tutorial update - `15006`{.interpreted-text role="ghpull"}: Deprecate get/[set]()\*ticks minor positional use - `14989`{.interpreted-text role="ghpull"}: DOC:Update axes documentation - `14871`{.interpreted-text role="ghpull"}: Parametrize determinism tests. - `14768`{.interpreted-text role="ghpull"}: DOC: Enable nitpicky - `15013`{.interpreted-text role="ghpull"}: Matplotlib requires Python 3.6, which in turn requires Mac OS X 10.6+ - `15012`{.interpreted-text role="ghpull"}: Fix typesetting of \"GitHub\" - `14954`{.interpreted-text role="ghpull"}: Cleanup polar_legend example. - `14519`{.interpreted-text role="ghpull"}: Check parameters of ColorbarBase - `14942`{.interpreted-text role="ghpull"}: Make \_classic_test style a tiny patch on top of classic. - `14988`{.interpreted-text role="ghpull"}: pathlibify/fstringify setup/setupext. - `14511`{.interpreted-text role="ghpull"}: Deprecate allowing scalars for fill_between where - `14493`{.interpreted-text role="ghpull"}: Remove deprecated fig parameter form GridSpecBase.get_subplot_params() - `14995`{.interpreted-text role="ghpull"}: Further improve backend tutorial. - `15000`{.interpreted-text role="ghpull"}: Use warnings.warn, not logging.warning, in microseconds locator warning. - `14990`{.interpreted-text role="ghpull"}: Fix nonsensical transform in mixed-mode axes aspect computation. - `15002`{.interpreted-text role="ghpull"}: No need to access filesystem in test_dates.py. - `14549`{.interpreted-text role="ghpull"}: Improve backends documentation - `14774`{.interpreted-text role="ghpull"}: Fix image bbox clip. - `14978`{.interpreted-text role="ghpull"}: Typo fixes in pyplot.py - `14702`{.interpreted-text role="ghpull"}: Don\'t enlarge toolbar for Qt high-dpi. - `14922`{.interpreted-text role="ghpull"}: Autodetect some transform properties. - `14962`{.interpreted-text role="ghpull"}: Replace inspect.getfullargspec by inspect.signature. - `14958`{.interpreted-text role="ghpull"}: Improve docs of toplevel module. - `14926`{.interpreted-text role="ghpull"}: Save a matrix unpacking/repacking in offsetbox. - `14961`{.interpreted-text role="ghpull"}: Cleanup demo_agg_filter. - `14924`{.interpreted-text role="ghpull"}: Kill the C-level (private) RendererAgg.buffer_rgba, which returns a copy. - `14946`{.interpreted-text role="ghpull"}: Delete virtualenv faq. - `14944`{.interpreted-text role="ghpull"}: Shorten style.py. - `14931`{.interpreted-text role="ghpull"}: Deprecate some obscure rcParam synonyms. - `14947`{.interpreted-text role="ghpull"}: Fix inaccuracy re: backends in intro tutorial. - `14904`{.interpreted-text role="ghpull"}: Fix typo in secondary_axis.py example. - `14925`{.interpreted-text role="ghpull"}: Support passing spine bounds as single tuple. - `14921`{.interpreted-text role="ghpull"}: DOC: Make abbreviation of versus consistent. - `14739`{.interpreted-text role="ghpull"}: Improve indentation of Line2D properties in docstrings. - `14923`{.interpreted-text role="ghpull"}: In examples, prefer buffer_rgba to print_to_buffer. - `14908`{.interpreted-text role="ghpull"}: Make matplotlib.style.available sorted alphabetically. - `13567`{.interpreted-text role="ghpull"}: Deprecate MovieWriterRegistry cache-dirtyness system. - `14879`{.interpreted-text role="ghpull"}: Error out when unsupported kwargs are passed to Scale. - `14512`{.interpreted-text role="ghpull"}: Logit scale, changes in LogitLocator and LogitFormatter - `12415`{.interpreted-text role="ghpull"}: ENH: fig.set_size to allow non-inches units - `13783`{.interpreted-text role="ghpull"}: Deprecate disable_internet. - `14886`{.interpreted-text role="ghpull"}: Further simplify the flow of pdf text output. - `14894`{.interpreted-text role="ghpull"}: Make slowness warning for legend(loc=\"best\") more accurate. - `14891`{.interpreted-text role="ghpull"}: Fix nightly test errors - `14895`{.interpreted-text role="ghpull"}: Fix typos - `14890`{.interpreted-text role="ghpull"}: Remove unused private helper method in mplot3d. - `14872`{.interpreted-text role="ghpull"}: Unify text layout paths. - `8183`{.interpreted-text role="ghpull"}: Allow array alpha for imshow - `13832`{.interpreted-text role="ghpull"}: Vectorize handling of stacked/cumulative in hist(). - `13630`{.interpreted-text role="ghpull"}: Simplify PolarAxes.can_pan. - `14565`{.interpreted-text role="ghpull"}: Rewrite an argument check to \_check_getitem - `14875`{.interpreted-text role="ghpull"}: Cleanup afm module docstring. - `14880`{.interpreted-text role="ghpull"}: Fix animation blitting for plots with shared axes - `14870`{.interpreted-text role="ghpull"}: FT2Font.get_char_index never returns None. - `13463`{.interpreted-text role="ghpull"}: Deprecate Locator.autoscale. - `13724`{.interpreted-text role="ghpull"}: ENH: anti-alias down-sampled images - `14848`{.interpreted-text role="ghpull"}: Clearer error message for plt.axis() - `14660`{.interpreted-text role="ghpull"}: colorbar(label=None) should give an empty label - `14654`{.interpreted-text role="ghpull"}: Cleanup of docstrings of scales - `14868`{.interpreted-text role="ghpull"}: Update bar stacked example to directly manipulate axes. - `14749`{.interpreted-text role="ghpull"}: Fix get_canvas_width_height() for pgf backend. - `14776`{.interpreted-text role="ghpull"}: Make ExecutableUnavailableError - `14843`{.interpreted-text role="ghpull"}: Don\'t try to cleanup CallbackRegistry during interpreter shutdown. - `14849`{.interpreted-text role="ghpull"}: Improve tkagg icon resolution - `14866`{.interpreted-text role="ghpull"}: changed all readme headings to verbs - `13364`{.interpreted-text role="ghpull"}: Numpyfy tick handling code in Axis3D. - `13642`{.interpreted-text role="ghpull"}: FIX: get_datalim for collection - `14860`{.interpreted-text role="ghpull"}: Stopgap fix for pandas converters in tests. - `6498`{.interpreted-text role="ghpull"}: Check canvas identity in Artist.contains. - `14707`{.interpreted-text role="ghpull"}: Add titlecolor in rcParams - `14853`{.interpreted-text role="ghpull"}: Fix typo in set_adjustable check. - `14845`{.interpreted-text role="ghpull"}: More cleanups. - `14809`{.interpreted-text role="ghpull"}: Clearer calls to ConnectionPatch. - `14716`{.interpreted-text role="ghpull"}: Use str instead of string as type in docstrings - `14338`{.interpreted-text role="ghpull"}: Simplify/pathlibify image_comparison. - `8930`{.interpreted-text role="ghpull"}: timedelta formatter - `14733`{.interpreted-text role="ghpull"}: Deprecate FigureFrameWx.statusbar & NavigationToolbar2Wx.statbar. - `14713`{.interpreted-text role="ghpull"}: Unite masked and NaN plot examples - `14576`{.interpreted-text role="ghpull"}: Let Axes3D share have_units, \_on_units_changed with 2d axes. - `14575`{.interpreted-text role="ghpull"}: Make ticklabel_format work both for 2D and 3D axes. - `14834`{.interpreted-text role="ghpull"}: DOC: Webpage not formatted correctly on gallery docs - `14730`{.interpreted-text role="ghpull"}: Factor out common parts of wx event handlers. - `14727`{.interpreted-text role="ghpull"}: Fix axes aspect for non-linear, non-log, possibly mixed-scale axes. - `14835`{.interpreted-text role="ghpull"}: Only allow set_adjustable(\"datalim\") for axes with standard data ratios. - `14746`{.interpreted-text role="ghpull"}: Simplify Arrow constructor. - `14752`{.interpreted-text role="ghpull"}: Doc changes to git setup - `14732`{.interpreted-text role="ghpull"}: Deduplicate wx configure_subplots tool. - `14715`{.interpreted-text role="ghpull"}: Use array-like in docs - `14728`{.interpreted-text role="ghpull"}: More floating_axes cleanup. - `14719`{.interpreted-text role="ghpull"}: Make Qt navtoolbar more robust against removal of either pan or zoom. - `14695`{.interpreted-text role="ghpull"}: Various small simplifications - `14745`{.interpreted-text role="ghpull"}: Replace Affine2D().scale(x, x) by Affine2D().scale(x). - `14687`{.interpreted-text role="ghpull"}: Add missing spaces after commas in docs - `14810`{.interpreted-text role="ghpull"}: Lighten icons of NavigationToolbar2QT on dark-themes - `14786`{.interpreted-text role="ghpull"}: Deprecate axis_artist.BezierPath. - `14750`{.interpreted-text role="ghpull"}: Misc. simplifications. - `14807`{.interpreted-text role="ghpull"}: API change note on automatic blitting detection for backends - `11004`{.interpreted-text role="ghpull"}: Deprecate smart_bounds handling in Axis and Spine - `14785`{.interpreted-text role="ghpull"}: Kill some never-used attributes. - `14723`{.interpreted-text role="ghpull"}: Cleanup some parameter descriptions in matplotlibrc.template - `14808`{.interpreted-text role="ghpull"}: Small docstring updates - `14686`{.interpreted-text role="ghpull"}: Inset orientation - `14805`{.interpreted-text role="ghpull"}: Simplify text_layout example. - `12052`{.interpreted-text role="ghpull"}: Make AxesImage.contains account for transforms - `11860`{.interpreted-text role="ghpull"}: Let MovieFileWriter save temp files in a new dir - `11423`{.interpreted-text role="ghpull"}: FigureCanvas Designer - `10688`{.interpreted-text role="ghpull"}: Add legend handler and artist for FancyArrow - `8321`{.interpreted-text role="ghpull"}: Added ContourSet clip_path kwarg and set_clip_path() method (#2369) - `14641`{.interpreted-text role="ghpull"}: Simplify \_process_plot_var_args. - `14631`{.interpreted-text role="ghpull"}: Refactor from_levels_and_colors. - `14790`{.interpreted-text role="ghpull"}: DOC:Add link to style examples in matplotlib.style documentation - `14799`{.interpreted-text role="ghpull"}: Deprecate dates.mx2num. - `14793`{.interpreted-text role="ghpull"}: Remove sudo tag in travis - `14795`{.interpreted-text role="ghpull"}: Autodetect whether a canvas class supports blitting. - `14794`{.interpreted-text role="ghpull"}: DOC: Update the documentation of homepage of website - `14629`{.interpreted-text role="ghpull"}: Delete HTML build sources to save on artefact upload time - `14792`{.interpreted-text role="ghpull"}: Fix spelling typos - `14789`{.interpreted-text role="ghpull"}: Prefer Affine2D.translate to offset_transform in examples. - `14783`{.interpreted-text role="ghpull"}: Cleanup mlab.detrend. - `14791`{.interpreted-text role="ghpull"}: Make \'extended\' and \'expanded\' synonymous in font_manager - `14787`{.interpreted-text role="ghpull"}: Remove axis_artist \_update, which is always a noop. - `14758`{.interpreted-text role="ghpull"}: Compiling C-ext with incorrect FreeType libs makes future compiles break - `14763`{.interpreted-text role="ghpull"}: Deprecate math_symbol_table function directive - `14762`{.interpreted-text role="ghpull"}: Decrease uses of get_canvas_width_height. - `14748`{.interpreted-text role="ghpull"}: Cleanup demo_text_path. - `14740`{.interpreted-text role="ghpull"}: Remove sudo tag in travis - `14737`{.interpreted-text role="ghpull"}: Cleanup twin axes docstrings. - `14729`{.interpreted-text role="ghpull"}: Small simplifications. - `14726`{.interpreted-text role="ghpull"}: Trivial simplification to Axis3d.\_get_coord_info. - `14718`{.interpreted-text role="ghpull"}: Add explanations for single character color names. - `14710`{.interpreted-text role="ghpull"}: Pin pydocstyle\<4.0 - `14709`{.interpreted-text role="ghpull"}: Try to improve the readability and styling of matplotlibrc.template file - `14278`{.interpreted-text role="ghpull"}: Inset axes bug and docs fix - `14478`{.interpreted-text role="ghpull"}: MNT: protect from out-of-bounds data access at the c level - `14569`{.interpreted-text role="ghpull"}: More deduplication of backend_tools. - `14652`{.interpreted-text role="ghpull"}: Soft-deprecate transform_point. - `14664`{.interpreted-text role="ghpull"}: Improve error reporting for scatter c as invalid RGBA. - `14625`{.interpreted-text role="ghpull"}: Don\'t double-wrap in silent_list. - `14689`{.interpreted-text role="ghpull"}: Update embedding_in_wx4 example. - `14679`{.interpreted-text role="ghpull"}: Further simplify colormap reversal. - `14667`{.interpreted-text role="ghpull"}: Move most of pytest\'s conf to conftest.py. - `14632`{.interpreted-text role="ghpull"}: Remove reference to old Tk/Windows bug. - `14673`{.interpreted-text role="ghpull"}: More shortening of setup.py prints. - `14678`{.interpreted-text role="ghpull"}: Fix small typo - `14680`{.interpreted-text role="ghpull"}: Format parameters in descriptions with emph instead of backticks - `14674`{.interpreted-text role="ghpull"}: Simplify colormap reversal. - `14672`{.interpreted-text role="ghpull"}: Artist tutorial fixes - `14653`{.interpreted-text role="ghpull"}: Remove some unnecessary prints from setup.py. - `14662`{.interpreted-text role="ghpull"}: Add a \_check_getitem helper to go with \_check_in_list/\_check_isinstance. - `14666`{.interpreted-text role="ghpull"}: Update IPython\'s doc link in Image tutorial - `14671`{.interpreted-text role="ghpull"}: Improve readability of matplotlibrc.template - `14665`{.interpreted-text role="ghpull"}: Fix a typo in pyplot tutorial - `14616`{.interpreted-text role="ghpull"}: Use builtin round instead of np.round for scalars. - `12554`{.interpreted-text role="ghpull"}: backend_template docs and fixes - `14635`{.interpreted-text role="ghpull"}: Fix bug when setting negative limits and using log scale - `14604`{.interpreted-text role="ghpull"}: Update hist() docstring following removal of normed kwarg. - `14630`{.interpreted-text role="ghpull"}: Remove the private Tick.\_name attribute. - `14555`{.interpreted-text role="ghpull"}: Coding guidelines concerning the API - `14516`{.interpreted-text role="ghpull"}: Document and test \_get_packed_offsets() - `14628`{.interpreted-text role="ghpull"}: matplotlib \> Matplotlib in devel docs - `14627`{.interpreted-text role="ghpull"}: gitignore pip-wheel-metadta/ directory - `14612`{.interpreted-text role="ghpull"}: Update some mplot3d docs. - `14617`{.interpreted-text role="ghpull"}: Remove a Py2.4(!) backcompat fix. - `14605`{.interpreted-text role="ghpull"}: Update hist2d() docstring. - `13084`{.interpreted-text role="ghpull"}: When linking against libpng/zlib on Windows, use upstream lib names. - `13685`{.interpreted-text role="ghpull"}: Remove What\'s new fancy example - `14573`{.interpreted-text role="ghpull"}: Cleanup jpl_units. - `14583`{.interpreted-text role="ghpull"}: Fix overly long lines in setupext. - `14588`{.interpreted-text role="ghpull"}: Remove \[status\] suppress from setup.cfg. - `14591`{.interpreted-text role="ghpull"}: Style fixes for secondary_axis. - `14594`{.interpreted-text role="ghpull"}: DOC: Make temperature scale example use a closure for easier reusability - `14447`{.interpreted-text role="ghpull"}: FIX: allow secondary axes minor locators to be set - `14567`{.interpreted-text role="ghpull"}: Fix unicode_minus + usetex. - `14351`{.interpreted-text role="ghpull"}: Remove some redundant check_in_list calls. - `14550`{.interpreted-text role="ghpull"}: Restore thumbnail of usage guide - `10222`{.interpreted-text role="ghpull"}: Use symlinks instead of copies for test result_images. - `14267`{.interpreted-text role="ghpull"}: cbook docs cleanup - `14556`{.interpreted-text role="ghpull"}: Improve \@deprecated\'s docstring. - `14557`{.interpreted-text role="ghpull"}: Clarify how to work with threads. - `14545`{.interpreted-text role="ghpull"}: In contributing.rst, encourage kwonly args and minimizing public APIs. - `14533`{.interpreted-text role="ghpull"}: Misc. style fixes. - `14542`{.interpreted-text role="ghpull"}: Move plot_directive doc to main API index. - `14499`{.interpreted-text role="ghpull"}: Improve custom figure example - `14543`{.interpreted-text role="ghpull"}: Remove the \"Developing a new backend\" section from contributing guide. - `14540`{.interpreted-text role="ghpull"}: Simplify backend switching in plot_directive. - `14539`{.interpreted-text role="ghpull"}: Don\'t overindent enumerated list in plot_directive docstring. - `14537`{.interpreted-text role="ghpull"}: Slightly tighten the Bbox API. - `14223`{.interpreted-text role="ghpull"}: Rewrite intro to usage guide. - `14495`{.interpreted-text role="ghpull"}: Numpydocify axes_artist.py - `14529`{.interpreted-text role="ghpull"}: mpl_toolkits style fixes. - `14528`{.interpreted-text role="ghpull"}: mathtext style fixes. - `13536`{.interpreted-text role="ghpull"}: Make unit converters also handle instances of subclasses. - `13730`{.interpreted-text role="ghpull"}: Include FreeType error codes in FreeType exception messages. - `14500`{.interpreted-text role="ghpull"}: Fix pydocstyle D403 (First word of the first line should be properly capitalized) in examples - `14506`{.interpreted-text role="ghpull"}: Simplify Qt tests. - `14513`{.interpreted-text role="ghpull"}: More fixes to pydocstyle D403 (First word capitalization) - `14496`{.interpreted-text role="ghpull"}: Fix pydocstyle D208 (Docstring is over-indented) - `14347`{.interpreted-text role="ghpull"}: Deprecate rcsetup.validate_path_exists. - `14383`{.interpreted-text role="ghpull"}: Remove the ``package_data.dlls`` setup.cfg entry. - `14346`{.interpreted-text role="ghpull"}: Simplify various validators in rcsetup. - `14366`{.interpreted-text role="ghpull"}: Move test_rcparams test files inline into test_rcparams.py. - `14401`{.interpreted-text role="ghpull"}: Assume that mpl-data is in its standard location. - `14454`{.interpreted-text role="ghpull"}: Simplify implementation of svg.image_inline. - `14470`{.interpreted-text role="ghpull"}: Add \_check_isinstance helper. - `14479`{.interpreted-text role="ghpull"}: fstringify backend_ps more. - `14484`{.interpreted-text role="ghpull"}: Support unicode minus with ps.useafm. - `14494`{.interpreted-text role="ghpull"}: Style fixes. - `14465`{.interpreted-text role="ghpull"}: Docstrings cleanups. - `14466`{.interpreted-text role="ghpull"}: Let SecondaryAxis inherit get_tightbbox from \_AxesBase. - `13940`{.interpreted-text role="ghpull"}: Some more f-strings. - `14379`{.interpreted-text role="ghpull"}: Remove unnecessary uses of unittest.mock. - `14483`{.interpreted-text role="ghpull"}: Improve font weight guessing. - `14419`{.interpreted-text role="ghpull"}: Fix test_imshow_pil on Windows. - `14460`{.interpreted-text role="ghpull"}: canvas.blit() already defaults to blitting the full figure canvas. - `14462`{.interpreted-text role="ghpull"}: Register timeout pytest marker. - `14414`{.interpreted-text role="ghpull"}: FEATURE: Alpha channel in Gouraud triangles in the pdf backend - `13659`{.interpreted-text role="ghpull"}: Clarify behavior of the \'tight\' kwarg to autoscale/autoscale_view. - `13901`{.interpreted-text role="ghpull"}: Only test png output for mplot3d. - `13338`{.interpreted-text role="ghpull"}: Replace list.extend by star-expansion or other constructs. - `14448`{.interpreted-text role="ghpull"}: Misc doc style cleanup - `14310`{.interpreted-text role="ghpull"}: Update to Bounding Box for Qt5 FigureCanvasATAgg.paintEvent() - `14380`{.interpreted-text role="ghpull"}: Inline \$MPLLOCALFREETYPE/\$PYTEST_ADDOPTS/\$NPROC in .travis.yml. - `14413`{.interpreted-text role="ghpull"}: MAINT: small improvements to the pdf backend - `14452`{.interpreted-text role="ghpull"}: MAINT: Minor cleanup to make functions more self consistent - `14441`{.interpreted-text role="ghpull"}: Misc. docstring cleanups. - `14440`{.interpreted-text role="ghpull"}: Interpolations example - `14402`{.interpreted-text role="ghpull"}: Prefer `mpl.get_data_path()`, and support Paths in FontProperties. - `14420`{.interpreted-text role="ghpull"}: MAINT: Upgrade pytest again - `14423`{.interpreted-text role="ghpull"}: Fix docstring of subplots(). - `14410`{.interpreted-text role="ghpull"}: Use aspect=1, not aspect=True. - `14412`{.interpreted-text role="ghpull"}: MAINT: Don\'t install pytest 4.6.0 on Travis - `14377`{.interpreted-text role="ghpull"}: Rewrite assert np.\* tests to use numpy.testing - `14399`{.interpreted-text role="ghpull"}: Improve warning for case where data kwarg entry is ambiguous. - `14390`{.interpreted-text role="ghpull"}: Cleanup docs of bezier - `14400`{.interpreted-text role="ghpull"}: Fix to_rgba_array() for empty input - `14308`{.interpreted-text role="ghpull"}: Small clean to SymmetricalLogLocator - `14311`{.interpreted-text role="ghpull"}: travis: add c code coverage measurements - `14393`{.interpreted-text role="ghpull"}: Remove remaining unicode-strings markers. - `14391`{.interpreted-text role="ghpull"}: Remove explicit inheritance from object - `14343`{.interpreted-text role="ghpull"}: acquiring and releasing keypresslock when textbox is being activated - `14353`{.interpreted-text role="ghpull"}: Register flaky pytest marker. - `14373`{.interpreted-text role="ghpull"}: Properly hide \_\_has_include to support C++\<17 compilers. - `14378`{.interpreted-text role="ghpull"}: Remove setup_method - `14368`{.interpreted-text role="ghpull"}: Finish removing jquery from the repo. - `14360`{.interpreted-text role="ghpull"}: Deprecate `boxplot(..., whis="range")`. - `14376`{.interpreted-text role="ghpull"}: Simplify removal of figure patch from bbox calculations. - `14363`{.interpreted-text role="ghpull"}: Make is_natively_supported private. - `14330`{.interpreted-text role="ghpull"}: Remove remaining unittest.TestCase uses - `13663`{.interpreted-text role="ghpull"}: Kill the PkgConfig singleton in setupext. - `13067`{.interpreted-text role="ghpull"}: Simplify generation of error messages for missing libpng/freetype. - `14358`{.interpreted-text role="ghpull"}: DOC boxplot `whis` parameter - `14014`{.interpreted-text role="ghpull"}: Disallow figure argument for pyplot.subplot() and Figure.add_subplot() - `14350`{.interpreted-text role="ghpull"}: Use cbook.\_check_in_list more often. - `14348`{.interpreted-text role="ghpull"}: Cleanup markers.py. - `14345`{.interpreted-text role="ghpull"}: Use importorskip for tests depending on pytz. - `14170`{.interpreted-text role="ghpull"}: In setup.py, inline the packages that need to be installed into setup(). - `14332`{.interpreted-text role="ghpull"}: Use raw docstrings instead of escaping backslashes - `14336`{.interpreted-text role="ghpull"}: Enforce pydocstyle D412 - `14144`{.interpreted-text role="ghpull"}: Deprecate the \'warn\' parameter to matplotlib.use(). - `14328`{.interpreted-text role="ghpull"}: Remove explicit inheritance from object - `14035`{.interpreted-text role="ghpull"}: Improve properties formatting in interpolated docstrings. - `14018`{.interpreted-text role="ghpull"}: pep8ing. - `13542`{.interpreted-text role="ghpull"}: Move {setup,install}\_requires from setupext.py to setup.py. - `13670`{.interpreted-text role="ghpull"}: Simplify the logic of axis(). - `14046`{.interpreted-text role="ghpull"}: Deprecate checkdep_ps_distiller. - `14236`{.interpreted-text role="ghpull"}: Simplify StixFonts.get_sized_alternatives_for_symbol. - `14101`{.interpreted-text role="ghpull"}: Shorten \_ImageBase.\_make_image. - `14246`{.interpreted-text role="ghpull"}: Deprecate public use of makeMappingArray - `13740`{.interpreted-text role="ghpull"}: Deprecate plotfile. - `14216`{.interpreted-text role="ghpull"}: Walk the artist tree when preparing for saving with tight bbox. - `14305`{.interpreted-text role="ghpull"}: Small grammatical error. - `14104`{.interpreted-text role="ghpull"}: Factor out retrieval of data relative to datapath - `14016`{.interpreted-text role="ghpull"}: pep8ify backends. - `14299`{.interpreted-text role="ghpull"}: Fix #13711 by importing cbook. - `14244`{.interpreted-text role="ghpull"}: Remove APIs deprecated in mpl3.0. - `14068`{.interpreted-text role="ghpull"}: Alternative fix for passing iterator as frames to FuncAnimation - `13711`{.interpreted-text role="ghpull"}: Deprecate NavigationToolbar2Tk.set_active. - `14280`{.interpreted-text role="ghpull"}: Simplify validate_markevery logic. - `14273`{.interpreted-text role="ghpull"}: pep8ify a couple of variable names. - `14115`{.interpreted-text role="ghpull"}: Reorganize scatter arguments parsing. - `14271`{.interpreted-text role="ghpull"}: Replace some uses of np.iterable - `14257`{.interpreted-text role="ghpull"}: Changing cmap(np.nan) to \'bad\' value rather than \'under\' value - `14259`{.interpreted-text role="ghpull"}: Deprecate string as color sequence - `13506`{.interpreted-text role="ghpull"}: Change colorbar for contour to have the proper axes limits\... - `13494`{.interpreted-text role="ghpull"}: Add colorbar annotation example plot to gallery - `14266`{.interpreted-text role="ghpull"}: Make matplotlib.figure.AxesStack private - `14166`{.interpreted-text role="ghpull"}: Shorten usage of `@image_comparison`. - `14240`{.interpreted-text role="ghpull"}: Merge up 31x - `14242`{.interpreted-text role="ghpull"}: Avoid a buffer copy in PillowWriter. - `9672`{.interpreted-text role="ghpull"}: Only set the wait cursor if the last draw was \>1s ago. - `14224`{.interpreted-text role="ghpull"}: Update plt.show() doc - `14218`{.interpreted-text role="ghpull"}: Use stdlib mimetypes instead of hardcoding them. - `14082`{.interpreted-text role="ghpull"}: In tk backend, don\'t try to update mouse position after resize. - `14084`{.interpreted-text role="ghpull"}: Check number of positional arguments passed to quiver() - `14214`{.interpreted-text role="ghpull"}: Fix some docstring style issues. - `14201`{.interpreted-text role="ghpull"}: Fix E124 flake8 violations (closing bracket indentation). - `14096`{.interpreted-text role="ghpull"}: Consistently use axs to refer to a set of Axes - `14204`{.interpreted-text role="ghpull"}: Fix various flake8 indent problems. - `14205`{.interpreted-text role="ghpull"}: Obey flake8 \"don\'t assign a lambda, use a def\". - `14198`{.interpreted-text role="ghpull"}: Remove unused imports - `14173`{.interpreted-text role="ghpull"}: Prepare to change the default pad for AxesDivider.append_axes. - `13738`{.interpreted-text role="ghpull"}: Fix TypeError when plotting stacked bar chart with decimal - `14151`{.interpreted-text role="ghpull"}: Clarify error with usetex when cm-super is not installed. - `14107`{.interpreted-text role="ghpull"}: Feature: draw percentiles in violinplot - `14172`{.interpreted-text role="ghpull"}: Remove check_requirements from setupext. - `14158`{.interpreted-text role="ghpull"}: Fix test_lazy_imports in presence of \$MPLBACKEND or matplotlibrc. - `14157`{.interpreted-text role="ghpull"}: Isolate nbagg test from user ipython profile. - `14147`{.interpreted-text role="ghpull"}: Dedent overindented list in example docstring. - `14134`{.interpreted-text role="ghpull"}: Deprecate the dryrun parameter to print_foo(). - `14145`{.interpreted-text role="ghpull"}: Remove warnings handling for fixed bugs. - `13977`{.interpreted-text role="ghpull"}: Always import pyplot when calling matplotlib.use(). - `14131`{.interpreted-text role="ghpull"}: Make test suite fail on warnings. - `13593`{.interpreted-text role="ghpull"}: Only autoscale_view() when needed, not after every plotting call. - `13902`{.interpreted-text role="ghpull"}: Add support for metadata= and pil_kwargs= in imsave(). - `14140`{.interpreted-text role="ghpull"}: Avoid backslash-quote by changing surrounding quotes. - `14132`{.interpreted-text role="ghpull"}: Move some toplevel strings into the only functions that use them. - `13708`{.interpreted-text role="ghpull"}: Annotation.contains shouldn\'t consider the text+arrow\'s joint bbox. - `13980`{.interpreted-text role="ghpull"}: Don\'t let margins expand polar plots to negative radii by default. - `14075`{.interpreted-text role="ghpull"}: Remove uninformative entries from glossary. - `14002`{.interpreted-text role="ghpull"}: Allow pandas DataFrames through norms - `14114`{.interpreted-text role="ghpull"}: Allow SVG Text-as-Text to Use Data Coordinates - `14120`{.interpreted-text role="ghpull"}: Remove mention of \$QT_API in matplotlibrc example. - `13878`{.interpreted-text role="ghpull"}: Style fixes for floating_axes. - `14108`{.interpreted-text role="ghpull"}: Deprecate FigureCanvasMac.invalidate in favor of draw_idle. - `13879`{.interpreted-text role="ghpull"}: Clarify handling of \"extreme\" values in FloatingAxisArtistHelper. - `5602`{.interpreted-text role="ghpull"}: Automatic downsampling of images. - `14112`{.interpreted-text role="ghpull"}: Remove old code path in layout.html - `13959`{.interpreted-text role="ghpull"}: Scatter: make \"c\" and \"s\" argument handling more consistent. - `14110`{.interpreted-text role="ghpull"}: Simplify scatter_piecharts example. - `14111`{.interpreted-text role="ghpull"}: Trivial cleanups. - `14085`{.interpreted-text role="ghpull"}: Simplify get_current_fig_manager(). - `14083`{.interpreted-text role="ghpull"}: Deprecate FigureCanvasBase.draw_cursor. - `14089`{.interpreted-text role="ghpull"}: Cleanup bar_stacked, bar_unit_demo examples. - `14063`{.interpreted-text role="ghpull"}: Add pydocstyle checks to flake8 - `14077`{.interpreted-text role="ghpull"}: Fix tick label wobbling in animated Qt example - `14070`{.interpreted-text role="ghpull"}: Cleanup some pyplot docstrings. - `6280`{.interpreted-text role="ghpull"}: Added ability to offset errorbars when using errorevery. - `13679`{.interpreted-text role="ghpull"}: Fix passing iterator as frames to FuncAnimation - `14023`{.interpreted-text role="ghpull"}: Improve Unicode minus example - `14041`{.interpreted-text role="ghpull"}: Pretty-format subprocess logs. - `14038`{.interpreted-text role="ghpull"}: Cleanup path.py docstrings. - `13701`{.interpreted-text role="ghpull"}: Small cleanups. - `14020`{.interpreted-text role="ghpull"}: Better error message when trying to use Gtk3Agg backend without cairo - `14021`{.interpreted-text role="ghpull"}: Fix ax.legend Returns markup - `13986`{.interpreted-text role="ghpull"}: Support RGBA for quadmesh mode of pcolorfast. - `14009`{.interpreted-text role="ghpull"}: Deprecate compare_versions. - `14010`{.interpreted-text role="ghpull"}: Deprecate get_home() - `13932`{.interpreted-text role="ghpull"}: Remove many unused variables. - `13854`{.interpreted-text role="ghpull"}: Cleanup contour.py. - `13866`{.interpreted-text role="ghpull"}: Switch PyArg_ParseTupleAndKeywords from \"es\" to \"s\". - `13945`{.interpreted-text role="ghpull"}: Make unicode_minus example more focused. - `13876`{.interpreted-text role="ghpull"}: Deprecate factor=None in axisartist. - `13929`{.interpreted-text role="ghpull"}: Better handle deprecated rcParams. - `13851`{.interpreted-text role="ghpull"}: Deprecate setting Axis.major.locator to non-Locator; idem for Formatters - `13938`{.interpreted-text role="ghpull"}: numpydocify quiverkey. - `13936`{.interpreted-text role="ghpull"}: Pathlibify animation. - `13984`{.interpreted-text role="ghpull"}: Allow setting tick colour on 3D axes - `13987`{.interpreted-text role="ghpull"}: Deprecate mlab.{apply_window,stride_repeat}. - `13983`{.interpreted-text role="ghpull"}: Fix locator/formatter setting when removing shared Axes - `13957`{.interpreted-text role="ghpull"}: Remove many unused variables in tests. - `13981`{.interpreted-text role="ghpull"}: Test cleanups. - `13970`{.interpreted-text role="ghpull"}: Check vmin/vmax are valid when doing inverse in LogNorm - `13978`{.interpreted-text role="ghpull"}: Make normalize_kwargs more convenient for third-party use. - `13972`{.interpreted-text role="ghpull"}: Remove \_process_plot_var_args.set{line,patch}\_props. - `13795`{.interpreted-text role="ghpull"}: Make \_warn_external correctly report warnings arising from tests. - `13885`{.interpreted-text role="ghpull"}: Deprecate axisartist.grid_finder.GridFinderBase. - `13913`{.interpreted-text role="ghpull"}: Fix string numbers in to_rgba() and is_color_like() - `13935`{.interpreted-text role="ghpull"}: Deprecate the useless switch_backend_warn parameter to matplotlib.test. - `13952`{.interpreted-text role="ghpull"}: Cleanup animation tests. - `13942`{.interpreted-text role="ghpull"}: Make Cursors an (Int)Enum. - `13953`{.interpreted-text role="ghpull"}: Unxfail a now fixed test in test_category. - `13925`{.interpreted-text role="ghpull"}: Fix passing Path to ps backend when text.usetex rc is True. - `13943`{.interpreted-text role="ghpull"}: Don\'t crash on str(figimage(\...)). - `13944`{.interpreted-text role="ghpull"}: Document how to support unicode minus in pgf backend. - `13802`{.interpreted-text role="ghpull"}: New rcparam to set default axes title location - `13855`{.interpreted-text role="ghpull"}: `a and b or c` -\> `b if a else c` - `13923`{.interpreted-text role="ghpull"}: Correctly handle invalid PNG metadata. - `13926`{.interpreted-text role="ghpull"}: Suppress warnings in tests. - `13920`{.interpreted-text role="ghpull"}: Style fixes for category.py. - `13889`{.interpreted-text role="ghpull"}: Shorten docstrings by removing unneeded :class:/:func: + rewordings. - `13911`{.interpreted-text role="ghpull"}: Fix joinstyles example - `13917`{.interpreted-text role="ghpull"}: Faster categorical tick formatter. - `13918`{.interpreted-text role="ghpull"}: Make matplotlib.testing assume pytest by default, not nose. - `13894`{.interpreted-text role="ghpull"}: Check for positive number of rows and cols - `13895`{.interpreted-text role="ghpull"}: Remove unused setupext.is_min_version. - `13886`{.interpreted-text role="ghpull"}: Shorten Figure.set_size_inches. - `13859`{.interpreted-text role="ghpull"}: Ensure figsize is positive finite - `13877`{.interpreted-text role="ghpull"}: `zeros_like(x) + y` -\> `full_like(x, y)` - `13875`{.interpreted-text role="ghpull"}: Style fixes for grid_helper_curvelinear. - `13873`{.interpreted-text role="ghpull"}: Style fixes to grid_finder. - `13782`{.interpreted-text role="ghpull"}: Don\'t access internet during tests. - `13833`{.interpreted-text role="ghpull"}: Some more usage of \_check_in_list. - `13834`{.interpreted-text role="ghpull"}: Cleanup FancyArrowPatch docstring - `13811`{.interpreted-text role="ghpull"}: Generate Figure method wrappers via boilerplate.py - `13797`{.interpreted-text role="ghpull"}: Move sphinxext test to matplotlib.tests like everyone else. - `13770`{.interpreted-text role="ghpull"}: broken_barh docstring - `13757`{.interpreted-text role="ghpull"}: Remove mention of \"enabling fontconfig support\". - `13454`{.interpreted-text role="ghpull"}: Add \"c\" as alias for \"color\" for Collections - `13756`{.interpreted-text role="ghpull"}: Reorder the logic of \_update_title_position. - `13744`{.interpreted-text role="ghpull"}: Restructure boilerplate.py - `13369`{.interpreted-text role="ghpull"}: Use default colours for examples - `13697`{.interpreted-text role="ghpull"}: Delete pyplot_scales example. - `13726`{.interpreted-text role="ghpull"}: Clarify a bit the implementation of blend_hsv. - `13731`{.interpreted-text role="ghpull"}: Check for already running QApplication in Qt embedding example. - `13736`{.interpreted-text role="ghpull"}: Deduplicate docstrings and validation for set_alpha. - `13737`{.interpreted-text role="ghpull"}: Remove duplicated methods in FixedAxisArtistHelper. - `13721`{.interpreted-text role="ghpull"}: Kill pyplot docstrings that get overwritten by \@docstring.copy. - `13690`{.interpreted-text role="ghpull"}: Cleanup hexbin. - `13683`{.interpreted-text role="ghpull"}: Remove axes border for examples that list styles - `13280`{.interpreted-text role="ghpull"}: Add SubplotSpec.add_subplot. - `11387`{.interpreted-text role="ghpull"}: Deprecate [Axes3D.w](){x,y,z}axis in favor of .{x,y,z}axis. - `13671`{.interpreted-text role="ghpull"}: Suppress some warnings in tests. - `13657`{.interpreted-text role="ghpull"}: DOC: fail the doc build on errors, but keep going to end - `13647`{.interpreted-text role="ghpull"}: Fix FancyArrowPatch joinstyle - `13637`{.interpreted-text role="ghpull"}: BLD: parameterize python_requires - `13633`{.interpreted-text role="ghpull"}: plot_directive: Avoid warning if plot_formats doesn\'t contain \'png\' - `13629`{.interpreted-text role="ghpull"}: Small example simplification. - `13620`{.interpreted-text role="ghpull"}: Improve watermark example - `13589`{.interpreted-text role="ghpull"}: Kill Axes.\_connected. - `13428`{.interpreted-text role="ghpull"}: free cart pendulum animation example - `10487`{.interpreted-text role="ghpull"}: fixed transparency bug - `13551`{.interpreted-text role="ghpull"}: Fix IndexError for pyplot.legend() when plotting empty bar chart with label - `13524`{.interpreted-text role="ghpull"}: Cleanup docs for GraphicsContextBase.{get,set}\_dashes. - `13556`{.interpreted-text role="ghpull"}: Cleanup warnings handling in tests. - `8100`{.interpreted-text role="ghpull"}: Deprecate MAXTICKS, Locator.raise_if_exceeds. - `13534`{.interpreted-text role="ghpull"}: More followup to autoregistering 3d axes. - `13327`{.interpreted-text role="ghpull"}: pcolorfast simplifications. - `13532`{.interpreted-text role="ghpull"}: More use of cbook.\_check_in_list. - `13520`{.interpreted-text role="ghpull"}: Register 3d projection by default. - `13394`{.interpreted-text role="ghpull"}: Deduplicate some code between floating_axes and grid_helper_curvelinear. - `13527`{.interpreted-text role="ghpull"}: Make SubplotSpec.num2 never None. - `12249`{.interpreted-text role="ghpull"}: Replaced noqa-comments by using Axes3D.name instead of \'3d\' for proje... Issues (125): - `16487`{.interpreted-text role="ghissue"}: Add link to blog to front page - `16478`{.interpreted-text role="ghissue"}: The bottom parameter of plt.hist() shifts the data as well, not just the baseline - `16280`{.interpreted-text role="ghissue"}: SymLogNorm colorbar incorrect on master - `16448`{.interpreted-text role="ghissue"}: Bad interaction between shared axes and pcolormesh sticky edges - `16451`{.interpreted-text role="ghissue"}: InvertedLogTransform inherits from deprecated base - `16420`{.interpreted-text role="ghissue"}: Error when adding colorbar to pcolormesh of a boolean array - `16114`{.interpreted-text role="ghissue"}: Prose error on website (first paragraph) - `8291`{.interpreted-text role="ghissue"}: Unable to pickle.load(fig) with mpl in jupyter notebook - `16173`{.interpreted-text role="ghissue"}: Constrained_layout creates extra axes when used with subgridspec - `16127`{.interpreted-text role="ghissue"}: nbformat 5.0.0 missing schema files - `15849`{.interpreted-text role="ghissue"}: Using pandas.Timestamp in blended coordinate system of ax.annotate. - `6015`{.interpreted-text role="ghissue"}: scatterplot axis autoscale fails for small data values - `15806`{.interpreted-text role="ghissue"}: 3.2.0 may break some Cartopy tests - `15852`{.interpreted-text role="ghissue"}: Lasso selector does not show in Jupyter notebook - `15820`{.interpreted-text role="ghissue"}: Show incomplete tick labels when using mixed chinese and english characters - `15770`{.interpreted-text role="ghissue"}: DOCS 2D Line label option `_nolegend_` is not documented - `15332`{.interpreted-text role="ghissue"}: Type promotion error with datetime bins in hist - `15611`{.interpreted-text role="ghissue"}: BUG: Qt5Agg window size regression - `7130`{.interpreted-text role="ghissue"}: Incorrect autoscaling of polar plot limits after scatter - `15576`{.interpreted-text role="ghissue"}: Multi-line ticks cause cut-offs - `8609`{.interpreted-text role="ghissue"}: Clipped tick labels - `15517`{.interpreted-text role="ghissue"}: antialiased image check seems wrong when used on zoomed image - `13400`{.interpreted-text role="ghissue"}: Qt Embedding w/ Spyder - `14724`{.interpreted-text role="ghissue"}: drawstyle parameter of line needs example - `13619`{.interpreted-text role="ghissue"}: Importing matplotlib.animation prevents python script from executing in the background - `14270`{.interpreted-text role="ghissue"}: Secondary axis called with \[0, 1\] might produce exceptions in case these are invalid data - `15417`{.interpreted-text role="ghissue"}: Why is smart_bounds() being deprecated? - `9778`{.interpreted-text role="ghissue"}: Blanks in colorbar just inside of \'extend\' arrowpoints when using AxesGrid - `15336`{.interpreted-text role="ghissue"}: DivergingNorm is a misleading name - `15399`{.interpreted-text role="ghissue"}: OSError: \[Errno 86\] Bad CPU type in executable: \'convert\' on import matplotlib.animation - `15109`{.interpreted-text role="ghissue"}: matplotlib.collections inheritance diagram small/blurry - `15331`{.interpreted-text role="ghissue"}: Log Scale: FloatingPointError: underflow encountered in power - `15251`{.interpreted-text role="ghissue"}: Large memory growth with log scaling and linear ticking - `15247`{.interpreted-text role="ghissue"}: Colorbar tick placement issues with ImageGrid and LogNorm - `15306`{.interpreted-text role="ghissue"}: Footer off centre - `13485`{.interpreted-text role="ghissue"}: Matplotlib NavigationToolbar2Tk disappears when reducing window size - `15232`{.interpreted-text role="ghissue"}: DOC: Automatic default rcParam expansion creates misleading sentences - `14141`{.interpreted-text role="ghissue"}: setting spine position on a log plot fails - `15138`{.interpreted-text role="ghissue"}: Make plt.style.use accept path-like objects in addition to string - `14207`{.interpreted-text role="ghissue"}: Check if point is in path or not by contains_point - `13591`{.interpreted-text role="ghissue"}: Style issues when building the docs with (future) Sphinx 2.0 - `8089`{.interpreted-text role="ghissue"}: Using Minute Locator to set x-axis ticks exceeds Locator.MAXTICKS - `15075`{.interpreted-text role="ghissue"}: sphinxext.missing_references does not specify if it supports parallel file read. - `10963`{.interpreted-text role="ghissue"}: Replace pgfimage by includegraphics in PGF backend - `15156`{.interpreted-text role="ghissue"}: ax.text fails with positional argument error - `14439`{.interpreted-text role="ghissue"}: hist() fails when all data points are np.nan - `15042`{.interpreted-text role="ghissue"}: How to handle sphinx nitpicky mode - `14060`{.interpreted-text role="ghissue"}: quiver(C=\...) argument is not reasonably validated - `11335`{.interpreted-text role="ghissue"}: TST: testing not catching bad escape sequences in doc strings - `15040`{.interpreted-text role="ghissue"}: Wrong figure window size after calling fig.set_size_inches() repeatedly - `15100`{.interpreted-text role="ghissue"}: Issue with creating QApplication in QT backend - `14887`{.interpreted-text role="ghissue"}: kerning seems generally wrong - `14800`{.interpreted-text role="ghissue"}: default tick formatter could switch to scientific notation earlier - `14503`{.interpreted-text role="ghissue"}: Add a test for #14451 - `14907`{.interpreted-text role="ghissue"}: ConnectionPatch across axes needs to be excluded from layout management - `14911`{.interpreted-text role="ghissue"}: Removing a shared axes via `ax.remove()` leads to an error. - `12462`{.interpreted-text role="ghissue"}: cbar.add_lines should allow manually adding lines, not just contour sets - `14796`{.interpreted-text role="ghissue"}: Show user how to use Agg buffer in example - `14883`{.interpreted-text role="ghissue"}: MinSize not respected using wx backend causes wxAssertionError. Bug fix included. - `15014`{.interpreted-text role="ghissue"}: Wrapping of text adds leading newline character if first word is long - `14918`{.interpreted-text role="ghissue"}: constrained_layout fails with hidden axis\... - `14981`{.interpreted-text role="ghissue"}: Barplot call crashes when called with yscale=\"log\" and bins with h=0 - `4621`{.interpreted-text role="ghissue"}: Default bottom of Stepfilled histograms should be set according to ymin - `15030`{.interpreted-text role="ghissue"}: Doc build broken - `8093`{.interpreted-text role="ghissue"}: set_ylim not working with plt.axis(\'equal\') - `6055`{.interpreted-text role="ghissue"}: Serious problems on the axes documentation - `9979`{.interpreted-text role="ghissue"}: Axis limits are set badly with small values in scatter(). - `10842`{.interpreted-text role="ghissue"}: Text bbox empty dict should be ignored - `13698`{.interpreted-text role="ghissue"}: The default logit minor locator should not display tick labels - `14878`{.interpreted-text role="ghissue"}: plt.yscale doesn\'t throw warning with invalid kwarg - `5619`{.interpreted-text role="ghissue"}: Symlog linear region - `14564`{.interpreted-text role="ghissue"}: Broken string interpolation - `13668`{.interpreted-text role="ghissue"}: Add better error message to plt.axis() - `14563`{.interpreted-text role="ghissue"}: colorbar label prints \"None\" when label=None - `13660`{.interpreted-text role="ghissue"}: Closing a matplotlib figure with event handling occasionally causes "TypeError: isinstance()" - `13033`{.interpreted-text role="ghissue"}: \'NoneType\' has no attribute \'\_alive\' when using plt in a context manager - `13891`{.interpreted-text role="ghissue"}: Blurry app icon on macOS - `14656`{.interpreted-text role="ghissue"}: Axes title default color - `14831`{.interpreted-text role="ghissue"}: DOC: Webpage not formatted correctly on gallery docs - `13819`{.interpreted-text role="ghissue"}: Aspect ratio for not so common scales - `8878`{.interpreted-text role="ghissue"}: Setting aspect ratio for semi-log plots - `4900`{.interpreted-text role="ghissue"}: UnboundLocalError: local variable \'aspect_scale_mode\' referenced before assignment - `14608`{.interpreted-text role="ghissue"}: Issue with using plt.axis(\'equal\') with plt.polar(theta,r) plot - `12893`{.interpreted-text role="ghissue"}: \[PyQt\] NavigationToolbar2QT : Error when removing tools - `14670`{.interpreted-text role="ghissue"}: indicate_inset rectangles is sensitive to axis-flipping - `14362`{.interpreted-text role="ghissue"}: Add link to style examples in matplotlib.style documentation - `6295`{.interpreted-text role="ghissue"}: restore_region is not documented as a method of FigureCanvas - `14754`{.interpreted-text role="ghissue"}: Better pointer to dev docs on website - `14744`{.interpreted-text role="ghissue"}: Savefig svg fails with \"Cannot cast array data from dtype(\'\