Changelog¶
v0.13.3¶
2025-04-11
Enhancements¶
Make it possible to train discrete data that is a sequence of tuples. (plotnine issue [#933](https://github.com/has2k1/plotnine/issues/933))
v0.13.2¶
2025-04-03
Enhancements¶
For python >=3.13 ~mizani.bounds.squish_infinite and ~mizani.bounds.squish do not warning about invalid values when passed arrays with dtype=uint64 and a range with negative values.
v0.13.1¶
2024-12-10
Enhancements¶
Type checking pass with numpy 2.2.
v0.13.0¶
2024-10-24
API Changes¶
Support for numpy timedelta64 has been removed. It was not well supported in the first place, so removing it should be of consequence.
mizani.transforms.trans_new function has been deprecated.
Enhancements¶
~mizani.breaks.breaks_date has been slightly improved for the case when it generates monthly breaks.
New¶
transgained new method diff_type_to_num that should be helpful with some arithmetic operations for non-numeric domains.
v0.12.2¶
2024-09-04
Bug Fixes¶
Fixed
squishandsquish_infiniteto work for non writeable pandas series. This is broken for numpy 2.1.0.
v0.12.1¶
2024-08-19
Enhancements¶
Renamed "husl" color palette type to "hsluv". "husl" is the old name but we still work although not part of the API.
v0.12.0¶
2024-07-30
API Changes¶
mizani now requires python 3.9 and above.
Bug Fixes¶
Fixed bug where a date with a timezone could lose the timezone. #45.
v0.11.4¶
2024-05-24
Bug Fixes¶
Fixed
squishandsquish_infiniteso that they do not reuse numpy arrays. The users object is not modified.This also prevents exceptions where the numpy array backs a pandas object and it is protected by copy-on-write.
v0.11.3¶
2024-05-09
Bug Fixes¶
Fixed bug when calculating monthly breaks where when the limits are narrow and do not align with the start and end of the month, there were no dates returned. (#42)
v0.11.2¶
2024-04-26
Bug Fixes¶
Added the ability to create reversed colormap for
cmap_palandcmap_d_palusing the matplotlib convention of name_r.
v0.11.1¶
2024-03-27
Bug Fixes¶
Fix
mizani.palettes.brewer_palto return exact colors in the when the requested colors are less than or equal to those in the palette.Add all matplotlib colormap and make them avalaible from
cmap_palandcmap_d_pal(#39).
New¶
Added
breaks_symlogto calculate breaks for the symmetric logarithm transformation.
Changes¶
The default big_mark for
label_numberhas been changed from a comma to nothing.
v0.11.0¶
2024-02-12
Enhancements¶
Removed FutureWarnings when using pandas 2.1.0
New¶
Added
breaks_symlogto calculate breaks for the symmetric logarithm transformation.
Changes¶
The default big_mark for
label_numberhas been changed from a comma to nothing.
v0.10.0¶
2023-07-28
API Changes¶
mpl_formathas been removed,number_formattakes its place.mpl_breakshas been removed,extended_breakshas always been the default and it is sufficient.matplotlib has been removed as a dependency of mizani.
mizani now requires python 3.9 and above.
The units parameter for of
timedelta_formatnow accepts the values "min", "day", "week", "month", instead of "m", "d", "w", "M".The naming convention for break formatting methods has changed from *_format to label_*. Specifically these methods have been renamed.
comma_format is now
label_commacustom_format is now
label_customcurrency_format is now
label_currencylabel_dollar is now
label_dollarpercent_format is now
label_percentscientific_format is now
label_scientificdate_format is now
label_datenumber_format is now
label_numberlog_format is now
label_logtimedelta_format is now
label_timedeltapvalue_format is now
label_pvalueordinal_format is now
label_ordinalnumber_bytes_format is now
label_bytes
The naming convention for break calculating methods has changed from *_breaks to breaks_*. Specifically these methods have been renamed.
log_breaks is now
breaks_logtrans_minor_breaks is now
minor_breaks_transdate_breaks is now
breaks_datetimedelta_breaks is now
breaks_timedeltaextended_breaks is now
breaks_extended
dataspace_is_numericalhas changed todomain_is_numericaland it is now determined dynamically.The default minor_breaks for all transforms that are not linear are now calculated in dataspace. But only if the dataspace is numerical.
New¶
symlog_transfor symmetric log transformation
v0.9.2¶
2023-05-25
Bug Fixes¶
Fixed regression in but in
date_formatwhere it cannot deal with UTC timezone fromtimezone#30.
v0.9.1¶
2023-05-19
Bug Fixes¶
Fixed but in
date_formatto handle datetime sequences within the same timezone but a mixed daylight saving state. (plotnine #687)
v0.9.0¶
2023-04-15
API Changes¶
palettable dropped as a dependency.
Bug Fixes¶
Fixed bug in
datetime_transwhere a pandas series with an index that did not start at 0 could not be transformed.Install tzdata on pyiodide/emscripten. #27
v0.8.1¶
2022-09-28
Bug Fixes¶
Fixed regression bug in
log_formatfor where formatting for bases 2, 8 and 16 would fail if the values were float-integers.
Enhancements¶
log_formatnow uses exponent notation for bases other than base 10.
v0.8.0¶
2022-09-26
API Changes¶
The
lutparameter ofcmap_palandcmap_d_palhas been deprecated and will removed in a future version.datetime_transgained parametertzthat controls the timezone of the transformation.log_formatgained boolean parametermathtexfor TeX values as understood matplotlib instead of values in scientific notation.
Bug Fixes¶
Fixed bug in
zero_rangewhereuint64values would cause a RuntimeError.
v0.7.4¶
2022-04-02
API Changes¶
comma_formatis now imported automatically when using*.Fixed issue with
scale_discreteso that if you train on data withNanand specify and old range that also hasNaN, the result range does not include twoNaNvalues.
v0.7.3¶
(2020-10-29)
Bug Fixes¶
Fixed log_breaks for narrow range if base=2 (#76).
v0.7.2¶
(2020-10-29)
Bug Fixes¶
Fixed bug in
rescale_max()to properly handle values whose maximum is zero (#16).
v0.7.1¶
(2020-06-05)
Bug Fixes¶
Fixed regression in
mizani.scales.scale_discrete.train()when trainning on values with some categoricals that have common elements.
v0.7.0¶
(2020-06-04)
Bug Fixes¶
Fixed issue with
mizani.formatters.log_breakswhere non-linear breaks could not be generated if the limits where greater than the largest integersys.maxsize.Fixed
mizani.palettes.gradient_n_pal()to returnnanfornanvalues.Fixed
mizani.scales.scale_discrete.train()when training categoricals to maintain the order. (plotnine #381)
v0.6.0¶
(2019-08-15)
New¶
Added
pvalue_formatAdded
ordinal_formatAdded
number_bytes_formatAdded
pseudo_log_trans()Added
reciprocal_transAdded
modulus_trans()
Enhancements¶
mizani.breaks.date_breaksnow supports intervals in theorder of seconds.
mizani.palettes.brewer_palnow supports a direction argument to control the order of the returned colors.
API Changes¶
boxcox_trans()now only accepts positive values. For both positive and negative values,modulus_trans()has been added.
v0.5.4¶
(2019-03-26)
Enhancements¶
mizani.formatters.log_formatnow does a better job of approximating labels for numbers like3.000000000000001e-05.
API Changes¶
exponent_thresholdparameter ofmizani.formatters.log_formathas been deprecated.
v0.5.3¶
(2018-12-24)
API Changes¶
Log transforms now default to
base - 2minor breaks. So base 10 has 8 minor breaks and 9 partitions, base 8 has 6 minor breaks and 7 partitions, ..., base 2 has 0 minor breaks and a single partition.
v0.5.2¶
(2018-10-17)
Bug Fixes¶
Fixed issue where some functions that took pandas series would return output where the index did not match that of the input.
v0.5.1¶
(2018-10-15)
Bug Fixes¶
Fixed issue with
log_breaks, so that it does not fail needlessly when the limits in the (0, 1) range.
Enhancements¶
Changed
log_formatto return better formatted breaks.
v0.5.0¶
(2018-11-10)
API Changes¶
Support for python 2 has been removed.
call()andmeth:~mizani.breaks.trans_minor_breaks.call now accept optional parameter
nwhich is the number of minor breaks between any two major breaks.
The parameter nan_value has be renamed to na_value.
The parameter nan_rm has be renamed to na_rm.
Enhancements¶
Better support for handling missing values when training discrete scales.
Changed the algorithm for
log_breaks, it can now return breaks that do not fall on the integer powers of the base.
v0.4.6¶
(2018-03-20)
Added
squish
v0.4.5¶
(2018-03-09)
Added
identity_palAdded
cmap_d_pal
v0.4.4¶
(2017-12-13)
Fixed
date_formatto respect the timezones of the dates (#8).
v0.4.3¶
(2017-12-01)
Changed
date_breaksto have more variety in the spacing between the breaks.Fixed
date_formatto respect time part of the date (#7).
v0.4.2¶
(2017-11-06)
Fixed (regression) break calculation for the non ordinal transforms.
v0.4.1¶
(2017-11-04)
transobjects can now be instantiated with parameter to override attributes of the instance. And the default methods for computing breaks and minor breaks on the transform instance are not class attributes, so they can be modified without global repercussions.
v0.4.0¶
(2017-10-24)
API Changes¶
Breaks and formatter generating functions have been converted to classes, with a
__call__method. How they are used has not changed, but this makes them move flexible.ExtendedWilksonclass has been removed.extended_breaks()now contains the implementation of the break calculating algorithm.
v0.3.4¶
(2017-09-12)
Fixed issue where some formatters methods failed if passed empty
breaksargument.Fixed issue with
log_breaks()where if the limits were with in the same order of magnitude the calculated breaks were always the ends of the order of magnitude.Now
log_breaks()((35, 50))returns[35, 40, 45, 50]as breaks instead of[1, 100].
v0.3.3¶
(2017-08-30)
Fixed SettingWithCopyWarnings in
squish_infinite().Added
log_format().
API Changes¶
Added
log_transnow useslog_format()as the formatting method.
v0.3.2¶
(2017-07-14)
Added
expand_range_distinct()
v0.3.1¶
(2017-06-22)
Fixed bug where using
log_breaks()with Numpy 1.13.0 led to aValueError.
v0.3.0¶
(2017-04-24)
Added
xkcd_palette(), a palette that selects from 954 named colors.Added
crayon_palette(), a palette that selects from 163 named colors.Added
cubehelix_pal(), a function that creates a continuous palette from the cubehelix system.Fixed bug where a color palette would raise an exception when passed a single scalar value instead of a list-like.
extended_breaks()andmpl_breaks()now return a single break if the limits are equal. Previous, one run into an Overflow and the other returned a sequence filled with n of the same limit.
API Changes¶
mpl_breaks()now returns a function that (strictly) expects a tuple with the minimum and maximum values.
v0.2.0¶
(2017-01-27)
Fixed bug in
censor()where a sequence of values with an irregular index would lead to an exception.Fixed boundary issues due internal loss of precision in ported function
seq().Added
mizani.breaks.extended_breaks()which computes breaks using a modified version of Wilkinson's tick algorithm.Changed the default function
mizani.transforms.trans.breaks_()used bymizani.transforms.transto compute breaks frommizani.breaks.mpl_breaks()tomizani.breaks.extended_breaks().mizani.breaks.timedelta_breaks()now usesmizani.breaks.extended_breaks()internally instead ofmizani.breaks.mpl_breaks().Added manual palette function
mizani.palettes.manual_pal().Requires pandas version 0.19.0 or higher.
v0.1.0¶
(2016-06-30)
First public release