Plotnine是一个基于ggplot2的Python图形语法
Plotnine是一个基于ggplot2的Python图形语法
v0.5.1
Assets
2
This release only updates the version requirement for the mizani project. See changelog
v0.4.0
This is a big release with many improvements and bug-fixes.
See the official changelog for details.
Copy of the changelog
API Changes
- Calculated aesthetics are accessed using the stat() function. The old method (double dots ..name..) still works.
- stat_qq calculates slightly different points for the theoretical quantiles.
- The scales (when set to free, free_x or free_y') parameter of facet_grid and facet_wrap assigns the same scale across the rows and columns.
New Features
- Added geom_qq_line and stat_qq_line, for lines through Q-Q plots.
- Added geom_density_2d and geom_stat_2d.
- Added stat_ellipse.
- Added geom_map.
- Plotnine learned to respect plydata groups.
- Added stat_hull.
- Added save_as_pdf_pages().
Bug Fixes
- Fixed issue where colorbars may chop off the colors at the limits of a scale.
- Fixed issue with creating fixed mappings to datetime and timedelta type values.(GH88)
- Fixed scale_x_datetime and scale_y_datetime to handle the intercepts along the axes (GH97).
- Fixed stat_bin and stat_bin_2d to properly handle the breaks parameter when used with a transforming scale.
- Fixed issue with x and y scales where the name of the scale was ignored when determining the axis titles. Now, the name parameter is specified, it is used as the title. (GH105)
- Fixed bug in discrete scales where a column could not be mapped to integer values. (GH108)
- Make it possible to hide the legend with theme(legend_position='none'). (GH119)
- Fixed issue in stat_summary_bin where some input values gave an error. (GH123)
- Fixed geom_ribbon to sort data before plotting. (GH127)
- Fixed IndexError in facet_grid when row/column variable has 1 unique value. (GH129)
- Fixed facet_grid when scale='free', scale='free_x' or scale='free_y', the panels share axes along the row or column.
- Fixed geom_boxplot so that user can create a boxplot by specifying all required aesthetics. (GH136)
- Fixed geom_violin to work when some groups are empty. (GH131)
- Fixed continuous scales to accept minor=None (GH120)
- Fixed bug for discrete position scales, where drop=False did not drop unused categories (GH139)
- Fixed bug in stat_ydensity that caused an exception when a panel had no data. (GH147)
- Fixed bug in coord_trans where coordinate transformation and facetting could fail with a KeyError. (GH151)
- Fixed bug that lead to a TypeError when aesthetic mappings to could be recognised as being groupable. It was easy to stumble on this bug when using geom_density. (GH165)
- Fixed bug in facet_wrap where some combination of parameters lead to unexpected panel arrangements. (GH163)
- Fixed bug where the legend text of colorbars could not be themed. (GH171)
热门度与活跃度
8.9
2.5
Watchers：63 |
Star：2197 |
Fork：114 |
创建时间： 2017-04-25 03:00:44 |
最后Commits： 8天前 |
许可协议：GPL-2.0 |
f364913
Verified
has2k1 released this
Aug 21, 2019
This release has many changes, check out the changelog. A version of the changes is included below.
API Changes
The
draw
parameter ofgeom_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 forgeom_count
.New Features
geom_text
gained theadjust_text
parameter, and can now repel text.annotation_logticks
.geom_sina
geom_step
gained the optionmid
for the direction parameter. The steps are taken mid-way between adjacent x values.annotation_stripes
.Bug Fixes
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 bygeom_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 thanstat_smooth
. (GH242)Fixed bug in
position_dodge
where by bar plot could get thinner when facetting and useingpreserve = '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
wherefloat
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
, andylim
wheredatetime
andtimedelta
limits resulted in an error.Fixed bug where
geom_rect
could not be used withcoord_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 usinghjust
andvjust
. (GH287)Fixed bug where
geom_abline
geom_hline
andgeom_vline
could give wrong results when used withcoord_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.
Enhancements
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 instat_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 ofscale_x_discrete
andscale_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.