π v0.7.1 is a small bugfix and maintenance release. See the official changelog for details. A copy of the changes is also copied below.
404)preserve='single' in plotnine.positions.position_dodge and plotnine.positions.position_dodge2 to work for geoms that onlyx aesthetic and not xmin and xmax e.g plotnine.geoms.geom_text.v0.7.0 where plots with a colorbar would fail if using ~plotnine.themes.theme_matplotlib.π This is a large release with many bug fixes and enhancements. See offical changelog. A version of the changes is included below.]
Changed the default method of caculating bandwidth for all stats that use kernel density estimation. The affected stats are stat_density, stat_ydensity, and stat_sina. These stats can now work with groups that have a single unique value.
Changed plotnine.scale.scale_colour_continuous to refer to the same scale as plotnine.scale.scale_color_continuous.
Changed plotnine.scale.scale_color_cmap so the parameter cmap_name refers to the name of the color palette and name refers to the name of the scale. (GH371)
aes got an internal function reorder which makes it easy to change the ordering of a discrete variable according to some other variable/column.
stat_smooth can now use formulae for linear models.
Fixed issue where a wrong warning could be issued about changing the transform of a specialised scale. It mostly affected the timedelta scale.
Fixed plotnine.geoms.geom_violin and other geoms when used with position='dodge' not to crash when if a layer has an empty group of data.
Fixed bug in plotnine.geoms.geom_path for some cases when groups had less than 2 points. (GH319)
π Fixed all stats that compute kernel density estimates to work when all the data points are the same. (GH317)
π Fixed issue where setting the group to a string value i.e. group='string' outside aes() failed due to an error.
π Fixed issue where discrete position scales could not deal with fewer limits than those present in the data. (GH342)
Fixed issue with using custom tuple linetypes with plotnine.scales.scale_linetype_manual. (GH352)
Fixed plotnine.geoms.geom_map to work with facets. (GH359)
π Fixed plotnine.position.jitter_dodge to work when color is used as an aesthetic. (GH372)
Fixed plotnine.geoms.geom_qq to work with facets (GH379)
π Fixed skewed head in plotnine.geoms.arrow when drawn on facetted plot (GH388)
Fixed issue with plotnine.stats.stat_density where weights could not be used with a gaussian model. (GH392)
Fixed bug where guide_colorbar width and height could not be controlled by legend_key_width and legend_key_height. (GH360)
You can now set the bandwidth parameter bw of stat_ydensity.
Parameters ha and va of geom_text have been converted to aesthetics. You can now map to them. (GH325)
All themes (except theme_matplotlib) now do not show minor ticks. (GH348)
π This release has many changes, check out the changelog. A version of the changes is included below.
π The draw parameter of geom_map has been removed. Shapefiles should contain only one type of geometry and that is the geometry that is drawn.
Ordinal (Ordered categorical) columns are now mapped to ordinal scales. This creates different plots.
The default mapping for the computed aesthetic size of stat_sum has changed to 'stat(n)'. This also changes the default plot for geom_count.
geom_text gained the adjust_text parameter, and can now repel text.annotation_logticks.geom_sinageom_step gained the option mid for the direction parameter. The steps are taken mid-way between adjacent x values.annotation_stripes.π Fixed bug where facetting would fail if done on a plot with annotation(s) and one of the facetting columns was also a variable in the environment.
Fixed bug where coord_flip would not flip geoms created by geom_rug (GH216).
π Fixed bug where plots with theme_xkcd cannot be saved twice (GH199)
π Fixed bug that made it impossible to map to columns with the same name as a calculated columns of the stat. (GH234)
Fixed bug in geom_smooth that made it difficult to use it with stats other than stat_smooth. (GH242)
π Fixed bug in position_dodge where by bar plot could get thinner when facetting and useing preserve = 'single'. (GH224)
π Fixed bug in coord_trans where if the transformation reversed the original limits, the order in which the data was laid out remained unchanged. (GH253)
π Fixed bug in stat_count where float weights were rounded and lead to a wrong plot. (GH260)
π Fixed bug where one could not use the British spelling colour to rename a color scale. (GH264)
π Fixed bug in lims, xlim, and ylim where datetime and timedelta limits resulted in an error.
Fixed bug where geom_rect could not be used with coord_trans. (GH256)
π Fixed bug where using free scales with facetting and flipping the coordinate axes could give unexpected results. (GH286)
π Fixed unwanted tick along the axis for versions of Matplotlib >= 3.1.0.
π Fixed geom_text not to error when using hjust and vjust. (GH287)
Fixed bug where geom_abline geom_hline and geom_vline could give wrong results when used with coord_trans.
π Fixed bug where layers with only infinite values would lead to an exception if they were the first layer encountered when choosing a scale.
Legends are now plotted in a predictable order which dedends on how the plot is constructed.
π The spokes drawn by geom_spoke can now have a fixed angle.
Aesthetics that share a scale (e.g. color and fill can have the same scale) get different guides if mapped to different columns.
When the transform of a specialised (one that is not and identity scale) continuous scale is altered, the user is warned about a possible error in what they expect. (GH254, GH255)
The method_args parameter in stat_smooth can now differentiate between arguments for initialising and those for fitting the smoothing model.
position_nudge can now deal with more geoms e.g. geom_boxplot.
The limits parameter of scale_x_discrete and scale_y_discrete can now be a function.
The width of the boxplot can now be set irrespective of the stat.
The mid-point color of scale_color_distiller now matches that of the trainned data.
π¨ The way in which layers are created has been refactored to give packages that that extend plotnine more flexibility in manipulating the layers.
You can now specify one sided limits for coordinates. e.g. coord_cartesian(limits=(None, 10)).
All the themeables have been lifted into the definition of theme so they can be suggested autocomplete.
π This release only updates the version requirement for the mizani project. See changelog
A copy of the changelog is pasted below.
geom_map will have to install it separately. (178)subplots_adjust themeable could not be used to set the wspace and hspace Matplotlib subplot parameters. (185)stat_bin where setting custom limits for the scale leads to an error. (189)geom_abline where passing the mapping as a keyword parameter lead to a wrong plot. (196)minor_breaks for tranformed scaled would have to be given in the transformed coordinates. Know they are given the data coordinates just like the major breaks.coord_cartesian float('inf') or np.inf are interpreted as the boundary of the plot panel.None and nan). This behaviour is controlled by the new na_translate option.minor_breaks parameter for continuous scales can now be given as an integer. An integer is taken to controll the number of minor breaks between any set of major breaks.π This is a big release with many improvements and bug-fixes.
π See the official changelog for details.
API Changes
π New Features
π Bug Fixes
π Big release with known bugs fixed and new features.
A copy of the changelog is pasted below.
legend_fill_ratio that control the area of the legend that isverbose. It noreturn_ggplot.minor_breaks parameter of scales is a callable, it nowlimits. Previously it accepted breakslimits.alpha, colour, fill and sizeπ Changed parameter settings for ~plotnine.stats.stat_smooth.
span=0.75 instead of 2/3surface is'direct' if predictions will be madeπ Better control of scale limits. You can now specify individual
limits of a scale.
scale_y_continuous(limits=(0, None))
xlim(None, 100)
You can also use ~plotnine.scales.expand_limits
Low and high ~plotnine.scales.scale limits can now be expanded
separately with different factors multiplicative and additive
factors.
The layer parameter show_legend can now accept a dict for finer
grained control of which aesthetics to exclude in the legend.
π Infinite values are removed before statistical computations stats
(40).
stats also gained new parameter na_rm, that controls whether
π missing values are removed before statistical computations.
~plotnine.qplot can now use the name and a Pandas series to label
the scales of the aesthetics.
You can now put stuff to add to a ggplot object into a list and add
that that instead. No need to wrap the list around the internal
class Layers.
lst = [geom_point(), geom_line()]
g = ggplot(df, aes('x', 'y'))
print(g + lst)
Using a list allows you to bundle up objects. It can be convenient
π when creating some complicated plots. See the Periodic Table
Example.
geoms where order was important. (26)class) is axlimstat_smooth(geom=geom_point),π Fixes
API Changes
π First public release