What’s new?¶
This page lists the API changes with each version. Authors are shown next to each change. Where not indicated, Luke Davis was the author. See the author page for a list of contributors, and see the contribution guide if you are interested in submitting your own changes.
Important
Please note that when classes, functions, keywords, or settings are deprecated, they are not removed – using the old syntax will result in a warning rather than an error and preserve the original functionality. Since proplot adheres to semantic versioning, we will not consider removing the deprecated syntax until the first major release (i.e., version 1.0.0).
Version 1.0.0 (####-##-##)¶
This will be published when more comprehensive testing is completed and stability is improved.
Version 0.10.0 (2022-##-##)¶
Deprecated¶
Remove the obscure
proplot.figure.Figure.formatkeywordmathtext_fallback, so thatrc['mathtext.fallback']can only be changed globally (@5ce23a59).Rename
rasterizeandrc['colorbar.rasterize']torasterized, consistent with the existing matplotlibrasterizedproperty (@31efafea).Rename
basemapandrc.basemaptobackendandrc['geo.backend'], which can take either of the values'cartopy'or'basemap', and auto-translate and emit warning whenbasemapis used (@613ab0ea, @eb77cbca).Rename
rc['cartopy.autoextent'],rc['cartopy.circular']torc['geo.extent'],rc['geo.round'], withrc['geo.extent']taking either of the values'globe'or'auto'(cartopy.autoextentis translated when used) (@c4b93c9d).Improve the
GridSpec“panel” obfuscation by renamingget_subplot_geometrytoget_geometry,get_geometrytoget_total_geometry(@52f57094).Improve the
GridSpec“panel” obfuscation by having the publicGridSpecpropertiesgs.nrows,gs.ncols,gs.wratios,gs.hratios,gs.wspace,gs.hspace,gs.wpad, andgs.hpadrefer to the reduced non-panel geometry (@52f57094).Deprecate
maxnandmaxn_minorpassed tocolorbarand recommend the alternativelocator_kw={'nbins': n}(@b94a9b1e). The new default locatorDiscreteLocatormeans that these settings should not need to be used as much (see below).Constructor funcs
Locator,Formatter,Scale, andNormnow return acopy.copywhen an instance of the relevant class is passed (@521351a2). This helps prevent unexpected and hard-to-debug behavior caused by reusing mutable instances.
Style changes¶
Disable automatic reversal of dependent variable coordinates when the axis limits were previously fixed, and add documentation for this feature (GH#300).
Automatically disable minor colorbar and axis ticks when applying non-numeric major tick labels with a
FixedFormatter(@c747ae44).Use
DiscreteLocatorfor major/minor discrete colorbar ticks instead ofFixedLocatorand auto-update the tick selection whenever the axes is drawn (@b94a9b1e, @92bb937e, @302c239e).Disable matplotlib’s auto-removal of gridlines in presence of
pcolorplots in all versions and silence the matplotlib 3.5 deprecation warning (@ba405ac0). Now gridlines appear on top of pcolor meshes by default, just like filled contours.Apply the
rc['geo.round']setting (formerlyrc['cartopy.circular']) when instantiating polar basemap projections (@5f1c67cc). Previously this setting was only used for cartopy projections.Put outer legends or colorbars on the same panel axes if their
alignvalues differ and (for colorbars only) theirlengths do not overlap (@91ac49b7). This permits e.g. aligned “bottom left” and “bottom right” outer legends.Change the sample
show_fontstext withmathkeyword to show math or non-math, sort fonts by input order or by their appearance in therclist, and permitFontPropertiesor fontspec input and property keywords (@34d6ec14).Change
rc['mathtext.default']from'regular'to'it', and change'sans'appearing in therc['mathtext.rm'],rc['mathtext.sf'],rc['mathtext.bf'], andrc['mathtext.it']settings to'regular'(@323). See below for details.Change
rc['grid.labelpad']from4.0to3.0(@f95b828a). This makes cartopy grid labels and polar axes labels a bit more compact.Change
rc['legend.handleheight']from1.5to2.0for less compressedPatchhandles (e.g. with error shading) (@2a5f6b48).
Features¶
Support passing lists for the
proplot.axes.Axes.formatkeywordsabcandtitle, in which case the label is picked by selecting thenumber(minus 1) entry from the list (GH#294) by Pratiman Patel.Permit disabling a-b-c labels for a particular subplot by passing e.g.
number=Noneinstead ofnumber=False(@f7308cbe).Noneis a bit more intuitive.Add the modifiable
proplot.figure.Figure.tightproperty to retrieve and optionally toggle the tight layout setting (@46f46c26).Add a top-level
subplotcommand that returns a figure and a single subplot, analogous tosubplots(@8459c24c).Improve performance of the “tight layout” algorithm in cartopy axes by skipping artists clipped by the axes background patch boundary (@f891e4f0).
Improve default appearance of figures with top/right panels and colorbars and with the tight layout algorithm disabled (@c4a3babb).
Allow passing
wequal,hequal, andequaltoFigurealong with other scalar gridspec parameters (@d9e62c54).Add the
rc['subplots.equalspace']andrc['subplots.groupspace']settings to control tight layout default values forequalandgroup(@b4bf072d).Add the
wgroup,hgroup, andgroupkeywords (analogous towequal, etc.) to optionally disable tight layout behavior of comparing adjacent subplot “groups” rather than all subplots in the row or column (@b4bf072d).Permit passing
GridSpecinstances toadd_subplotsto quickly draw a subplot inside each gridspec slot in row or column-major order (@a9ad7429).Add
copymethod to re-use the same gridspec geometry for multiple figures (re-using an existing gridspec is otherwise not possible) (@8dc7fe3e, @be410341, @a82a512c).Permit adding additional outer panels or colorbars (or panels) by calling methods from the panel rather than the main subplot (@cfaeb177).
Permit adding “filled” colorbars to non-subplots and
lengthgreater than one by implementing with a non-subplot child axes and inset locator (@9fc94d21).Allow using the
Projkeywordlatlimas Mercator projection limits andlon0,lat0aliases forlon_0,lat_0(@5f1c67cc).Add the
GeoAxeslabelsside options'neither','both', and'all', analogous to Cartesian axesticklocoptions (@0f4e03d2).Add the
proplot.axes.GeoAxes.gridlines_major,proplot.axes.GeoAxes.gridlines_minorproperties for additional customization or debugging issues (@869f300f).Move the
extentandroundkeywords (formerlyautoextentandcircular– see above) from__init__toproplot.axes.GeoAxes.format, supporting toggling and passage to e.g.subplots(@5f1c67cc).Add
rc['grid.geolabels']setting that auto-includes cartopy'geo'location when toggling labels with e.g.lonlabels='left'orlabels=True, and support passing it explicitly with e.g.labels='geo'(@9040cde0).Add the
rc['grid.checkoverlap']setting to optionally disable the auto-removal of overlapping cartopy grid labels (only works in cartopy >= 0.20) (@3ff02a38).Add the public proplot class
proplot.ticker.IndexFormatter, since the matplotlib version was entirely removed in version 3.5 (@c2dd8b2e).Replace
matplotlib.ticker.IndexLocatorwithproplot.ticker.IndexLocator, consistent withIndexFormatter, and remove the limitation requiring data to be plotted on the axis (@c2dd8b2e).Permit picking the
NullFormatter,AutoFormatterNullLocator, andAutoLocatorby passingTrueorFalseto the corresponding constructor functions (@92ae0575).Add
proplot.ticker.DiscreteLocatoranalogous toFixedLocatorthat ticks from a subset of fixed values, and add adiscretekeyword and register as'discrete'inproplot.constructor.Locator(@b94a9b1e).Support specifying
transformplotting command arguments as registered cartopy projections rather thanCRSinstances (@c7a9fc95).Permit passing
vminandvmaxtoproplot.axes.Axes.colorbar, as quick alternative to usingnorm_kw(@eb9565bd).Permit discretizing continuous colormaps passed to
colorbarusingvalues, instead of ignoringvalueswhen colormaps are passed (@503af4be).Ensure the default ticks are aligned with levels when passing discrete colormap instances to
colorbar(@503af4be).Emit warning when both a scalar mappable and
vmin,vmax,norm, orvaluesare passed tocolorbar(@503af4be).Support TeX modifiers
rc['mathtext.it'],rc['mathtext.bf'], etc. that act on the “regular” font'regular'rather than a global font family like'sans'whenrc['mathtext.fontset']is'custom'(GH#323).Automatically load from “local” folders named
proplot_cmaps,proplot_cycles,proplot_colors, andproplot_fontsin current or parent directories, consistent with “local”proplotrcfiles (@a3a7bb33).Add the
proplot.config.Configurator.local_foldersfunction, analogous tolocal_files, and add alocalkeyword to eachregisterfunction (@a3a7bb33).
Bug fixes¶
Fix matplotlib >= 3.5 issue preventing basic application of “shared” axes with
share,sharex,sharey(GH#305).Fix matplotlib >= 3.5 issue preventing basic usage of
proplot.colors.DiscreteNormand colorbars scaled byproplot.colors.DiscreteNorm(GH#302).Fix matplotlib >= 3.5 issue where date axes are not correctly detected due to a new default date converter (@63deee21).
Fix matplotlib >= 3.4 issue with fixed-aspect log-log axes due to deprecation of
get_data_ratio_log(@29ed6cce).Fix matplotlib >= 3.4 issue where position of child axes in presence of subfigures is incorrect (@9246835f).
Fix matplotlib >= 3.4 issue where alternate axes are drawn twice due to adding them as child axes and failing to remove from the
fig._localaxesstack (GH#303).Fix matplotlib < 3.2.0 annoying
rc['examples.directory']deprecation warning message (GH#196).Fix matplotlib < 3.2.0 issue where
rc['axes.inbounds']feature fails due to private API invocation (@e3e739e4).Fix basic matplotlib < 3.1.2 usage issue due to missing
validate_fontweightvalidator (@1d2d05b7).Fix cartopy >= 0.20 issue where added projections like
'wintri'fail due to an ImportError (GH#324).Fix cartopy >= 0.20 issue where inline longitude and latitude gridline labels can no longer be turned on (GH#307).
Fix cartopy >= 0.20 issue where user-specified longitude/latitude gridline label sides ignored due to using booleans instead of
'x','y'(@2ac40715).Fix cartopy >= 0.18 issue where longitude gridlines and labels 360 degrees east of gridlines on the left edge of the map are unnecessarily removed (@bcf4fde3).
Fix cartopy < 0.18 issue where longitude gridlines and labels east of dateline are not drawn, and remove outdated gridliner monkey patches (@aa51512b).
Fix issue where tight layout algorithm can fail when labels from another subplot span over an empty gridspec slot (GH#313).
Fix issue where tight layout algorithm fails in the presence of subplots with overlapping or identical subplotspecs (@87f098b6).
Fix issue where super label settings (e.g. size) cannot be updated after they are initially created (@2cd72fd3).
Fix issue where
proplot.axes.CartesianAxes.formatkeyword arguments cannot be passed topanel_axes(@1b3d0d48).Fix issue where outer colorbars are drawn twice due to adding them as both figure-wide axes and child axes (GH#304).
Fix issue where silently-deprecated
aspectparameter passed toproplot.ui.subplotsis not translated torefaspect(@2406a2ae).Fix issue where
proplot.gridspec.GridSpec.figureis allowed to change – instead raise error that recommendscopy(@d8898f5f).Fix issue where
proplot.gridspec.GridSpec.updatecannot be called on gridspecs without companionFigures (@e69fd041).Fix issues passing pandas datetime coordinates and object-type coordinate arrays to plotting methods (GH#320).
Fix issue where hatching passed to
bardoes nothing unlessedgecoloris explicitly passed (GH#389).Fix issue where
boxpctilesis not recognized by e.g.barbutboxpctileis due to typo (GH#382).Fix issue where list-of-string colors passed to
scatterare interpreted as data values (GH#316).Fix issue where
stepwhereparameter is ignored due todrawstyleconversion (GH#359).Fix issue where x and y axis limits are reversed when passing to
hexbinandhist2d(GH#334).Fix regression where x or y axis limits are reversed when passing to
histandhisth(GH#334).Fix issue where settings passed to
colorbarafter calling e.g.pcolorwithcolorbar_kware ignored (GH#314).Fix issues where passing the colorbar
orientationwithout aloc, or using a non- standardorientationfor a givenloc, triggers tickloc error (GH#314).Fix issue where background properties like
colorandlinewidthcannot be passed toAxesinstantiation commands (@b67b046c).Fix issue where manual data aspect ratio passed with
formatorset_aspectis inverted (@7cda3b23).Fix issue where continuous normalizer
vminandvmaxare not set to min and max oflevelswhen passed toDiscreteNorm(@e9ed16c1).Fix issue where unevenly-spaced
levelscombined withDiscreteColormapincorrectly samples the color list (GH#299).Fix issue where
legendignores the user-inputfontsize(GH#331).Fix issue where
legendignores the user-inputfacecolorbut not the shorthandfc(GH#402).Fix issue where passing invalid rc setting to
.formatresults in persistent invalidrcstate requiring restarting the session/configurator (GH#348).Fix issue where
proplotrcsettings are ignored if a subsequent line contains an overlapping meta-setting (GH#333).Fix issue where setting
rc['legend.facecolor']orrc['legend.edgecolor']to'inherit'(or passing as keyword argument) raises error (GH#298).Fix issue where settings
rc['grid.pad']andrc['grid.labelpad']and settingsrc['tick.pad']andrc['tick.labelpad']are not synced (@2b96eb0d).Fix issue where the unchanged
rc['figure.figsize']setting is incorrectly included in thechangeddictionary (@d862395b).
Documentation¶
Version 0.9.5 (2021-10-19)¶
Style changes¶
Switch default
rc['cmap.diverging']from'NegPos'to the more popular and contrasty colormap'RdBu_r'(@b0b8557f).Switch default
rc['cmap.qualitative']from'flatui'to'colorblind10', consistent with the default color cycle'colorblind'(@b0b8557f).
Features¶
Apply
positive=True,negative=True, andsymmetric=Trueby modifyingvminandvmaxrather than levels (@fbca1063). This permits using these keywords even whendiscrete=Falseand fixes too-few-levels issues whendiscrete=True.Improve default string representation of axes generated with
altx,alty, orinset_axes(@a570fca7).
Bug fixes¶
Fix issue where “auto-diverging” application fails when colormap is not explicitly specified (@9ce6c61c).
Fix issue where “auto-diverging” application is not disabled when qualitative colormaps are specified with
colors(@44322db2).Fix issue where
sequential=True,cyclic=True, orqualitative=Trueare ignored when “auto-diverging” is applied (@cb4910fa).Fix issues where version 7.0 cyclic/diverging “scientific colour maps” are not internally recognized as cyclic/diverging (@df11445a).
Fix issue where
rc['cmap.discrete']set toFalseis used even for contour plots rather than ignored (@a527cc52).Fix issue where “cyclic” colormaps are allowed to have
extendother than'neither'when specified withcyclic=Truerather than passing a cycliccmap(@e91d9bf3).Fix issue where “qualitative” colormaps are allowed to have
discreteset toFalsewhen specified withqualitative=Truerather than passing a discretecmap(@789f224b).Fix issue where
SegmentedNormcannot be specified withnorm='segmented'andnorm_kw={'levels': level}whendiscreteis also disabled (@a4f6e838).Fix issue where more than one of mutually-exclusive
sequential,diverging,cyclic, andqualitativekeywords can be set toTrueand others are silently ignored without warning (@f14aa263).
Version 0.9.4 (2021-10-16)¶
Features¶
Permit passing arbitrary
formatarguments to multi-axes creation commands likesubplots(@0b801442).Permit passing
formatarguments for different projections during the sameproplot.gridspec.SubplotGrid.formatorproplot.figure.Figure.formatcall (@f5e25598). Invalid projection-specific keywords are ignored.Update Scientific Colour maps to version 7.0 (adds
'bam','bamO','batlowK','batlowW','bukavu','fes', and'vanimo') (@c172a74b).Add
[xy]labelsize,[xy]labelweight,[xy]ticklabelsize,[xy]ticklabelweightkeywords toproplot.axes.CartesianAxes.format(@975025df).Add
labelsizeandlabelweightkeywords toproplot.axes.PolarAxes.format,proplot.axes.GeoAxes.format(@975025df).Automatically set
xpinelocandyspinelocto'bottom'and'left'whenxboundsoryboundsare passed toproplot.axes.CartesianAxes.formatonly if both spines are currently visible (@a2396afe).Automatically use the top/right spine rather than the bottom/left spine when setting
xspinelocoryspinelocto the position('axes', coord)or('data', coord)whencoordis more than halfway across the axis (@a2396afe).Passing
[loninline|latinline|inlinelabels]=Truetoformatnow implies[lonlabels|latlabels|labels]=Trueunless specified otherwise (@ed372d64). This fixes annoying redundancy when callingformat.Improve default
reversedandshiftedcolormap names (@a4218e09).
Bug fixes¶
Fix issue where arguments can only be passed to
altxandalty, but nottwinxandtwiny(@223b55a6).Fix issue where
xbounds,ybounds, andfixticksfail due to errors in tick restriction algorithm (@a2396afe).Fix issue where passing
fontsizetoformatfails to update fontsize-relative title and a-b-c label sizes (@64406726).Fix issue where
lonlim,latlim, andlatboundscannot be passed to e.g.add_subplotduringGeoAxesinitialization (@d9d3c91a)Fix issue where
vminandvmaxare ignored when making plots with discrete levels (GH#276).Fix issue where
autodivergingis disabled even when known diverging colormaps are passed toPlotAxescommands (@2eca2198).Fix issue where colormaps made with
Colormapwith unspecifiednamecannot be assigned asrcdefaults (@0e93b7fa).Fix issue where registered colormaps with trailing
_ror_scannot be retrieved due to automatic reversing/shifting feature (@345680c9).
Version 0.9.3 (2021-10-09)¶
Style changes¶
Features¶
Permit passing background patch-related
formatkeywords likefacecoloron axes instantiation (@f863afd8).Add
rc['land.alpha'],rc['ocean.alpha'],rc['coast.alpha'],rc['rivers.alpha'],rc['lakes.alpha'],rc['borders.alpha'], andrc['innerborders.alpha']settings to change opacity of geographic features (@8bb49a02). Also add missingrc['coast.zorder'].Add
xtickcolor,ytickcolor,xticklabelcolor, andyticklabelcolorformatkeywords to control tick mark and label colors (@68cba1af). Also add documentation forxlabelcolorandylabelcolor.Add
xticklenratioandyticklenratioformatkeywords to scale minor tick lengths (@26fdadf6).Add
xtickwidth,ytickwidth,xtickwidthratio, andytickwidthratiokeywords toformatto scale tick widths (@30a250f0).Set default
gridlabelcolortocolorwhen latter is passed to polar or geo axesformatmethods, consistent withproplot.axes.CartesianAxescolor.Add
ticklen,ticklenratio,tickwidth,tickwidthratiokeywords tocolorbarto manage colorbar ticks (@08498abf).Add
labellockeyword tocolorbarto change the colorbar label location separately fromtickloc(@32069370).Permit specifying
linewidthandmarkersizekeywords (and aliases) with arbitrary physical units for format/colorbar/plotting commands (@c1ffbc8c).Add
absolute_sizekey toscatter(analogous toabsolute_widthused withbar) to bypass auto-scaling of array input (@b4701411).Add more intuitive
bars,boxes,shade,fadekeywords as alternatives tobarstds,boxstds,shadestds, andfadestds(@15812cd4).Ignore masked and invalid values in datasets passed to
boxplotandviolinplot(@daa666e2).Convert
showextrema=Truepassed toviolinplottobarpctiles=True(i.e., show 0–100 percentile range) (@42f613d6).Add
borderstyletextkeyword to change thejoinstyleused for the path effects border (@25e21c76).
Bug fixes¶
Fix issue with plotting in
ThreeAxesby inheriting from fromAxesinstead ofPlotAxes(@64623d92).Fix issue where
formatignoresmarginrather than using it for bothxmarginandymargin(@ba32fd1a).Fix issue where
colorpassed toformattriggers deprecation warning even though it is a valid background patch property (@a50eab0e).Fix issue where calling
violinplotalways emits warning due to masked array input (@daa666e2).Fix issue where calling
pcolorfastwith image output emits warning (@5d081306).Fix issue where passing
tickwidth=0toformatchanges the tick length persistently outside of context block (@4966c8ab).Fix issue where
tickratioandlenratioapplied in successive calls toformatfails to update properly (@26fdadf6).Fix issue with default
scattersminandsmax(used to convert array-like input sizessfrom data units topoints ** 2) by switching defaults to1andrc['lines.markersize']rather than the data minimum and maximum (@b4701411).
Version 0.9.2 (2021-09-30)¶
Features¶
Permit passing
includepanelsandmathtext_fallbackasproplot.figure.Figure.formatkeywords instead of just__init__keywords (@33bff576).Permit passing
locproplot.axes.CartesianAxes.formatkeyword argument(s) toalt[xy](@eaab8658). For exampleax.alty(loc='left')changes the spine, tick mark, tick label, axis label, and offset label sides to the opposite of the default: left for the new alternate axes, right for the original axes.Improve documentation for
locproplot.axes.CartesianAxes.formatkeywords (@1fa90f87, @48dc346d). Inheritance order islocorspineloc–>tickloc–>ticklabelloc–>labellocandoffsetloc, e.g.xloc='bottom'impliesxtickloc='bottom'unless specified otherwise.Do not inherit
ticklocfromspinelocif it is invalid (e.g.,'zero'), do not propagatespinelocandticklocto other settings if they are inferred from updated rc settings, and issue error message ifticklocorticklabellocare invalid (@616d81fa, @219e4b21, @bc5a692c).Add documentation for previously-hidden
xticklabelloc,yticklabelloc,xlabelloc, andylabellocproplot.axes.CartesianAxes.formatkeywords (@1fa90f87).Add
xoffsetloc,yoffsetlockeywords to control position of order-of-magnitude indicator location for x and y axes (with large numbers) (@96a37e53).Add
xlabelcolorandylabelcolorkeywords as alternatives toxcolorandycolorto change just the label color and nothing else (@d2f20970).Add
basekeyword toSigFigFormatterto optionally round to multiples other than factors of 10 (@3b00e8a0).Pass
[major|minor]_[locator|formatter]FuncScalearguments through the constructor functions (@e238d4db).Support single-color parametric plots with e.g.
ax.parametric(x, y, color='red')as quick alternative toplotwithout “sticky edges” (@98504b86).Support legend entries for parametric lines by interpreting
labelandvalueseparately fromlabelsandvalues(@14a0cfdc).Increase
zorderof title/a-b-c text from3to3.5so it overlies e.g. text contour labels (@77fa01da).Ensure contour
labelsappear on top of inner titles/a-b-c labels by decreasing defaultzorderfromcntr_zorder + 2tocntr_zorder + 1(@59222164).Implement “descending level” support directly inside
DiscreteNormrather than cmap parser inPlotAxescommands, and auto-reverse descending levels passed toSegmentedNorm(@46d8bedc).Improve
show_cmapsandshow_cycles: Stop passing arguments through constructor functions, preserve case for user colormap labels, and avoid showing leading_and trailing_copyin labels (@c41db8d8).
Bug fixes¶
Fix accidental commit of debugging print statement (@259a263b).
Fix issue where
includepanelsis not applied for spanning axis labels in presence of panels but only one spanning subplot (@b8bc55ec).Fix issue where default outer legend axes-relative
locdoes not take into account the underlying “panel” side (@2446acc1).Fix issue where axis label color is overwritten during
__init__call toproplot.axes.CartesianAxes.format(@b454a513).Fix issue where setting
xspinelocoryspinelocto invalidtickloc(e.g.,'zero'or'center') also disables the ticks (@616d81fa).Fix issue where setting axis label color without specifying label text erases the old label text (@7a7852f9).
Fix issue where axis label settings are overridden by settings from invisible x/y axis on alternate axes (@c6db292b).
Fix
AutoFormatterissue whereorderOfMagnitudeis not taken into account when correcting small tick values truncated to zero on (usually logarithmic) axis scales (@54fbef0b).Fix issue where
proplot.utils.arangeis not endpoint-inclusive for negative (descending) step size (@ec1f8410).Fix confusing behavior where explicitly passed
vminandvmaxare ignored ifnormwas passed as an already-instantiated class (@1ee79d36).Fix issue where segment data of
matplotlib.cmcolormap instances is overwritten during conversion to proplot subclasses (GH#283).Fix issue where color of contour
labelscannot be changed withlabels_kw(@d101575d).Fix keyword conflict where
sizesare interpreted asCollectionmarker sizes when passed tobarb(GH#287).Fix issue where “sticky edges” fail for datetime data (@33fa9654).
Version 0.9.1 (2021-09-14)¶
Style changes¶
Features¶
Permit passing
formatkeywords when instantiating figures and axes (@ae98378d). For example:pplt.figure(suptitle='Super title')orfig.add_subplot(111, xcolor='gray', xticks=10).Add back
coloras a validproplot.axes.CartesianAxes.formatkeyword arg for consistency withxcolorandycolor(@ecb6fa3f).
Bug fixes¶
Fix issue where single-level single-color contour plots do not draw the contour (GH#281).
Fix issue with dictionaries passed to
projwhen callingadd_subplots(@21b165df).Fix issue with
includepanelsdisabling spanning axis labels in the presence of panels (@332ba702).Remove useless “unexpected version” warning when cartopy is not installed (@6dbab1bc).
Improve backwards compatibility with
matplotlib.figure.Figure.colorbarby permitting positionalcaxandaxargs (@5003f9a8).Try to auto-disable relative bar widths for seaborn plots that use the
barandbarhcommands (@b79b9c60).
Version 0.9.0 (2021-09-08)¶
Deprecated¶
Rename
rc['cmap.edgefix']torc.edgefix(@515f5132). It now applies to bar and area plot elements, not just scalar mappables (see below).Deprecate passing lists of colors to
boxplotandviolinplotin favor of using the property cycler instead (see below) (@67d95349).The
violinplotfunctions now returnPolyCollectionof violin bodies or tuples of (bodies, error bars) instead of a singleton dictionary containing just the'bodies'entry (@45774536).Deprecate recently-introduced
proplot.gridspec.SubplotGrid.legendandproplot.gridspec.SubplotGrid.colorbarmethods (@d21a61a3). Idea was this could be used to add an auto-legend to each subplot withaxs.legend()or identical colorbars withaxs.colorbar(m), but in the future want to instead use these methods to add colorbars and legends along the edge of arbitrary subplots with e.g.axs[0, :2].colorbar(m, loc='bottom').Deprecate recently-introduced
proplot.gridspec.SubplotGrid.text(@80deb71a). Idea was this could be used to add identical text to each subplot but that is pretty niche, does not need a dedicated command.
Style changes¶
Fix issue where CSS/XKCD colors overwrite “base” color definitions, resulting in e.g.
'yellow'different from'y'(@01db1223, @b90bee8c).Make default label rotation for colorbar-of-artist string labels
0, consistent with string tick labels applied withautoformat=True(@3f191f3b).Use default
discrete=Falseforhist2dplots, consistent withhexbin(@267dd161). Now “discrete” levels are only enabled for pcolor/contour plots by default.Trigger
adjust_grayshue adjustments for gray-like color names passed tofrom_listthat aren’t technically pure gray, including'charcoal','light gray'/'light grey', and'gray[0-9]'/'grey[0-9]'(@6cf42896, @49bb9370).Implement “edgefix” and add
edgefixkeyword forbar,hist,area, andpieto fix the “white-lines-between-patches” issue with saved vector graphics, just likepcolorandcontourf(@cc602349, @b291b2be).Revert back to matplotlib default behavior of
edgecolor='none'forbarandpieplots (@cc602349, @b291b2be). Previously this behavior often resulted in “white lines” issue but nowedgefixis applied to these plots.Skip “edgefix” option when patch/collection
alphais less than1to prevent appearance of overlapping edges (@5bf9b1cc). Previously this was only skipped ifScalarMappablecolormap included transparency. Also remove manual blending of colorbar solids (no longer needed) (@4d059a31).The
boxplotandviolinplotfunctions now iterate through the property cycler for each box/violin by default (similar to seaborn) (@67d95349). The cycle can be changed withcycleandcycle_kwarguments.
Features¶
Add
alignkeyword with options'bottom','top','left','right', or'center'(with optional single-char shorthands) to change alignment for outer legends/colorbars (@4a50b4b2). Previously they had to be centered.Add
transposekeyword as alternative toorderfor 2DPlotAxescommands (GH#72).transpose=Trueis equivalent toorder='F'.Return homogeneous groupings of matplotlib artists in
silent_listobjects to simplify repr (@d59f9c40, @667cc068, @240f0b31, @0a6d74b7).Use built-in matplotlib logic for plotting multiple
histcolumns, with support forstackas alias ofstackedandwidthas alias ofrwidth(consistent withbarkeywords) (@734329a5). By default, histograms for successive columns are now grouped side-by-side instead of overlaid.Add
fillandfilledkeywords tohist, analogous tostackandstacked, and make passage of these keywords set the corresponding defaulthisttype(@4a85773b). Also addfilledalias offilltoboxplotfor consistency (@b5caf550).Always copy colormaps returned by
Colormapto avoid subsequently changing global colormap properties with e.g.set_alpha(@7a3c3f64).Add leading underscore to all default colormap names (
_name_rfor reversed,_name_sfor shifted,_name1_name2for merged, and_name_copyfor all other modifications) and never register colormaps returned byColormapthat begin with underscore (@a6fab19f, @1f6e6188). This is analogous tolegendignoring labels with leading underscore.Control colorbar frame properties using same syntax as legend frame properties –
edgewidth,edgecolor, and optional rounded box withfancybox=True(@58ce2c95). Colorbar outline is now controlled withlinewidthandcolor. Previously these settings had to be in sync.Auto-expand components of
silent_listandCollectionpassed tolegendthat have valid labels, similar to tuple group expansion (GH#277)Add
handle_kwtolegendto optionally control handle settings that conflict with frame settings (@58ce2c95). Example:handle_kw={'edgecolor': 'k'}.Interpret
'grey'as a synonym of'gray'by translating substrings in color database (@6cf42896, @04538bad). Permits e.g.color='grey1'.Permit loading color names from files without
.txtextension (@55481a9c). This restriction was unnecessary.Set
default=Trueautomatically if users passmarginorspacetoregister_colorsto permit quickly/succinctly experimenting with XKCD color filtering algorithm (@cfc3cef6).Add cartopy-based
LongitudeLocator,LatitudeLocator,DegreeLocator,LongitudeFormatter,LatitudeFormatter,DegreeFormatterto public API for consistency with other “registered” tickers (@76e45c0c).
Bug fixes¶
Fix issue where tuple
rcvalues are truncated to first scalar value when saving aproplotrc(@e731c709).Fix issue where channel-setting and scaling functions like
scale_luminancedrop the opacity channel (@58ce2c95).Fix issue where line plot coordinates get unnecessarily offset by
360by removing unnecessary_geo_monotonicstandardization (GH#274).Fix regression where
vminis ignored without explicitly specifyingvmaxand vice versa (GH#276).Fix issue where
scatterignoresfacecolorsinput by treating it the same as other color aliases (GH#275).Fix issue where calling
legend()without arguments generates duplicate labels for histograms (GH#277).Fix issue where list-of-list style input to
legendfails to trigger centered legend (@e598b470).Fix issue where
alphapassed to contour/pcolor/vlines/hlines commands was ignored due to translating asalphasrather thanalpha(@e5faf4d6).Fix unexpected behavior where
PlotAxestries to make list-of-artist style colorbars from successive calls to 2D plotting commands rather than making individual colorbars (@20ce93a1).Fix issue where
diverging=Trueis applied for datasets with bothdiscrete=Falseandvminorvmaxequivalent to0(@84b9f86e).Fix issue where
scatterdoes not accept N x 3 or N x 4 RGB[A] style arrays (@13df1841).Fix issue where importing seaborn issues 100 warnings due to overwriting seaborn colormaps added by proplot (@006aef5f).
Fix issue where
inboundspassed toscatterapplies only to axis-limit scaling, not cmap normalization scaling (@3d7636f2).Fix issue with color-parsing due to
_plot_errorshadingcoming after_parse_cyclerather than before (@acf545e2).Fix issue where violin plots cannot be drawn without adding error bars (e.g., with
means=True) or an error is raised (@c0d04835).Fix issue where explicitly specifying
bar[stds|pctiles]forviolinplotturns off the boxes if they were not specified (and vice versa forbox[stds|pctiles]) (@0edfff4e)
Internals¶
Add helpful warning message when
legenddetects invalid inputs rather than silently ignoring them (@b75ca185).Improve warning message when users pass both
colorsandcmapby recommending they useedgecolorto set edges (@1067eddf).Improve universal “rebuilding font cache” warning message when new users import proplot for the first time (@9abc894e).
Remove unused, mostly undocumented
rc['axes.titleabove']setting (@9d9d0db7). Users should be usingrc['title.above']instead.Move
SubplotGridfromfigure.pytogridspec.py(@7b688fc8). Makes more sense there.Improve organization of internal functions, add
data.py,context.py, andtext.pytointernalsand rename and re-sort relatedPlotAxesparsing utilities (@58ce2c95).Hide the “registered” axes names (i.e.,
nameattributes) from public API (@ece1102b). Users do not interact with the native matplotlib projection registration system.
Documentation¶
Update napoleon type aliases and specifiers (@c20ed1d1). Use
sequenceinstead oflistwherever params accept arbitrary sequences (@e627e95b).Improve documentation of style-type arguments like
lw,linewidth, etc. onPlotAxescommands (@cc602349).Improve documentation of
proplot.gridspec.SubplotGridmethods (@902502cc). Docstrings are no longer stubs.
Version 0.8.1 (2021-08-22)¶
Features¶
Add
from_listadjust_graysoption (enabled by default) to help make diverging colormaps with an intermediate hueless white, gray, or black color (@2e8cb495).Add the axis sharing level
4or'all'to share the limits, scales, and tick labels between axes not in the same row/column (@73f355a2).Allow adding contours to
legendby interpretinglabelkeyword and using central handle fromContourSet.legend_elements(@26bc77a4).Extend mixed auto-manual legend label input (e.g.
labels=[None, 'override']) to case where legend handles are automatically retrieved from the axes rather than manually passed tolegend()(@26bc77a4).Add
inlinelabelsoption toformatto set bothloninline=Trueandlatinline=Trueat once, and change therc['grid.loninline']andrc['grid.latinline']settings to the singlerc['grid.inlinelabels'](consistent withrc['grid.rotatelabels']andrc['grid.dmslabels']) (@560ed978).
Bug fixes¶
Fix regression where dimension reduction with e.g.
barstdsorbarptilesno longer ignores NaN values (GH#257, @d1906fce).Fix regression where
legend()cannot be called without the input handles (GH#188, @fdd53a6c).Fix issue where edge colors of area plots with
negpos=Truecannot be changed (@bb50dea4).Fix issue where
legendorderkeyword arg is ignored and default is changed back to'F'(@06666296).Fix issues where
setup_matplotlibis not called for pint quantity input and column iteration of 2D input to 1D funcs fails (@e57d238e).Fix issue where pint quantity x and y coordinates fail when passing as pcolor centers or when
rc['cmap.inbounds']enabled (@fd76af3a).Fix issue where pint quantity z data do not have units stripped unless in xarray dataarray (@aadc65f9).
Fix issue where making single-color contour plots creates just one contour by making default
levelscount independent fromcolors(@63eaf10e).Fix issue where common legend handle properties cannot be overridden due to searching for
collectionprops rather thanlineprops (@26bc77a4).Fix issue where title/abc padding is overwritten in the presence of top panels and make title deflection to top panels generally more robust (@d27d05cf).
Fix issues with the
%qtbackend usingforward=Falseduring subplot additions (GH#244, @ac12bbc2)Fix issue where
%matpolotlib notebookand%matplotlib widgetdisplay unusable/cutoff figure previews by fixing the figure size at creation time and issuing one-time warning if size was not fixed explicitly (@88fc2868).
Version 0.8.0 (2021-08-18)¶
Deprecated¶
Numbers passed to
pad,wpad,hpad,space,wspace,hspace,left,right,top, andbottomare now interpreted as em-widths instead of inches (@20502345). Unfortunately this is a major breaking change that cannot be “gently” phased in with warnings, but this will be much more convenient going forward.Interpret
sharex/sharey=Trueas3(i.e., “turn all sharing on”) instead of1(integer conversion ofTrue) (GH#51967ce3). This is more intuitive and matches convention elsewhere. Also allow specifying level 1 with'labels'and level 2 with'limits'.Rename
SubplotsContainerto simplerSubplotGridand move definition tofigure.py(@51967ce3).Deprecate arbitrary
__getattr__override forSubplotGrid(@51967ce3). Instead have dedicatedformat,colorbar,legend,[alt|dual|twin][xy],panel[_axes], andinset[_axes]methods.Rename setting
rc['abc.style']torc.abc(@a50d5264). Setting this toFalsestill “turns off” labels, setting toTrue“turns on” labels with the default style'a', and setting to a string “turns on” labels with this style.Rename
imagecategory settings torc['cmap.inbounds'],rc['cmap.discrete'],rc['cmap.edgefix'],rc['cmap.levels'], andrc['cmap.lut'](@a50d5264).Rename confusing
rc['text.labelsize']andrc['text.titlesize']settings to clearerrc['font.smallsize']andrc['font.largesize']with shorthandsrc['font.small']andrc['font.large'](analogous torc['font.size']) (@a50d5264). Previous names were bad because “label size” applies to more than just axis or tick labels and “title size” applies to more than just axes titles.Rename
rc['tick.ratio']torc['tick.widthratio']and add missingrc['tick.width']setting (@a50d5264).Rename vague shorthands
rc.alphaandrc.facecolorback to nativerc['axes.alpha']andrc['axes.facecolor']and renamerc.linewidthandrc.colortorc['meta.width']andrc['meta.color'](@41b5e400). Axes can still be updated by passingalpha,linewidth,facecolor, andedgecolortoformat, and nowformatsupports arbitrary patch artist settings and aliases likelw,ec,fc,hatch, etc.Change
Configuratoriteration behavior to loop over keys, not item pairs, and make it aMutableMapping(@5626bc88).Rename
proplot.config.Configurator.load_filetoproplot.config.Configurator.loadin order to matchsave(@1769d349).Change the default
Configuratorsave location from the home directory to the current directory and change the default filename toproplotrc(without the leading dot) (@41b5e400).Rename
gettofind(@e8559f3d). Confusing sincegetdidn’t accept a “fallback” second positional argument. Nowgetis the “dictionary-like” inherited method.Rename obscure
LinearSegmentedColormap,PerceptuallyUniformColormap, andListedColormapto more intuitive/succinctContinuousColormap,PerceptualColormap, andDiscreteColormap(@ade787f9). Important due to the “qualitative colormap” behaviors triggered when aDiscreteColormapis passed to plot commands (see features).Following above change, rename
LinearSegmentedNormto simplerSegmentedNorm, renameColormapargumentto_listedtodiscrete, changelistmodeoptions from'listed','linear'to'discrete','continuous', and addfilemodeoption (@ade787f9, @5ccd6c01).Deprecate
boxesandviolinsshorthands in favor of singularboxandviolin(@6382cf91). This feel analogous to existingbarandbarh.Rename the confusingly-capitalized
Colorstoget_colorsand move toutils.py(@51d480da). This is not a “class constructor” – it just returns lists of colors.Rename the
showfunction keywordcategoriestoinclude, consistent with the newignorekeyword (@c45d5fa1).
Style changes¶
Make default reference subplot size, panel widths, colorbar widths independent of
rc['font.size'](@a50d5264). Default space size should definitely sync with font size, since larger fonts produce larger labels between subplots, but the same reasoning does not apply for subplot size.Add
rc['leftlabel.rotation'],rc['toplabel.rotation'],rc['rightlabel.rotation'],rc['bottomlabel.rotation']settings, and make default row label rotation match y label rotation (@bae85113).Treat 2D
scatterarguments by iterating over columns and default-styling each column with the property cycle rather than unraveling 2D arguments into 1D arrays (@6382cf91). Can also iterate oversandccolumns.Exclude out-of-bounds data when determining automatic y (x) axis limits when x (y) limits have been explicitly set for
plotandscatterplots (@6382cf91). Controlled by therc['axes.inbounds']property, analogous torc['cmap.inbounds']used for cmap scaling. This feature leverages proplot’s input standardization.Capture
colorspassed to commands likecontourandpcolorand use it to build qualitativeDiscreteColormapmaps (@6382cf91). This matches the behavior of xarray plotting utilities. No longer usecolorto change “edge color” of filled contours/grid boxes.Add special qualitative cmap handling when
colors=colors,qualitative=True, orcmap=pcolors.DiscreteColormap(...)– always applyDiscreteNorm(ignore and warn if user passeddiscrete=False), truncate or wrap colors if there are too many/not enough for the levels, and add default extremes withset_underorset_overdepending on userextend(@6382cf91).Select
rc['cmap.diverging']and applyDivergingNormautomatically based on input data, similar to xarray and seaborn (@6382cf91). This is controlled withautodivergingand therc['cmap.autodiverging']setting. It is also disabled when a cmap is explicitly passed (unless it is a known diverging cmap).Set default linewidth to 0.3 when adding “edges” to filled contours (@6382cf91). This matches matplotlib behavior when passing edgecolor to a
pcolorcommand.Only modify
heatmapmajor and minor tick locations if the default tickers are active (@6382cf91). Do not override user tickers.Use default luminance of
90rather than100for auto-colormaps generated for barb, scatter, and streamline plots (@6382cf91).Sync 3D axes figure background color with axes background to avoid weird misaligned white square behind axes (@30a112bd).
Treat
rc['tick.label']andrc['grid.label']font size, color, and weight settings as synonyms (@a50d5264). In general the tick vs. grid distinction is not meaningful for text labels. However we often want different padding so still allowrc['tick.labelpad']andrc['grid.labelpad']to be distinct.Change default
rc['legend.facecolor']to white instead of inheriting from axes background (@6382cf91). Also set defaultrc['legend.edgecolor']torc['meta.color'](black by default) and havelegendread from rc settings rather than setting defaultlegendinput arguments.
Features¶
Dynamically add classes that are “registered” by contructor functions to the top-level namespace (@4382a1b1). This is consistent with behavior of importing custom-proplot tickers, norms, etc. to top-level namespace. Now e.g.
pplt.MultipleLocatororpplt.LogNormare allowed.Allow creating subplots with
figureand either (1) subsequently callingsubplotsor (2) passing integers or subplot specs generated byGridSpectoadd_subplot(@51967ce3). This is convenient for complex grids or mixed proj types.Add consistent/intuitive aliases
subplotandadd_subplotsfor native matplotlib commandsadd_subplotandsubplots(@51967ce3).Add
subplotgridproperty to access aSubplotGridafter drawing subplots one-by-one (@fb83384f).Implement physical-units
left,right,top,bottom,wspace, andhspacespaces directly on theGridSpecrather than externally (@20502345). Now absolute spaces are always preserved when figure size changes even if tight layout is disabled.Have
GridSpecdirectly handle “panel slots” (@20502345). Adding panels to a figure adds row or column “panel slots” to the gridspec and subsequently indexing the gridspec ignores those slots.Add tight layout “padding” arguments to
GridSpecand add gridspec parameters as optional arguments toFigure(@20502345). When a gridspec is added to the figure the arguments are passed to the gridspec. This replaces matplotlib’ssubplotparsandsubplots_adjust.Allow variable tight layout padding between subplot panels using
wpadandhpad, analogous towspaceandhspace(@20502345). Previously this was fixed atrc['subplots.innerpad'].Add
padkeyword tolegend,colorbar, andpanelthat controls local tight layout padding, analogous tospace(@20502345). Previously this was fixed atrc['subplots.panelpad'].Ensure
wequalandhequalonly apply to the main subplot rows and columns; always ignore panel and colorbar spaces (@20502345).Improve default behavior in presence of ‘outer’ colorbars + legends when
rc['subplots.tight']is disabled (@20502345).Add a
formatmethod for formatting every subplot in the figure when you don’t have aSubplotGridavailable (@20502345). Also move internal implementation of figure-wide settings there. Figure-wide settings likesuptitlecan still be updated fromAxes.format.Permit mutability of
SubplotGrid(@51967ce3). Power users may want to manipulate their own grids.Permit 2d indexing of
SubplotGridwith arbitrary gridspec geometry by looking up subplotspec indices (@51967ce3). Previously 2d indexing ofSubplotGridwith complex geometry would just return a wrong result.Issue warning message when users try
fig.subplots_adjust()orpplt.figure(subplotpars=SubplotParams)and auto-disable and warn when matplotlib “tight layout” rc settings are toggled (@51967ce3).Add nicer string representations of figures, gridspecs, subplotspecs, and axes clearly showing the geometry and layout (@51967ce3, @6382cf91).
Set default location for new axes panels to
'right', allowing for emptyax.panel_axes()calls (@51967ce3).Convert valid keyword arguments to positional arguments for virtually all plotting functions rather than a subset (@6382cf91). This expands the use of the
datakeyword and permits a seaborn-like workflow (for example,ax.plot(x='x_key', y='y_key', data=xarray_dataset)).Support
pint.Quantityarguments by auto-applyingsetup_matplotlibwith the quantity’s unit registry when a quantity is passed (@6382cf91).Support
pint.Quantityinput for z coordinates (e.g., toax.contourf) by stripping the units to prevent warning (@6382cf91).Support
xarray.DataArrayarguments containingpint.Quantityarrays by accessingdatarather than accessing.values(@6382cf91).Apply
pint.Quantitydefault unit labels to plots by formatting the units with the newrc.unitformatsetting (@6382cf91).Add
rc['cmap.sequential']='Fire',rc['cmap.diverging']='BuRd',rc['cmap.cyclic']='twilight', andrc['cmap.qualitative']='colorblind10'settings to control the default sequential, diverging, cyclic, and qualitative cmaps, and add booleansequential,diverging,cyclic, andqualitativekeywords to select corresponding default cmaps (@6382cf91).Add
robustkeyword argument andrc['cmap.robust']=Falsesetting to ignore outliers when selecting auto colormap ranges (GH#6382cf91). It can take the valueTrue, a percentile range, or a 2-tuple percentile interval.Add
rc['colorbar.rasterize']=Falsesetting to control whether default colorbar solids are rasterized (@a50d5264).Allow omitting the colormap name when instantiating colormap classes or using class methods like
from_list(@ade787f9). This is more intuitive.Improve matplotlib-proplot colormap translation by converting
matplotlib.colors.ListedColormaptoproplot.colors.DiscreteColormaponly if it has fewer thanrc['cmap.listedthresh']levels (@ade787f9). This is critical in case users import cmaps from other projects.Permit constructing property cycles with
Cycleby passingcoloras keyword argument (@86a50eb2). This is matplotlib-like workflow.Permit disabling property cycling with e.g.
cycle=False,cycle='none', orcycle=(), and re-enabling the default withcycle=True(@86a50eb2).Override
set_prop_cycleto pass the input arguments throughCycle(@86a50eb2). Features are a superset and this also lets me cache the cycler for comparison with on-the-fly inputs.Add shorthands
rc['grid.width'],rc['grid.style'],rc['gridminor.width'], andrc['gridminor.style']for the respectivelinewidthandlinestylesettings (@a50d5264)Permit “registering stuff” by passing files or objects to
register_cmaps,register_cycles,register_colors, andregister_fontsrather than forcing users to use the.proplotfolder (@ad999e95).Support case insensitivity when calling matplotlib’s
unregister_cmapby improvingColormapDatabaseso it derives from aMutableMappingrather thandict(@ade787f9).Add public
changedproperty to display a dictionary of settings changed from proplot defaults (@41b5e400).Add public
user_fileanduser_folderstatic methods for displaying folder locations (@b11d744a).Support XDG directories for proplot config files on Linux (GH#204, @5e6367dc). Also accept the file
~/.proplotrcand the folder~/.proploton all systems and raise a warning if duplicate valid files or folders are found.Make
rc_proplotandrc_matplotlibcontainers of proplot/matplotlib settings part of the public API (@a50d5264).Allow conversion of numeric inputs with
unitsusing e.g.pplt.units(num, 'in', 'cm')(@88f3dc88).Add more intuitive
rc['grid.labelpad']andrc['tick.labelpad']as aliases forrc['grid.pad']andrc['tick.pad'](@a50d5264).Add
lineandlinexcommand aliases forplotandplotx(@6382cf91). This is more intuitive.Add
stepxandstemxcommands analogous toplotx, and addhisth,boxploth(shorthandboxh), andviolinploth(shorthandviolinh) commands analogous tobarh(@6382cf91).Let 1D
PlotAxescommands iterate over columns of 2D x and y coordinate arrays instead of only 2D y coordinate arrays (@6382cf91.)Support expanded and consistent artist synonyms throughout plotting overrides, e.g.
ecforedgecolor,lwforlinewidth,fcandfillcolorforfacecolor(@6382cf91). This is a superset of matplotlib.Support passing positional fifth-argument colors to
barbsandquiver, just likescatter(@6382cf91). This was previously not possible.Support automatic labels for
tricontourandtripcolorplots alongside the more commoncontourandpcolor. (@6382cf91).Add
rasterizekeyword tocolorbarso that colorbar solids rasterization can be turned on (proplot turns off by default) (@6382cf91).Add
edgefixkeyword tocolorbarto control colorbar-solid edges and use shared_fix_edgesfunction (@6382cf91).Add
locationkeyword as alternative tolocfor legend and colorbar funcs (@5cb839fd).Add
alphabetizekeyword tolegendto optionally alphabetize handles by their labels (@6382cf91).Apply auto-detected xarray and pandas legend/colorbar titles even if the legend/colorbar are not drawn on-the-fly (GH#6382cf91).
Add
rc['colorbar.facecolor']andrc['colorbar.edgecolor']properties analogous to legend properties for controlling frame (@6382cf91).Treat singleton lists and tuple
legendinput same as scalar handle input, i.e. never triggers “centered row” specification (@6382cf91).Support auto-detection of tuple-grouped
legendhandle labels when labels not passed explicitly (@6382cf91).Automatically pull out grouped tuples of artists passed to
legendif they have differing labels (@6382cf91). This is useful for passing error shade groups.Silently ignore non-artist and non-container
legendinput – e.g., ignore the bins and values returned byhist(@6382cf91).Allow list-of-list “centered row”
legendspecification with e.g.[h, [h1, h2, h3]](i.e., mixed list and non-list input) (@6382cf91).Permit partial specification of
legendlabels, e.g.[h1, h2]paired with['label', None]overrides the artist label forh1but uses the artist label forh2(@6382cf91).Interpret all native matplotlib
legendspacing arguments (e.g.,borderpadandcolumnspacing) withunits(@6382cf91).Control edge width for legend frames with
eworedgewidthrather thanlwandlinewidthto avoid conflict with feature that permits modifying legend handle properties (@6382cf91).Make
proplot.axes.Axes.colorbarcapture matplotlib-nativeformatkeyword as alias forformatterandticklabels(GH#262).Support list-of-string parametric coordinates and format on-the-fly colorbar ticks with those string labels (@02fbda45). This may be a common use case for parametric plots.
Add
ignorekeyword to omit specificshow_cmaps,show_cycles, andshow_colorscategories from the tables (@c45d5fa1).Allow case-insensitive specification of
show_cmaps,show_cycles, andshow_colorscategories and never ignore input colormaps even if they match an ignored name like'jet'(@c45d5fa1).Support restricting cartopy bounds in cartopy 0.19 by leveraging the
ylimGridlinerproperty (@e190b66c).Add
xlabelpad,ylabelpad,xticklabelpad,yticklabelpadkeywords toformatand read and apply changedrc['axes.labelpad'](@e7d86b8f).Add support for “minor” radial and azimuthal gridlines in
proplot.axes.PolarAxes.format, controlled with keywords likerminorlocator, andthetaminorlocator(@59c85f0e).Add
thetagrid,rgrid,thetagridminor, andrgridminorkeys toproplot.axes.PolarAxes.formatto toggle gridlines, and read and apply changed toggles from rc settings – consistent with Cartesian axes (@59c85f0e).Add
title_kw,suptitle_kw,leftlabels_kw,rightlabels_kw,toplabels_kw, andbottomlabels_kwtoproplot.axes.Axes.formatfor arbitrarily modifying label text objects – consistent withxlabel_kwandylabel_kwused forproplot.axes.CartesianAxes.format(@6382cf91).
Bug fixes¶
Fix issue with unpacking iterables inside return statements in python < 3.8 (GH#268) by Eli Knaap.
Fix issue where auto layout algorithm recurses in popup backends (@51967ce3).
Fix issue where auto layout algorithm blows up in mpl 3.4+ (@51967ce3).
Fix issue where tight layout is effectively deactivated in mpl >= 3.4 due to
set_positionautomatically callingset_in_layout(False)(@20502345).Fix issue where thin pyplot-function wrappers e.g.
isinteractivedo not return results (@e62e3655).Fix issue where
proplot.config.Configurator.savepreserves the'#'in HEX strings, resulting in values that cannot be read back in withproplot.config.Configurator.load(@41b5e400).Fix issue where deprecated
aspectsubplotsargument is ignored (@70a8b87d).Fix issue where explicit user-input
widthis ignored when creating colorbars or panels and gridspec slot already exists (@51967ce3).Fix bug where the default space selection failed to use the figure-wide share setting (@51967ce3).
Fix bug where the reference subplot aspect ratio not preserved in presence of complex geometry with panels (@51967ce3).
Fix issue where a-b-c labels are removed in presence of
'top'panels withtitleabove=True(@7873d5e0).Fix issue where ‘aligned’ labels fail in recent matplotlib versions due to private matplotlib API change (@51967ce3).
Fix issue where
cmap.reverse()returns strange monochrome colormaps when channel values are specified by functions (e.g.,cubehelix) due to loop scope overwriting a non-local lambda function variable (@ade787f9).Fix issue where
_restrict_inboundsfails for reversed/descending axis limits (@6382cf91).Fix issues where cartopy minor gridlines are toggled on when map bounds are changed and basemap map boundary props cannot be modified (@c1f1a7de).
Turn off
_restrict_inboundsfor geographic projections to prevent issue where lon/lat coordinates are compared to map coordinates (@6382cf91). In-bounds colormap scaling for geographic projections may be added in a future version.Fix issue where error indications do not ignore masked values in masked numpy arrays (@6382cf91).
Fix issue where error shading objects are grouped into lists rather than tuples and are not combined into single handle when passed to
legend(GH#260).Fix issue where
parametricignoresinterpwhen selectingDiscreteNormcolormap levels (@152a3a81).Fix issue where tight layout padding is not respected for panels created from twin axes by ensuring panel parent is always the main axes (@e7d86b8f).
Fix obscure bug where axis labels in presence of mixed panels and non-panels are improperly shared (@06666296).
Stop overwriting user-input
spinelocwhen combined with user-input spinebounds(@e7d86b8f).Include children of
keywhen triggering complex synced settings (e.g., now we trigger application ofrc['tick.widthratio']when eitherrc['tick.width']orrc['meta.width']are changed) (@5626bc88).
Internals¶
Convert all plotting wrappers to dedicated overrides of individual functions in
PlotAxesclass (@6382cf91). This massively simplifies the internals and makes learning and adopting proplot much easier for users.Implement “panel” tracking and translation of physical spacing units directly on the
GridSpecinstead of cumbersome hidden methods inFigure(@20502345).Validate all setting assignments to
Configuratorusing a newrc_proplotdictionary, analogous torcParams(GH#109, @5626bc88). This helps avoid mysterious delayed bugs.Move
text,legend, andcolorbaroverrides to baseAxesclass separate fromPlotAxes(@6382cf91).Automatically redirect all internal plotting calls to native matplotlib methods (@6382cf91). This significantly improves stability.
Move
register_colorsinternals fromconfig.pytocolors.pyby breaking up into smaller functions (@ad999e95).Move
_versionto a separatedependencies.pyfile and allow more versatile comparison operations (@8806631d).Efficiently impose
GeoAxesdefaultslatlon=Trueandtransform=PlateCarree()in 90% fewer lines by looping over funcs.
Documentation¶
Move all plotting wrapper documentation to dedicated methods and remove references to wrappers in User Guide and Getting Started.
Embed
proplot.figure.Figuredocumentation insideproplot.ui.subplotsinstead of just referencing it.Embed
proplot.axes.Axes.formatdocumentation insideformatdocumentation for subclasses instead of just referencing it.Document the relative font size scalings with a table in
text(@6382cf91).Deprecate scattershot
Figureimmutable/documented properties (@51967ce3). These properties were just for documentation.Remove ancient deprecated getters and setters for
sharex,spanx, etc. once used with figure objects (@51967ce3). These properties were just for introspection, did not add any functionality.Rename
RcConfiguratortoConfigurator(@5626bc88). Previous name was redundant and needlessly verbose (thecinrcalready stands for “configuration”…). This class is public just for documentation – was not directly used by users.Rename
Axes3DtoThreeAxesso that class name fits more nicely amongst other class names (@30a112bd).Make
CartopyAxesandBasemapAxesprivate and remove the documentation (@25e759b0). These classes are just for internal implementation of different cartographic “backends” – behavior of public methods is the same for both. Instead just documentproplot.axes.GeoAxes.
Version 0.7.0 (2021-07-11)¶
Deprecated¶
Rename SciVisColor colormaps from
Blue1,Blue2, etc. to pluralsBlues1,Blues2, etc. to avoid name conflict with open-color colors (@8be0473f).Requesting the old names (case-sensitive) redirects to the new names (@3f0794d0). This permits making monochromatic open-color maps with e.g.
plot.Colormap('blue9')and feels more consistent with ColorBrewer convention of using plurals likeBlues,Reds, etc.Shuffle various SciVisColor colormap names to make them consistent/succinct. Make
Browns1the most colorful/vibrant one, just likeGreens1andBlues1; split up theRedPurplemaps intoRedsandPurples; and add theYellowscategory from theOrangesmaps (@8be0473f). Requesting the old names (case-sensitive) redirects to the new names (@3f0794d0).Add
rc['image.discrete']options anddiscretekeyword for togglingDiscreteNormapplication, and disable by default forimshow,matshow,spy,hexbin, andhist2dplots (GH#233, @5a7e05e4). Also makehexbinandhist2dbehavior withdiscrete=Truemore sane by using maximum possible counts for autoscaling, and changeDiscreteNormargumentextendto more intuitive nameunique.Rename
rc['subplots.pad']andrc['subplots.axpad']to more intuitiverc['subplots.outerpad']andrc['subplots.innerpad'](@3c7a33a8). Also renameFigurekeywords.Rename
widthandheightsubplotskeyword args tofigwidthandfigheightto avoid confusion withrefwidth/refheight(@12d01996). Will accept old keyword args without warning since they are used heavily.Rename
aspect,axwidth, andaxheightkeyword args to more intuitiverefaspect,refwidth, andrefheight(@12d01996). Will accept old keyword args without warning since they are used heavily.Rename
abovetopkeyword for moving title/abc labels above top panels, colorbars, and legends torc['title.above'](@9ceacb7b). Example usage:ax.format(title='Title', titleabove=True).Rename the
proplot.colors.PerceptuallyUniformColormap.from_colorkeywordsshade,fadetoluminance,saturationkeyword (@3d8e7dd0). These can also be passed toColormapwhen it is called with positional arguments.Rename seldom-used
Figureargumentfallback_to_cmto more understandablemathtext_fallback(GH#251).legend_extrasno longer returns the background patch generated for centered-row legends (GH#254). This is consistent withcolorbar_extrasnot returning background patches generated for inset colorbars. Until proplot adds new subclasses, it makes more sense if these functions only returnLegendandColorbarinstances.
Style changes¶
Use proplot TeX Gyre fonts with
use_stylestyles unless specified otherwise (@6d7444fe). Styles build on matplotlib defaults rather than proplot defaults for all other settings.Change default
rc['savefig.transparent']back toFalse(GH#252). Dubious justification forTruein the first place, and makes default PNG proplot figures unreadable wherever “dark mode” is enabled.Reduce default
rc['savefig.dpi']to 1000 (@bfda9c98). Nature recommends 1000, Science recommends “more than 300”, PNAS recommends 1000–1200. So 1000 is fine.Increase default
rc['colorbar.insetpad']to avoid recurring issue where ticklabels run close to the background patch (@f5435976)When using
medians=Trueormeans=Truewithindicate_errorplot simple error bars by default instead of bars and “boxes” (@4e30f415). Only plot “boxes” with central “markers” by default for violin plots (@13b45ccd).Determine colormap levels using only in-bounds data if the x or y axis limits were explicitly set (GH#209). Add
inboundsapply_cmapkeyword andrc['image.inbounds']setting to control this.Use
Artistlabels for the default list-of-artist colorbar tick labels ifvalueswas not passed – and if labels are non-numeric, rotate them 90 degrees for horizontal colorbars by default (@ed8e1314). Makes the choice between “traditional” legends and “colorbar-style” legends more seamless.Use same default-level generation algorithm for contour plots without colormaps as for all other colormap plots (@10e0f13b). Makes automatically-generated solid-color contours and colormap-style contours identical.
Use “sticky” edges in x-direction for lines drawn with
plot()and in y-direction for lines drawn withplotx()(GH#258). This eliminates padding along the “dependent” axis when limits are not specified, similar to histograms and barplots and matching a feature we previously added tofill_between(GH#166).If available, use
rc['pcolormesh.snap']to repair overlap in transparent colorbar solids rather than manual-blending workaround (@c9f59e49).
Features¶
Add the remaining commonly-used backend-related
pyplotfunctionsion,ioff,isinteractive, andswitch_backendto the top-levelproplotnamespace (@cd440155). This avoids forcing users to import pyplot inside a proplot session (the remaining pyplot functions are related to the “non-object-oriented” workflow, which proplot explicitly discourages).Add support for local
proplotrcfiles in addition to “hidden”.proplotrcfiles with leading dot (@8a989aca).Add minimal support for “3D”
Axes3Daxes (GH#249). Example usage:fig.subplots(proj='3d').Add
wequal,hequal, andequaloptions to still use automatic spacing but force the tight layout algorithm to make spacings equal (GH#215, GH#64) by Zachary Moon.Allow calling
proplot.colors.PerceptuallyUniformColormap.from_hslby passinghue,saturation, orluminancetoColormapwithout any positional arguments (@3d8e7dd0).Allow passing
alpha,luminance,saturationtoColormapas lists to be applied to each component cmap (@3d8e7dd0).Add convenient shorthands for channel references throughout colormap functions – e.g.
hfor hue,lforluminance, etc. (@3d8e7dd0).Add the
'Flare'and'Crest'seaborn colormaps (@14bc16c9). These are seaborn’s color cycle-friendly alternatives to existing maps.Add the
shift_huefunction analogous toscale_saturationandscale_luminance(@67488bb1).Add the
to_hexfunction and make all color-manipulation funcs return HEX strings by default (@67488bb1). Otherwisescatterthrows warnings.Use
90as the defaultluminancewhen creating monochromatic colormaps withto_listedset toTrue(as whenCyclecallsColormap; @3d8e7dd0).Add
plotxandscatterxcommands that interpret plotting args as(y, x)rather than(x, y), analogous toareax(GH#258).Add support for
indicate_errorhorizontal error bars and shading for horizontal plotting commandsbarh,plotx, andscatterx(GH#258).Add support for
ax.plot_command('x_key', 'y_key', data=dataset)for virtually all plotting commands usingstandardize_1dandstandardize_2d(GH#258). This was an existingplotfeature.Add support for the plotting style
ax.plot(x1, y1, fmt1, x2, y2, fmt2, ...)as allowed by matplotlib (GH#258).Add
absolute_widthkeyword tobar_extrasto makewidthargument absolute (GH#258). RemainsFalseby default.Add support for “stacked” plots to
vlinesandhlines(GH#258).Add
stackas alternative tostackedfor bar and area plots (@4e30f415). Imperative keywords are better.Allow passing e.g.
barstds=3orbarpctiles=90to request error bars denoting +/-3 standard deviations and 5-95 percentile range (@4e30f415).Add singular
indicate_errorkeywordsbarstd,barpctile, etc. as alternatives tobarstds,barpctiles, etc. (@81151a58). Also prefer them in the documentation.Permit different colors for
boxplotandviolinplotusing color lists (GH#217, GH#218) by Mickaël Lalande. Also allow passing other args as lists (@4e30f415).Allow passing
means=Truetoboxplotto toggle mean line (@4e30f415).Allow setting the mean and median boxplot linestyle with
(mean|median)(ls|linestyle)keywords (@4e30f415).Automatically set
fill=Truewhen passing a fill color or color(s) toboxplot_wrapper(@4e30f415).Allow updating
vlinesandhlinesstyling with singularcolorandlinestyleand all of their aliases (GH#258).Allow updating axes fonts that use scalings like
'small'and'large'by passingfontsize=Ntoformat(GH#212).Add
titlebboxandabcbboxas alternatives totitleborderandabcborderfor “inner” titles and a-b-c labels (GH#240) by Pratiman Patel. Borders are still used by default.Allow putting
titleandabcin the same location – the title and label are simply offset away from ech other (GH#402214f9). Padding between them is controlled by the new paramrc['abc.titlepad'].Add new
rc['suptitle.pad'],rc['leftlabel.pad'],rc['toplabel.pad'],rc['bottomlabel.pad'],rc['rightlabel.pad']settings to control padding used when aligning super labels (@402214f9). These can also be passed toformatand applied locally. The new defaults increase super title padding by a bit.More robust interpretation of
rc['abc.style']– now match case with first'a'or'A'in string, and only replace that one (GH#201).Interpret fontsize-relative legend rc params like
legend.borderpadwith'em'as default units rather than'pt'(@6d98fd44).Add
rc.basemapsetting for changing the default backend (@c9ca0bdd). If users have a cartopy vs. basemap preference, they probably want to use it globally.Add
rc['cartopy.circular']setting for optionally disabling the “circular bounds on polar projections” feature (@c9ca0bdd).Support the standard aliases
'ls','linestyle','linestyles', etc. inCyclecalls (@3d8e7dd0).Add
queuekeyword tocolorbarandlegendto support workflow where users successively add handles to location (GH#254).Add
nozerokeyword arg toapply_cmapto remove the zero contour from automatically generated levels (@10e0f13b). Example usage:ax.contour(x, y, z, nozero=True).Add
positiveandnegativekeyword args toapply_cmapfor requesting automatically-generated all-positive or all-negative levels (@335d58f4). Example usage:ax.contourf(x, y, z, positive=True).Add
rotationkeyword tocolorbar_wrapperfor rotating colorbar tick labels, likexrotationandyrotation(@2d835f20).Add
tickdirandtickdirectionkeywords tocolorbar_wrapperfor controlling tick style, likextickdirandytickdir(@f377f090).Allow specifying labels for auto-generated legends using a
'labels'key in alegend_kwkeyword argument (@a11d1813).Replace legends drawn in the same location by default rather than drawing two legends on top of each other (GH#254).
Add suffix
'_copy'to colormaps converted withto_listedandto_linear_segmentedto avoid accidental overwriting (@91998e93).Add
xmin,xmax,ymin, andymaxkeyword args toformatas alternatives toxlimandylim(@ae0719b7). Example usage:ax.format(xmin=0)as opposed toax.format(xlim=(0, None)).Allow passing full “side” names to
lonlabelsandlatlabelsrather than abbreviations, e.g.'left'instead of'l'(@a5060f67). This is more consistent with rest of package.Set default transform to
ccrs.PlateCarreewhen callingmatplotlib.axes.Axes.fillonCartopyAxes(GH#193). This is more consistent with rest of package.
Bug fixes¶
Fix 3 fatal issues preventing proplot import and basic usage in matplotlib >= 3.4 (GH#251).
Fix deprecation warnings associated with matplotlib 3.4 refactoring of subplot classes (GH#251).
Fix deprecated reference to
rc.fallback_to_cmin matplotlib >= 3.3 (GH#251).Fix
IndexFormatterdeprecation warning in matplotlib >= 3.3 by replacing with proplot-local copy (GH#251).Fix deprecation warning in matplotlib >= 3.3 – add
extendas mappable attribute rather than passing it tocolorbar()(@a23e7043).Fix issue where figures with fixed-aspect axes don’t scale properly in matplotlib >= 3.3 (GH#210, GH#235).
Fix issue where “twin” (“alternate”) axes content always hidden beneath “parent” content due to adding as children (GH#223).
Fix issue where default layout in complex subplot grids with non-adjacent edges is incorrect (GH#221).
Fix issue where
apply_cyclefails to merge mean-uncertainty legend handles due to presence of placeholder labels (@4e30f415).Fix issue where
standardize_1dinappropriately infers legend entries from y-coordinate metadata rather than column metadata (@4e30f415).Fix issue where
barbandquivercannot accept 1D data arrays (GH#255).Fix issue where cannot set
rc.style = 'default'(GH#240) by Pratiman Patel.Fix issue where
get_legendreturns None even with legends present (GH#224).Fix issue where new child axes reset row/col label settings (@f32d9703).
Fix issue where
DataArraystring coordinates are not extracted from container before applying as tick labels (GH#214).Fix issue where cannot set
extendother than'neither'forscattercolorbars (GH#206).Fix issue where
hexbinignoresvminandvmaxkeywords (GH#250).Fix issue where parametric plot x axis is reversed (@3bde6c47).
Fix issue where e.g.
ax.area(x, 0, y2, negpos=Truehas positive colors below x-axis and negative above x-axis (GH#258).Fix issue where “negpos” plots ignore
edgecolorbecause they passcolorrather thanfacecolorto plotting commands.Fix issue where cannot have datetime labels on
areaplots (GH#255).Fix issue where default orientation of
barhvertical axis is reversed (@258).Fix issue where
histwithxarray.DataArrayorpandas.Dataframeinput causes erroneous axis labels; use labels for legend instead (GH#195).Fix issue where axis is accidentally inverted for histogram plots (GH#191).
Fix issue where
[xy]minorlocator=1is not allowed (GH#219).Fix issue where inner titles ignore axes-local
titlepad(@14f3d0e3).Fix issue where we again fail to sufficiently pad title above tick marks with tick marks on top x-axis (@402214f9).
Fix issue where non-Cartesian
heatmaperrors rather than warns (GH#238).Fix issue where
labels=Truewith no contours causes error (GH#238).Fix issue where
Cyclefails to register new names and fails to display inshow_cycles(@94ffc1dc, @4a7a3c79).Fix issue where proplot ignores
set_underandset_overvalues when translating matplotlib colormap classes to proplot subclasses (GH#190).Fix issue where
DiscreteNormdoes not account forset_underandset_overcolors distinct from adjacent in-bounds colors (GH#190).Fix issue where proplot fails to detect legend entries for “outer” legends (GH#189).
Fix issue where list-of-list-style
legend()handle and label input fails completely (@a298f81f). This input style is used to specify “centered” legend rows.Fix error message when no legend handles are found (@2c6bf3e2).
Fix issue where multiple-artist legend entries (e.g., for lines indicating means and shading indicating uncertainty) are accidentally truncated (@a11d1813).
Fix issue where numeric zero cannot be applied as legend label (@02417c8c).
Fix issue where simple
pandas.DataFrame.plotcalls withlegend=Truefail (GH#254, GH#198).Fix unnecessary restriction where users can only draw <2 “alt” axes and clean up the
alt[xy]anddual[xy]internals (GH#226).Fix matplotlib bug where
altxandaltyreset the minor locator of the shared axis toAutoMinorLocatoreven if the axis scale is'log'(@2f64361d).Fix issue where axis coordinates are incorrect when
violinplotorboxplotreceive non-DataFrame input (@b5c3ec4c).Fix issue where
indicate_errorcannot accept 1D error bounds (@ef2d72cd).Fix issue where
show_cmapscannot display reversed colormaps (@2dd51177).Fix issue where
'grays_r'translated to'greys'(@074c6aef).First reverse, then shift
cmap_r_scolormaps (@e5156294).Fix obscure
parametricbug wherenumpy.stacktries to make nested ragged arrays from parametric coords (@b16d56a8).Fix issue where where
SubplotSpec.get_active_rows_columnsreturned incorrect number of “active” rows and columns (@5cf20b84).For rc lookup with
context=True, use most restrictive search mode rather than least. Otherwiseax.format()calls inside context blocks can be overwritten with the default rc values in subsequentax.format()calls (@8005fcc1).
Internals¶
Refactor massive
standardize_(1d|2d)and(cmap|cycle)_changerwrappers to break things into manageable chunks (GH#258, @6af22567, @d3352720).Refactor
colorbarandlegendmethods and their massive wrappers to clean things up and expand the “queueing” feature beyond wrappers (GH#254).Add prefix
'proplot_'to registered axes “projections” (@be7ef21e). More clear and guards against conflicts with external packages and other mpl versions.Add system for processing flexible keyword arguments across different commands to
internals/__init__.py. Analogous to mpl_aliasprocessing.
Documentation¶
Finally use
ppltas the recommended abbreviation:import proplot as pplt.Major clean up of “Why proplot?” page and user guide pages.
Fix incomplete
cmap.from_filedocstrings (@54f1bc7c).Rename “Changelog” to “What’s New?” and list all contributors in “About the Authors”.
Remove v0.6.0 renamed classes (e.g.
ProjAxes) from top-level namespace (@442e6aa6). These classes were public just for documentation.Rename public/documented funcs ending in
_wrapperto ending in_extrasto avoid implication they are the only funcs wrapping those commands (@d1e1e85b).Rename public/documented func
make_mapping_arrayto private function, following lead of matplotlib’smakeMappingArray(@66ae574b).Rename public/documented funcs
cmap_changerandcycle_changertoapply_cmapandapply_cycle(@86f7699a).
Version 0.6.4 (2020-06-13)¶
Features¶
Change
autoformatfrom aFigurekeyword argument into therc.autoformatrc setting (@3a7e5a7c).Combine shading and lines when drawing on-the-fly legends with
indicate_errorshading using tuple offill_between,plothandles, and haveshadelabelandfadelabelinstead create separate entries only when passed (GH#187).
Bug fixes¶
Fix major issue where calling
legend()without any handles triggers error rather than using default handles (GH#188).Fix issue where on-the-fly colorbar labels were ignored (@a642eeed).
Stop overwriting existing axis labels when
autoformat=Trueand DataArrays or DataFrames passed to plotting command (@76c7c586).Support single-level contours with colormap colors (GH#182).
Support changing line width, line style, and color properties for barb, quiver, streamplot, matshow, spy, and hist2d plots (GH#177).
Use
rc['patch.linewidth']for default bar edge width, stop setting default histogram plot linewidth to zero, and setrc['patch.linewidth']to0.6to match proplot’s default line width for lines, axes edges, and hatches (GH#186).
Version 0.6.3 (2020-06-02)¶
Version 0.6.2 (2020-06-02)¶
Features¶
Add
autoformatasstandardize_1dandstandardize_2dkeyword arg, so inheriting labels can be turned on/off for individual plots (@61258280).Share initial limits/scales/tickers from parent subplots when making new panels (@cf0d5d4e).
Permit negative “cuts” with
cutto expand the neutral zone of a diverging cmap (@94548d09).Add valid
formatarguments toaltxandalty, including[x|y]lim(@734f5940).Pass string
dual[x|y]arguments like'inverse'through theScaleconstructor (@413e1781).Add
'dms'locator and formatter, for degree-minute-second labels without cardinal direction indicators (@1b180cd2).Add “tau” formatter (@fc6a9752).
Restore default
rc['title.pad']to matplotlib value, stop artificially bumping uprc['title.pad']for “inner” titles (@7de1c1f4).Make custom formatters like
SciFormatterclasses rather than functions returningFuncFormatter(@7591f474).
Bug fixes¶
Various improvements to auto-figure sizing with Qt backend and when calling
print_figure(@db4e48d5, @82457347, @744d7d37).Suppress warning when
matplotlibrccontains non-style param (@4a0c7f10).Fix fatal
standardize_2derror whenautoformat=False(GH#181)Fix issue where
Colormap(..., alpha=alpha)made persistent changes to the original registered colormap (@cb24ea51).Prevent matplotlib deprecation warning by removing
set_smart_boundsdependency and improving axis scale transforms (@432576d8).Fix panel sharing issue in presence of stacked or multiple panels (@28eaf0ca).
Fix geographic feature toggling, zorder bugs (@acf0d5d4, @ea151b25).
Fix
histbug due tobar(..., width=width)now being relative to the x step size (@e32ed0bc).Fix bug where
savefigreceivesPathinstead of string (GH#176).
Documentation¶
Various improvements the API docstrings.
Improve overall website style (@89d6f5bd).
Make website “dark mode” darker (@979c8188).
Prevent website from flashing light mode when changing pages (@75e4d6a1).
Add documentation for
proplot.figure.Figure.savemethod (@da25266a).Remove
Figuresetters likeset_sharex, replace with read-only properties (@7b455008). The getters were only for object introspection. The setters never worked properly/were unused in examples.
Version 0.6.1 (2020-05-20)¶
Bug fixes¶
Fix issue where cartopy version checking fails if cartopy is not installed (@86cd50b8).
Fix issue where “tight” layout of geographic plots was broken in pre-v0.18 cartopy (@72cb93c6).
Fix issue where gridline coverage was incomplete in some zoomed-in projections (@458c6d7c).
Fix issue where basemap minor gridlines did not update when major gridlines were updated (@427326a7).
Version 0.6.0 (2020-05-20)¶
Deprecated¶
Remove the
geoaxesandgeogridrc settings (GH#168). Gridline settings are now controlled withgrid.Remove the
lonstepandlatstepsettings – we now useLongitudeLocatorandLatitudeLocatorto select “nice” gridline locations even when zoomed in (GH#168)Rename the
cartopy.globalrc setting tocartopy.autoextent(@7c0f118a) and add anautoextentkeyword (@23db0498).Rename several “error indication” keyword arguments and rename
add_errorbarswrapper toindicate_error(GH#166, @d8c50a8d).Remove
'rgbcycle'setting (GH#166, @6653b7f0). This was complicated to implement/did not add critical functionality.Deprecate support for “parametric” plots inside
plot, instead useparametric(@64210bce).Change
unitsunitskeyword argument to more naturaldest(@62903b48).Drop support for
.xrgband.xrgbafiles (@4fa72b0c). Not sure if any online sources produce these kinds of files.Drop support for
.rgbafiles, but optionally read 4th opacity column from.rgband.txtfiles (@4fa72b0c).Remove
'Blue0'SciVisColor colormap (GH#149, @7cb4ce0f). It was odd man out in the table, and not even really perceptually uniform.Remove custom proplot cycles – these should be thought out much more carefully (@43f65d17).
Remove “crayola” colors and clean up the
register_colorsalgorithm (GH#149, @8922d6de). Crayola color names less intuitive than XKCD.Use
'cmap_s'instead of'cmap_shifted'to quickly get a 180 degree-shifted colormap, similar to'cmap_r'(GH#149, @da4ccb08).Rename
GrayCyclecolormap toMonoCycleto more accurately reflect colormap design origins (GH#149, @d67e45bf).Rename
MidpointNormto more intuitiveDivergingNorm, and make “fair” color scaling the default behavior (@2f549c9).Rename
BinNormtoDiscreteNormand fix issues with diverging norm color scaling (GH#149, @98a976f1).Rename
concatenatetoappend,updatedtocopy,truncatedtotruncate, andpunchedtocut(GH#149, @e1a08930). The old method names remain with a deprecation warning.
Style changes¶
Increase default
rc['savefig.dpi']to 1200, matching recommendations from academic journals (GH#167, @c00e7314). Also add detailed discussion to user guide.Stop reversing the
'Spectral'colormap when proplot is imported (GH#149, @ce4ef6a0).Change default rc settings closer to matplotlib, including margins and line width (GH#166, @f801852b). Many were changed for no good reason.
Change default line style for geographic gridlines from
':'to'-'and match style from primary gridlines (GH#166, @f801852b).Make default
areaxandareaybounds “sticky”, similar to histograms and barplots (GH#166). Also makevlinesandhlinesperpendicular bounds sticky if either the min/max coordinates are scalar.Hide bad colormaps like
'jet'from theshow_cmapstable instead of deleting them outright, just like CSS4 colors (GH#149, @ce4ef6a0).
Features¶
Permit drawing “outer” axes and figure legends without explicitly passing handles (GH#149, @a69b48eb). Figure legends use the handles from all axes.
Use
_LonAxisand_LatAxisdummy axes with customLongitudeLocatorandLatitudeLocatorto control geographic gridlines (GH#168). This improves accuracy of automatic gridline generation.Add
'dmslat'and'dmslon'as formatters for cartopy projections, along withdmsformatkeyword argument. This labels points with degrees/minutes/seconds when appropriate (GH#168).Support “minor” geographic gridlines with the
gridminorkeyword arg and existinggridminorsettings (GH#168). Default locator used for minor gridlines isAutoMinorLocator.Add
loninline,latinline, androtatelabelskeywords for controlling cartopy gridliner behavior (GH#168).Support cartopy 0.18 locators, formatters, deprecations, and new labelling features (GH#158).
Add
rc['geogrid.labelpad']andrc['geogrid.rotatelabels']settings for cartopy gridline labels (GH#158).Add
SigFigFormatter(GH#149, @da6105d2) andSciFormatter(GH#175, @c43f7f91) axis formatters.Support more
AutoFormatterfeatures onSimpleFormatter(GH#152, @6decf962).Enable passing callables to
Formatterto create aFuncFormatterinstance.Add
proplot.config.RcConfigurator.saveandproplot.config.RcConfigurator.from_filemethods (GH#167, @e6dd8314).No longer distinguish between “quick” settings and proplot’s “added” settings (GH#167, @e6dd8314). Quick settings, added settings, and matplotlib settings can all have “children” so the distinction no longer makes sense.
Add opacity-preserving functions
to_rgbaandto_xyza, plusset_alphafor changing alpha channel of arbitrary color (GH#171, @81c647da).Add to
set_alphathe ability to create an opacity gradation, rather than just an opacity for the entire colormap (GH#171, @4583736).Support passing colormap objects, not just names, to
show_cmapsandshow_cycles(GH#171, @7f8ca59f).Add options to
indicate_errorfor adding shading to arbitrary plots (GH#166, @d8c50a8d). Also support automatic legend entries for shading and ensureindicate_errorpreserves metadata.Wrap
pcolorfastjust likepcolorandpcolormeshare wrapped (GH#166, @50a262dd).Add
negposfeature tobar_wrapperand newrc.negcolorandrc.poscolorrc keyword arguments (GH#166, @ab4d6746).Support
vlinesandhlinesflexible arguments and addnegposfeature (GH#166, @1c53e947, @e42ee913).Support building a colormap and
DiscreteNorminsidescatter, just likecontourfandpcolormesh(GH#162).Permit special colormap normalization and level scaling for colormap-colored contour plots, just like contourf (GH#149, @054cceb5).
Support drawing colorbars with descending levels when input
levels/valuesare monotonically descending lists (GH#149, @10763146)Add support for matplotlib stylesheets with
use_stylefunction andstylerc param (GH#149, @edc6f3c9).Make
'Grays'and'Greys'synonyms for the same ColorBrewer colormap (GH#149, @da4ccb08).Add
to_listedandto_linear_segmentedmethods for handling conversions (GH#149, @e1a08930).Permit merging mixed colormap types
LinearSegmentedColormapwithPerceptuallyUniformColormap(@972956b1).Include the
alphachannel when saving colormaps and cycles by default (GH#149, @117e05f2).Permit 8-character hex strings with alpha channels when loading colormaps and color cycles from hex files (GH#149, @381a84d4).
Support sampling
LinearSegmentedColormapintoListedColormapinside ofColormaprather thanCycle(GH#84, @972956b1).Add
categorieskeyword arg toshow_cmapsandshow_cycles(GH#149, @79be642d).Draw
show_colorstable as single figure with category labels, similar toshow_cmaps(GH#149, @c8ca2909).Return both figure and axes in
show_functions; this gives users access to the axes and prevents drawing them twice in notebooks (GH#149, @2f600bc9).Publicly support “filling” axes with colorbars using
loc='fill'(GH#149, @057c9895).
Bug fixes¶
Fix various issues with axis label sharing and axis sharing for twinned axes and panel axes (GH#164).
Permit modifying existing cartopy geographic features with successive calls to
format(GH#168).Fix issue drawing bar plots with datetime x axes (GH#156).
Fix issue where
AutoFormattertools were not locale-aware, i.e. use comma as decimal point sometimes (GH#152, @c7636296).Fix issue where
AutoFormatternonzero-value correction algorithm was right for wrong reasons and could be wrong in rare circumstances (GH#152, @c7636296).Fix issue where
matplotlib.style.useresets backend (GH#149, @c8319104).Fix issue with colormaps with dots in name (GH#149, @972956b1).
Fix logarithmic scale argument parsing deprecation (GH#149, @6ed7dbc5).
Fix deprecation of direct access to
matplotlib.cm.cmap_din matplotlib >=3.2.0 (GH#149, @a69c16da).Fix issues with string font sizes (GH#149, @6121de03). Add hidden
_get_font_sizemethod to translate font size to numeric.Fix issue where passing actual projection instances generated with
Projtosubplotscould incorrectly pair cartopy projections with basemap axes and vice versa (GH#149).Fix issue where could not draw colorbar from list of single-color
PathCollections, i.e. scatter plots (GH#149, @e893900b).Fix issue where importing proplot in jupyter notebooks resets the default inline backend (GH#149, @6121de03).
Improve axis label sharing algorithm (@6535b219).
Fix main axis label sharing bugs in presence of panels (@7b709db9).
Fix v0.4.0 regression where panel sharing no longer works (@289e5538).
Fix
AutoFormatterbug with values close to zero (GH#124, @9b7f89fd)Fix
AutoFormatterbug with small negative numbers (GH#117).Fix issue where Scientific colour maps not interpreted as cyclic, so end colors not standardized properly (@e10a3109).
Internals¶
Major internal change: Move functions into smaller separate files to mimic how matplotlib library is divided up (GH#149).
Add
internalsfolder containing default proplot rc params, deprecation helper functions, and other internal tools (GH#149).Make colorbar axes instances of
CartesianAxes, just like panel axes.Rename ubiquitous
_notNonefunction to_not_noneand change to more sensible behavior.Turn some private
configfunctions into static methods (@6121de03).Remove “smart bounds” feature from
FuncScale(GH#166, @9ac149ea).
Documentation¶
Call figure objects
figinstead off.Major clean up of notebook examples (@f86542b5).
Major clean up
wrappersdocumentation (@9648c18f)Fix dead “See Also” links (@d32c6506).
Use “Other parameters” tables more often (@d32c6506).
Remove the public objects
normalizers,locators,formatters,cartopy_projs,basemap_kwargs,cmaps,colors, andfonts(GH#149). These objects were public just for introspection/documentation.Rename
rc_configuratorandsubplot_gridtoRcConfiguratorandSubplotsContainerto match capitalized class naming convention (GH#149). These classes are public just for documentation.Rename
XYAxestoCartesianAxes,GeoAxestoCartopyAxes, andProjAxestoGeoAxes(GH#149, @4a6a0e34). These classes are public just for documentation.Rename
ColorDicttoColorDatabase,CmapDicttoColormapDatabase(GH#149, @9d7fd3e0). These classes are public just for documentation.
Version 0.5.0 (2020-02-10)¶
Deprecated¶
Features¶
Add back Fabio Crameri’s scientific colour maps (GH#116).
Permit both e.g.
locatorandxlocatoras keyword arguments toaltx, etc. (@57fab860).Permit descending
BinNormandLinearSegmentedNormlevels (GH#119).Permit overriding the font weight, style, and stretch in the
show_fontstable (@e8b9ee38).Permit hiding “unknown” colormaps and color cycles in the
show_cmapsandshow_cyclestables (@cb206f19).
Bug fixes¶
Fix issue where
show_cmapsandshow_cyclescolormap names were messed up (@13045599)Fix issue where
show_cmapsandshow_cyclesdid not return figure instance (@98209e87).Fix issue where user
valuespassed tocolorbar_wrapperwere sometimes ignored (@fd4f8d5f).Permit passing lists of colors to manually shade line contours and filled contours in
cmap_changer.Prevent formatting rightmost meridian label as
1e-10on cartopy map projections (@37fdd1eb).Support CF-time axes by fixing bug in
standardize_1dandstandardize_2d(GH#103, GH#121).Redirect to the “default” location when using
legend=Trueandcolorbar=Trueto generate on-the-fly legends and colorbars (@c2c5c58d). This feature was accidentally removed.Let
colorbar_wrapperaccept lists of colors (@e5f11591). This feature was accidentally removed.
Internals¶
Remove various unused keyword arguments (@33654a42).
Major improvements to the API controlling axes titles and a-b-c labels (@1ef7e65e).
Always use full names
left,right,top, andbottominstead ofl,r,b, andt, for clarity (@1ef7e65e).Improve
GrayCyclecolormap, is now much shorter and built from reflected FabioGrayCcolormaps (@5b2c7eb7).
Version 0.4.1 (2020-01-08)¶
Features¶
Bug fixes¶
Internals¶
Add
geogrid.color/linewidth/etcandgridminor.color/linewidth/etcprops as children ofgrid.color/linewidth/etc(GH#101).Change the default
.proplotrcformat from YAML to the.matplotlibrcsyntax (GH#101).Various
rc_configuratorimprovements, remove outdated global variables (GH#101).Better error handling when loading colormap/cycle files, and calls to
ColormapandCyclenow raise errors while calls toregister_cmapsandregister_cyclesstill issue warnings (GH#100).
Version 0.4.0 (2020-01-07)¶
Deprecated¶
Rename
basemap_defaultstobasemap_kwargsandcartopy_projstocartopy_names(@431a06ce).Remove
subplots.innerspace,subplots.titlespace,subplots.xlabspace, andsubplots.ylabspacespacing arguments, automatically calculate default non-tight spacing using_get_spacebased on current tick lengths, label sizes, etc.Remove redundant
use_fonts, usercParams['sans-serif']precedence instead (GH#95).dualxanddualyno longer accept “scale-spec” arguments. Must be a function, two functions, or an axis scale instance (GH#96).Remove
Axesshare[x|y],span[x|y], andalign[x|y]kwargs (GH#99). These settings are now always figure-wide.Rename
CyclesamplestoN, renameshow_colorsnbreaktonhues(GH#98).
Features¶
Add
from_filestatic methods (GH#98). You can now load files by passing a name toColormap.Add TeX Gyre Heros as open source Helvetica-alternative; this is the new default font. Add Fira Math as DejaVu Sans-alternative; has complete set of math characters (GH#95).
Add
xlinewidth,ylinewidth,xgridcolor,ygridcolorkeyword args toformat(GH#95).Add getters and setters for various
Figuresettings likeshare[x|y],span[x|y], andalign[x|y](GH#99).Let
twinx,twiny,altx, andaltyacceptformatkeyword args just likedualxanddualy(GH#99).Add
Figurefallback_to_cmkwarg. This is used byshow_fontsto show dummy glyphs to clearly illustrate when fonts are missing characters, but preserve graceful fallback for user.Improve
Projconstructor function. It now acceptsProjectionandBasemapinstances, just like other constructor functions, and returns only the projection instance (GH#92).rc__getitem__always returns the setting. To get context block-restricted settings, you must explicitly passcontext=Truetoget,fill, orcategory(GH#91).
Bug fixes¶
Documentation¶
Internals¶
Define
rcdefault values with inline dictionaries rather than with a default.proplotrcfile, change the auto-generated user.proplotrc(GH#91).Remove useless
panel_kwkeyword arg fromlegend_wrapperandcolorbar_wrapper(GH#91). Removewflush,hflush, andflushkeyword args fromsubplotsthat should have been removed long ago.
Version 0.3.1 (2019-12-16)¶
Version 0.3.0 (2019-12-15)¶
Features¶
Bug fixes¶
Add brute force workaround for saving colormaps with callable segmentdata (@8201a806).
Fix issue with latest versions of matplotlib where
%matplotlib inlinefails silently so the backend is not instantiated (@cc39dc56).Fix
shiftedwhenshiftis not180(@e2e2b2c7).Save the
cyclicandgammaattributes in JSON files too (@8201a806).
Internals¶
Change
clocktoperf_counter(GH#86).
Version 0.2.7 (2019-12-09)¶
Documentation¶
Improve Configuring proplot documentation (@9d50719b).
Internals¶
Version 0.2.5 (2019-12-07)¶
Version 0.2.3 (2019-12-05)¶
Bug fixes¶
Fix issue with overlapping gridlines using monkey patches on gridliner instances (@8960ebdc).
Fix issue where auto colorbar labels are not applied when
globe=True(@ecb3c899).More sensible zorder for gridlines (@90d94e55).
Fix issue where customized super title settings are overridden when new axes are created (@35cb21f2).
Version 0.2.2 (2019-12-04)¶
Version 0.2.1 (2019-12-02)¶
Version 0.2.0 (2019-12-02)¶
Deprecated¶
Remove the
nbsetuprc setting in favor of separateautosave,autoreload, andmatplotlibsettings for triggering the respective%magic commands. (@3a622887;nbsetupis still accepted but no longer documented).Rename the
formatrc setting in favor of theinlinefmtsetting (@3a622887;formatis still accepted but no longer documented).Rename
FlexibleGridSpecandFlexibleSubplotSpectoGridSpecandSubplotSpec(@3a622887; until GH#110 is merged it is impossible to use these manually, so this won’t bother anyone).
Bug fixes¶
Disable automatic resizing for the
nbAgginteractive inline backend. Found no suitable workaround (@3a622887).
Internals¶
Organize the
rcdocumentation and the default.proplotrcfile (@3a622887).Rename
rcParamsCustomtorcParamsLong(@3a622887; this is inaccessible to the user).When calling
fig.canvas.print_figure()on a stale figure, callfig.canvas.draw()first. May be overkill forsavefigbut critical for correctly displaying already-drawn notebook figures.