Releases: mwaskom/seaborn
v0.10.0 (January 2020)
This is a major update that is being released simultaneously with version 0.9.1. It has all of the same features (and bugs!) as 0.9.1, but there are important changes to the dependencies.
Most notably, all support for Python 2 has now been dropped. Support for Python 3.5 has also been dropped. Seaborn is now strictly compatible with Python 3.6+.
Minimally supported versions of the dependent PyData libraries have also been increased, in some cases substantially. While seaborn has tended to be very conservative about maintaining compatibility with older dependencies, this was causing increasing pain during development. At the same time, these libraries are now much easier to install. Going forward, seaborn will likely stay close to the Numpy community guidelines for version support.
This release also removes a few previously-deprecated features:
- The
tsplotfunction andseaborn.timeseriesmodule have been removed. Recall thattsplotwas replaced withlineplot. - The
seaborn.apionlyentry-point has been removed. - The
seaborn.linearmodelsmodule (previously renamed toseaborn.regression) has been removed.
Looking forward
Now that seaborn is a Python 3 library, it can take advantage of keyword-only arguments. It is likely that future versions will introduce this syntax, potentially in a breaking way. For guidance, most seaborn functions have a signature that looks like
func(x, y, ..., data=None, **kwargs)
where the **kwargs are specified in the function. Going forward it will likely be necessary to specify data and all subsequent arguments with an explicit key=value mapping. This style has long been used throughout the documentation, and the formal requirement will not be introduced until at least the next major release. Adding this feature will make it possible to enhance some older functions with more modern capabilities (e.g., adding a native hue semantic within functions like jointplot and regplot).
v0.9.1 (January 2020)
This is a minor release with a number of bug fixes and adaptations to changes in seaborn's dependencies. There are also several new features.
This is the final version of seaborn that will support Python 2.7 or 3.5.
New features
- Added more control over the arrangement of the elements drawn by
clustermapwith the{dendrogram,colors}_ratioandcbar_posparameters. Additionally, the default organization and scaling with different figure sizes has been improved. - Added the
corneroption toPairGridandpairplotto make a grid without the upper triangle of bivariate axes. - Added the ability to seed the random number generator for the bootstrap used to define error bars in several plots. Relevant functions now have a
seedparameter, which can take either fixed seed (typically anint) or a numpy random number generator object (either the newernumpy.random.Generatoror the oldernumpy.random.mtrand.RandomState). - Generalized the idea of "diagonal" axes in
PairGridto any axes that share an x and y variable. - In
PairGrid, thehuevariable is now excluded from the default list of variables that make up the rows and columns of the grid. - Exposed the
layout_padparameter inPairGridand set a smaller default than what matptlotlib sets for more efficient use of space in dense grids. - It is now possible to force a categorical interpretation of the
huevaraible in a relational plot by passing the name of a categorical palette (e.g."deep", or"Set2"). This complements the (previously supported) option of passig a list/dict of colors. - Added the
tree_kwsparameter toclustermapto control the properties of the lines in the dendrogram. - Added the ability to pass hierarchical label names to the
FacetGridlegend, which also fixes a bug inrelplotwhen the same label appeared in diffent semantics. - Improved support for grouping observations based on pandas index information in categorical plots.
Bug fixes and adaptations
- Avoided an error when singular data is passed to
kdeplot, issuing a warning instead. This makespairplotmore robust. - Fixed the behavior of
dropnainPairGridto properly exclude null datapoints from each plot when set toTrue. - Fixed an issue where
regplotcould interfere with other axes in a multi-plot matplotlib figure. - Semantic variables with a
categorydata type will always be treated as categorical in relational plots. - Avoided a warning about color specifications that arose from
boxenploton newer matplotlibs. - Adapted to a change in how matplotlib scales axis margins, which caused multiple calls to
regplotwithtruncate=Falseto progressively expand the x axis limits. Because there are currently limitations on how autoscaling works in matplotlib, the default value fortruncatein seaborn has also been changed toTrue. - Relational plots no longer error when hue/size data are inferred to be numeric but stored with a string datatype.
- Relational plots now consider semantics with only a single value that can be interpreted as boolean (0 or 1) to be categorical, not numeric.
- Relational plots now handle list or dict specifications for
sizescorrectly. - Fixed an issue in
pointplotwhere missing levels of a hue variable would cause an exception after a recent update in matplotlib. - Fixed a bug when setting the rotation of x tick labels on a
FacetGrid. - Fixed a bug where values would be excluded from categorical plots when only one variable was a pandas
Serieswith a non-default index. - Fixed a bug when using
Seriesobjects as arguments forx_partialory_partialinregplot. - Fixed a bug when passing a
normobject and using color annotations inclustermap. - Fixed a bug where annotations were not rearranged to match the clustering in
clustermap. - Fixed a bug when trying to call
setwhile specifying a list of colors for the palette. - Fixed a bug when resetting the color code short-hands to the matplotlib default.
- Avoided errors from stricter type checking in upcoming
numpychanges. - Avoided error/warning in
lineplotwhen plotting categoricals with empty levels. - Allowed
colorsto be passed through to a bivariatekdeplot. - Standardized the output format of custom color palette functions.
- Fixed a bug where legends for numerical variables in a relational plot could show a surprisingly large number of decimal places.
- Improved robustness to missing values in distribution plots.
- Made it possible to specify the location of the
FacetGridlegend using matplotlib keyword arguments.
v0.10.0.rc0
Version 0.10.0.rc0
v0.9.1.rc0
First release candidate for v0.9.1
v0.9.0 (July 2018)
v0.9.0 (July 2018)
Note: a version of these release notes with working links appears in the online documentation.
This is a major release with several substantial and long-desired new features. There are also updates/modifications to the themes and color palettes that give better consistency with matplotlib 2.0 and some notable API changes.
New relational plots
Three completely new plotting functions have been added: catplot, scatterplot, and lineplot. The first is a figure-level interface to the latter two that combines them with a FacetGrid. The functions bring the high-level, dataset-oriented API of the seaborn categorical plotting functions to more general plots (scatter plots and line plots).
These functions can visualize a relationship between two numeric variables while mapping up to three additional variables by modifying hue, size, and/or style semantics. The common high-level API is implemented differently in the two functions. For example, the size semantic in scatterplot scales the area of scatter plot points, but in lineplot it scales width of the line plot lines. The API is dataset-oriented, meaning that in both cases you pass the variable in your dataset rather than directly specifying the matplotlib parameters to use for point area or line width.
Another way the relational functions differ from existing seaborn functionality is that they have better support for using numeric variables for hue and size semantics. This functionality may be propagated to other functions that can add a hue semantic in future versions; it has not been in this release.
The lineplot function also has support for statistical estimation and is replacing the older tsplot function, which still exists but is marked for removal in a future release. lineplot is better aligned with the API of the rest of the library and more flexible in showing relationships across additional variables by modifying the size and style semantics independently. It also has substantially improved support for date and time data, a major pain factor in tsplot. The cost is that some of the more esoteric options in tsplot for representing uncertainty (e.g. a colormapped KDE of the bootstrap distribution) have not been implemented in the new function.
There is quite a bit of new documentation that explains these new functions in more detail, including detailed examples of the various options in the API reference and a more verbose tutorial.
These functions should be considered in a "stable beta" state. They have been thoroughly tested, but some unknown corner cases may remain to be found. The main features are in place, but not all planned functionality has been implemented. There are planned improvements to some elements, particularly the default legend, that are a little rough around the edges in this release. Finally, some of the default behavior (e.g. the default range of point/line sizes) may change somewhat in future releases.
Updates to themes and palettes
Several changes have been made to the seaborn style themes, context scaling, and color palettes. In general the aim of these changes was to make the seaborn styles more consistent with the style updates in matplotlib 2.0 and to leverage some of the new style parameters for better implementation of some aspects of the seaborn styles. Here is a list of the changes:
- Reorganized and updated some axes_style/plotting_context parameters to take advantage of improvements in the matplotlib 2.0 update. The biggest change involves using several new parameterss in the "style" spec while moving parameters that used to implement the corresponding aesthetics to the "context" spec. For example, axes spines and ticks are now off instead of having their width/length zeroed out for the darkgrid style. That means the width/length of these elements can now be scaled in different contexts. The effect is a more cohesive appearance of the plots, especially in larger contexts. These changes include only minimal support for the 1.x matplotlib series. Users who are stuck on matplotlib 1.5 but wish to use seaborn styling may want to use the seaborn parameters that can be accessed through the matplotlib stylesheet interface.
- Updated the seaborn palettes ("deep", "muted", "colorblind", etc.) to correspond with the new 10-color matplotlib default. The legacy palettes are now available at "deep6", "muted6", "colorblind6", etc. Additionally, a few individual colors were tweaked for better consistency, aesthetics, and accessibility.
- Calling color_palette (or set_palette) with a named qualitative palettes (i.e. one of the seaborn palettes, the colorbrewer qualitative palettes, or the matplotlib matplotlib tableau-derived palettes) and no specified number of colors will return all of the colors in the palette. This means that for some palettes, the returned list will have a different length than it did in previous versions.
- Enhanced color_palette to accept a parameterized specification of a cubehelix palette in in a string, prefixed with
"ch:"(e.g."ch:-.1,.2,l=.7"). Note that keyword arguments can be spelled out or referenced using only their first letter. Reversing the palette is accomplished by appending"_r", as with other matplotlib colormaps. This specification will be accepted by any seaborn function with apalette=parameter. - Slightly increased the base font sizes in plotting_context and increased the scaling factors for
"talk"and"poster"contexts. - Calling set will now call set_color_codes to re-assign the single letter color codes by default
API changes
A few functions have been renamed or have had changes to their default parameters.
- The
factorplotfunction has been renamed to catplot. The new name ditches the original R-inflected terminology to use a name that is more consistent with terminology in pandas and in seaborn itself. This change should hopefully make catplot easier to discover, and it should make more clear what its role is.factorplotstill exists and will pass its arguments through to catplot with a warning. It may be removed eventually, but the transition will be as gradual as possible. - The other reason that the
factorplotname was changed was to ease another alteration which is that the defaultkindin catplot is now"strip"(corresponding to stripplot). This plots a categorical scatter plot which is usually a much better place to start and is more consistent with the default in relplot. The old default style infactorplot("point", corresponding to pointplot) remains available if you want to show a statistical estimation. - The
lvplotfunction has been renamed to boxenplot. The "letter-value" terminology that was used to name the original kind of plot is obscure, and the abbreviation tolvdid not help anything. The new name should make the plot more discoverable by describing its format (it plots multiple boxes, also known as "boxen"). As withfactorplot, thelvplotfunction still exists to provide a relatively smooth transition. - Renamed the
sizeparameter toheightin multi-plot grid objects (FacetGrid, PairGrid, and JointGrid) along with functions that use them (factorplot, lmplot, pairplot, and jointplot) to avoid conflicts with thesizeparameter that is used inscatterplotandlineplot(necessary to make relplot work) and also makes the meaning of the parameter a bit more clear. - Changed the default diagonal plots in pairplot to use `func`:kdeplot` when a
"hue"dimension is used. - Deprecated the statistical annotation component of JointGrid. The method is still available but will be removed in a future version.
- Two older functions that were deprecated in earlier versions,
coefplotandinteractplot, have undergone final removal from the code base.
Documentation improvements
There has been some effort put into improving the documentation. The biggest change is that the introduction to the library has been completely rewritten to provide much more information and, critically, examples. In addition to the high-level motivation, the introduction also covers some important topics that are often sources of confusion, like the distinction between figure-level and axes-level functions, how datasets should be formatted for use in seaborn, and how to customize the appearance of the plots.
Other improvements have been made throughout, most notably a thorough re-write of the categorical tutorial categorical_tutorial.
Other small enhancements and bug fixes
- Changed rugplot to plot a matplotlib
LineCollectioninstead of manyLine2Dobjects, providing a big speedup for large arrays. - Changed the default off-diagonal plots to use scatterplot. (Note that the
"hue"currently draws three separate scatterplots instead of using the hue semantic of the scatterplot function). - Changed color handling when using kdeplot with two variables. The default colormap for the 2D density now follows the color cycle, and the function can use
colorandlabelkwargs, adding more flexibility and avoiding a warning when using with multi-plot grids. - Added the
subplot_kwsparameter to PairGrid for more flexibility. - Removed a special case in PairGrid that defaulted to drawing stacked histograms on the diagonal axes.
- Fixed jointplot/JointGrid and regplot so that they now accept list inputs.
- Fixed a bug in FacetGrid when using a single row/column level or using
col_wrap=1. - Fixed functions that set axis limits so that they preserve auto-scaling state on matplotlib 2.0.
- Avoided an erro...
v0.8.1 (September 2017)
v0.8.1 (September 2017)
-
Added a warning in
FacetGridwhen passing a categorical plot function without specifyingorder(orhue_orderwhenhueis used), which is likely to produce a plot that is incorrect. -
Improved compatibility between
FacetGridorPairGridand interactive matplotlib backends so that the legend no longer remains inside the figure when usinglegend_out=True. -
Changed categorical plot functions with small plot elements to use
dark_paletteinstead oflight_palettewhen generating a sequential palette from a specified color. -
Improved robustness of
kdeplotanddistplotto data with fewer than two observations. -
Fixed a bug in
clustermapwhen usingyticklabels=False. -
Fixed a bug in
pointplotwhere colors were wrong if exactly three points were being drawn. -
Fixed a bug in
pointplotwhere legend entries for missing data appeared with empty markers. -
Fixed a bug in
clustermapwhere an error was raised when annotating the main heatmap and showing category colors. -
Fixed a bug in
clustermapwhere row labels were not being properly rotated when they overlapped. -
Fixed a bug in
kdeplotwhere the maximum limit on the density axes was not being updated when multiple densities were drawn. -
Improved compatibility with future versions of pandas.
v0.8.0 (July 2017)
-
The default style is no longer applied when seaborn is imported. It is now necessary to explicitly call
setor one or more ofset_style,set_context, andset_palette. Correspondingly, theseaborn.apionlymodule has been deprecated. -
Changed the behavior of
heatmap(and by extensionclustermap) when plotting divergent dataesets (i.e. when thecenterparameter is used). Instead of extending the lower and upper limits of the colormap to be symettrical around thecentervalue, the colormap is modified so that its middle color corresponds tocenter. This means that the full range of the colormap will not be used (unless the data or specifiedvminandvmaxare symettric), but the upper and lower limits of the colorbar will correspond to the range of the data. See the Github pull request (#1184) for examples of the behavior. -
Removed automatic detection of diverging data in
heatmap(and by extensionclustermap). If you want the colormap to be treated as diverging (see above), it is now necessary to specify thecentervalue. When no colormap is specified, specifyingcenterwill still change the default to be one that is more appropriate for displaying diverging data. -
Added four new colormaps, created using viscm for perceptual uniformity. The new colormaps include two sequential colormaps (
"rocket"and"mako") and two diverging colormaps ("icefire"and"vlag"). These colormaps are registered with matplotlib on seaborn input and the colormap objects can be accessed in theseaborn.cmnamespace. -
Changed the default
heatmapcolormaps to be"rocket"(in the case of sequential data) or"icefire"(in the case of diverging data). Note that this change reverses the direction of the luminance ramp from the previous defaults. While potentially confusing and disruptive, this change better aligns the seaborn defaults with the new matplotlib default colormap ("viridis") and arguably better aligns the semantics of a "heat" map with the appearance of the colormap. -
Added
"auto"as a (default) option for tick labels inheatmapandclustermap. This will try to estimate how many ticks can be labeled without the text objects overlapping, which should improve performance for larger matrices. -
Added the
dodgeparameter to boxplot, violinplot, and barplot to allow use ofhuewithout changing the position or width of the plot elements, as when thehuevarible is not nested within the main categorical variable. -
Correspondingly, the
splitparameter for stripplot and swarmplot has been renamed tododgefor consistency with the other categorical functions (and for differentiation from the meaning ofsplitin violinplot). -
Added the ability to draw a colorbar for a bivariate kdeplot with the
cbarparameter (and relatedcbar_axandcbar_kwsparameters). -
Added the ability to use error bars to show standard deviations rather than bootstrap confidence intervals in most statistical functions by putting
ci="sd". -
Allow side-specific offsets in
despine. -
Figure size is no longer part of the seaborn plotting context parameters.
-
Put a cap on the number of bins used in
jointplotfortype=="hex"to avoid hanging when the reference rule prescribes too many. -
Turn off dendrogram axes in
clustermaprather than setting the background color to white. -
New matplotlib qualitative palettes (e.g.
"tab10") are now handled correctly. -
Some modules and functions have been internally reorganized; there should be no effect on code that uses the
seabornnamespace. -
Added a deprecation warning to
tsplotfunction to indicate that it will be removed or replaced with a substantially altered version in a future release. -
The
interactplotandcoefplotfunctions are officially deprecated and will be removed in a future release.
v0.7.1 (June 2016)
- Added the ability to put "caps" on the error bars that are drawn by
barplotorpointplot(and, by extension,factorplot). Additionally, the line width of the error bars can now be controlled. These changes involve the new parameterscapsizeanderrwidth. See the github pull request for examples of usage. - Improved the row and column colors display in
clustermap. It
is now possible to pass Pandas objects for these elements and, when possible, the semantic information in the Pandas objects will be used to add labels to the plot. When Pandas objects are used, the color data is matched against the main heatmap based on the index, not on position. This is more accurate, but it may lead to different results if current code assumed positional matching. - Improved the luminance calculation that determines the annotation color in
heatmap. - The
annotparameter ofheatmapnow accepts a rectangular dataset in addition to a boolean value. If a dataset is passed, its values will be used for the annotations, while the main dataset will be used for the heatmap cell colors. - Fixed a bug in
FacetGridthat appeared when usingcol_wrapwith missingcollevels. - Made it possible to pass a tick locator object to the
heatmapcolorbar. - Made it possible to use different styles (e.g., step) for
PairGridhistograms when there are multiple hue levels. - Fixed a bug in scipy-based univariate kernel density bandwidth calculation.
- The
reset_origfunction (and, by extension, importingseaborn.apionly) resets matplotlib rcParams to their values at the time seaborn itself was imported, which should work better with rcParams changed by the jupyter notebook backend. - Removed some objects from the top-level
seabornnamespace. - Improved unicode compatibility in
FacetGrid.
v0.7.0 (January 2016)
This is a major release from 0.6. The main new feature is swarmplot which implements the beeswarm approach for drawing categorical scatterplots. There are also some performance improvements, bug fixes, and updates for compatibility with new versions of dependencies.
- Added the swarmplot function, which draws beeswarm plots. These are
categorical scatterplots, similar to those produced by stripplot,
but position of the points on the categorical axis is chosen to
avoid overlapping points. See the
categorical plot tutorial for more
information. - Added an additional rule when determining category order in
categorical plots. Now, when numeric variables are used in a
categorical role, the default behavior is to sort the unique levels
of the variable (i.e they will be in proper numerical order). This
can still be overridden by the appropriate{*_}orderparameter,
and variables with acategorydatatype will still follow the
category order even if the levels are strictly numerical. - Changed some of the stripplot defaults to be closer to swarmplot.
Points are somewhat smaller, have no outlines, and are not split by
default when usinghue. - Changed how stripplot draws points when using
huenesting with
split=Falseso that the differenthuelevels are not drawn
strictly on top of each other. - Improve performance for large dendrograms in clustermap.
- Added
font.sizeto the plotting context definition so that the
default output fromplt.textwill be scaled appropriately. - Fixed a bug in clustermap when
fastclusteris not installed. - Fixed a bug in the zscore calculation in clustermap.
- Fixed a bug in distplot where sometimes the default number of bins
would not be an integer. - Fixed a bug in stripplot where a legend item would not appear for a
huelevel if there were no observations in the first group of
points. - Heatmap colorbars are now rasterized for better performance in
vector plots. - Added workarounds for some matplotlib boxplot issues, such as
strange colors of outlier points. - Added workarounds for an issue where violinplot edges would be
missing or have random colors. - Added a workaround for an issue where only one heatmap cell would be
annotated on some matplotlib backends. - Fixed a bug on newer versions of matplotlib where a colormap would
be erroneously applied to scatterplots with only three observations. - Updated seaborn for compatibility with matplotlib 1.5.
- Added compatibility for various IPython (and Jupyter) versions in
functions that use widgets.
v0.6.0 (June 2015)
This is a major release from 0.5. The main objective of this release was to unify the API for categorical plots, which means that there are some relatively large API changes in some of the older functions. See below for details of those changes, which may break code written for older versions of seaborn. There are also some new functions (stripplot, and countplot), numerous enhancements to existing functions, and bug fixes.
Additionally, the documentation has been completely revamped and expanded for the 0.6 release. Now, the API docs page for each function has multiple examples with embedded plots showing how to use the various options. These pages should be considered the most comprehensive resource for examples, and the tutorial pages are now streamlined and oriented towards a higher-level overview of the various features.
Changes and updates to categorical plots
In version 0.6, the "categorical" plots have been unified with a common API. This new category of functions groups together plots that show the relationship between one numeric variable and one or two categorical variables. This includes plots that show distribution of the numeric variable in each bin (boxplot, violinplot, and stripplot) and plots that apply a statistical estimation within each bin (pointplot, barplot, and countplot). There is a new tutorial chapter <categorical_tutorial> that introduces these functions.
The categorical functions now each accept the same formats of input data and can be invoked in the same way. They can plot using long- or wide-form data, and can be drawn vertically or horizontally. When long-form data is used, the orientation of the plots is inferred from the types of the input data. Additionally, all functions natively take a hue variable to add a second layer of categorization.
With the (in some cases new) API, these functions can all be drawn correctly by FacetGrid. However, factorplot can also now create faceted verisons of any of these kinds of plots, so in most cases it will be unnecessary to use FacetGrid directly. By default, factorplot draws a point plot, but this is controlled by the kind parameter.
Here are details on what has changed in the process of unifying these APIs:
- Changes to boxplot and violinplot will probably be the most disruptive. Both functions maintain backwards-compatibility in terms of the kind of data they can accept, but the syntax has changed to be more similar to other seaborn functions. These functions are now invoked with
xand/oryparameters that are either vectors of data or names of variables in a long-form DataFrame passed to the newdataparameter. You can still pass wide-form DataFrames or arrays todata, but it is no longer the first positional argument. See the github pull request for more information on these changes and the logic behind them. - As pointplot and barplot can now plot with the major categorical variable on the y axis, the
x_orderparameter has been renamed toorder. - Added a
hueargument to boxplot and violinplot, which allows for nested grouping the plot elements by a third categorical variable. For violinplot, this nesting can also be accomplished by splitting the violins when there are two levels of thehuevariable (usingsplit=True). To make this functionality feasible, the ability to specify where the plots will be draw in data coordinates has been removed. These plots now are drawn at set positions, like (and identical to) barplot and pointplot. - Added a
paletteparameter to boxplot/violinplot. Thecolorparameter still exists, but no longer does double-duty in accepting the name of a seaborn palette.palettesupersedescolorso that it can be used with a FacetGrid.
Along with these API changes, the following changes/enhancements were made to the plotting functions:
- The default rules for ordering the categories has changed. Instead of automatically sorting the category levels, the plots now show the levels in the order they appear in the input data (i.e., the order given by
Series.unique()). Order can be specified when plotting with theorderandhue_orderparameters. Additionally, when variables are pandas objects with a "categorical" dtype, the category order is inferred from the data object. This change also affects FacetGrid and PairGrid. - Added the
scaleandscale_hueparameters to violinplot. These control how the width of the violins are scaled. The default isarea, which is different from how the violins used to be drawn. Usescale='width'to get the old behavior. - Used a different style for the
boxkind of interior plot in violinplot, which shows the whisker range in addition to the quartiles. Useinner='quartile'to get the old style.
New plotting functions
- Added the stripplot function, which draws a scatterplot where one of the variables is categorical. This plot has the same API as boxplot and violinplot. It is useful both on its own and when composed with one of these other plot kinds to show both the observations and underlying distribution.
- Added the countplot function, which uses a bar plot representation to show counts of variables in one or more categorical bins. This replaces the old approach of calling barplot without a numeric variable.
Other additions and changes
- The corrplot and underlying symmatplot functions have been deprecated in favor of heatmap, which is much more flexible and robust. These two functions are still available in version 0.6, but they will be removed in a future version.
- Added the set_color_codes function and the
color_codesargument to set and set_palette. This changes the interpretation of shorthand color codes (i.e. "b", "g", k", etc.) within matplotlib to use the values from one of the named seaborn palettes (i.e. "deep", "muted", etc.). That makes it easier to have a more uniform look when using matplotlib functions directly with seaborn imported. This could be disruptive to existing plots, so it does not happen by default. It is possible this could change in the future. - The color_palette function no longer trims palettes that are longer than 6 colors when passed into it.
- Added the
as_hexmethod to color palette objects, to return a list of hex codes rather than rgb tuples. - jointplot now passes additional keyword arguments to the function used to draw the plot on the joint axes.
- Changed the default
linewidthsin heatmap and clustermap to 0 so that larger matrices plot correctly. This parameter still exists and can be used to get the old effect of lines demarcating each cell in the heatmap (the old defaultlinewidthswas 0.5). - heatmap and clustermap now automatically use a mask for missing values, which previously were shown with the "under" value of the colormap per default plt.pcolormesh behavior.
- Added the
seaborn.crayonsdictionary and the crayon_palette function to define colors from the 120 box (!) of Crayola crayons. - Added the
line_kwsparameter to residplot to change the style of the lowess line, when used. - Added open-ended
**kwargsto theadd_legendmethod on FacetGrid and PairGrid, which will pass additional keyword arguments through when calling the legend function on theFigureorAxes. - Added the
gridspec_kwsparameter to FacetGrid, which allows for control over the size of individual facets in the grid to emphasize certain plots or account for differences in variable ranges. - The interactive palette widgets now show a continuous colorbar, rather than a discrete palette, when as_cmap is True.
- The default Axes size for pairplot and PairGrid is now slightly smaller.
- Added the
shade_lowestparameter to kdeplot which will set the alpha for the lowest contour level to 0, making it easier to plot multiple bivariate distributions on the same axes. - The
heightparameter of rugplot is now interpreted as a function of the axis size and is invariant to changes in the data scale on that axis. The rug lines are also slightly narrower by default. - Added a catch in distplot when calculating a default number of bins. For highly skewed data it will now use sqrt(n) bins, where previously the reference rule would return "infinite" bins and cause an exception in matplotlib.
- Added a ceiling (50) to the default number of bins used for distplot histograms. This will help avoid confusing errors with certain kinds of datasets that heavily violate the assumptions of the reference rule used to get a default number of bins. The ceiling is not applied when passing a specific number of bins.
- The various property dictionaries that can be passed to
plt.boxplotare now applied after the seaborn restyling to allow for full customizability. - Added a
savefigmethod to JointGrid that defaults to a tight bounding box to make it easier to save figures using this class, and set a tight bbox as the default for thesavefigmethod on other Grid objects. - You can now pass an integer to the
xticklabelsandyticklabelsparameter of heatmap (and, by extension, clustermap). This will make the plot use the ticklabels inferred from the data, but only plot everynlabel, wherenis the number you pass. This can help when visualizing larger matrices with some sensible ordering to the rows or columns of the dataframe. - Added "figure.facecolor" to the style parameters and set the default to white.
- The load_dataset function now caches datasets locally after downloading them, and uses the local copy on subsequent calls.
Bug fixes
- Fixed bugs in clustermap where the mask and specified ticklabels were not being reorganized using the dendrograms.
- Fixed a bug in FacetGrid and PairGrid that lead to incorrect legend labels when levels of the
huevariable appeared inhue_orderbut not in the data. - Fixed a bug ...