Releases#
All notable changes to this project will be documented in this changelog file.
The format is based on Keep a Changelog,
As of January, 2024, this project adheres to Semantic Versioning.
Version 0.26.2 (released Dec 31, 2025)#
Fixed#
Fixed error message in
hiveplotlib.BaseHivePlot.add_edge_curves_between_axes()whena1_to_a2=Trueand / ora2_to_a1=Trueare provided without a specifictag. The error message now correctly displays the existing tags for the specified axes. This fix should propagate to any method with parametersa1_to_a2/a2_to_a1orp1_to_p2/p2_to_p1.
Tooling Changes#
Drop support for Python 3.9 and add support for Python 3.14.
No longer restricting
holoviewsto versions below1.20.2orbokehto versions below3.7.0. By default, the latestholoviewsandbokehversions will now be included when installinghiveplotlib[holoviews]orhiveplotlib[bokeh]. This all stems frombokehversions3.7.0and above had dropped support for Python 3.9, which was causing conflicts withholoviewsversions1.20.2and above.- Added the following
ruffrules to code linting: EM(flake8-errmsg rules).ERA(flake8-eradicate rules).F(pyflakes rules).INP(flake8-no-pep420 rules).ISC(flake8-implicit-str-concat rules).PTH(flake8-pathlib rules).Q(flake8-quotes rules).RSE(flake8-raise rules).RUF(ruff’s own linting rules).T20(flake8-print rules).TC(flake8-type-checking rules).
- Added the following
Version 0.26.1 (released Sept 28, 2025)#
This is a bugfix release that eliminates a warning when using the matplotlib-based viz back ends (matplotlib and
datashader).
Users of these two back ends may notice slight changes in white space on the resulting figure (which affects things like title placement), but should otherwise be unaffected.
These two back ends were showing the following matplotlib warning when visualizing hive plots:
Ignoring fixed y limits to fulfill fixed data aspect with adjustable data limits
The underlying cause was how we set an equal aspect ratio, which this release changes from ax.axis("equal") to
ax.set_aspect("equal", adjustable="box").
Fixed#
Fixed
matplotlibwarning when visualizing hive plots with thematplotlibanddatashaderviz back ends. The positioning for additions to amatplotlibaxis (e.g. titles) may be slightly different, but otherwise users should be unaffected. The above-discussed warning should be gone.
Version 0.26.0 (released Sept 20, 2025)#
This release includes several major enhancements in the user API and flexibility in generating hive plots.
First, there is a new HivePlot class with major improvements for user-friendly,
object-oriented modifiability.
New flexibility here includes setting a partition variable to dictate the axes, choosing sorting variables, rotating the
hive plot, adding / changing repeat axes, changing the axes order, a plot() method, and the ability to set a viz
backend with any of the supported hiveplotlib visualization backends. The documentation has been updated to
demonstrate this improved functionality, with additional docs on migration to using the new HivePlot class.
The HivePlot class from previous releases lives on, but has been renamed to BaseHivePlot,
as its functionality is now the basis for the higher-level functionality of the new HivePlot class. Aside from the
name change, this class can still be used in almost exactly the same way as the previous releases.
Second, there are new, pandas.DataFrame-friendly node and edge data structures
(the NodeCollection and Edges classes, respectively).
Third, users can now visualize nodes / edges with node-specific / edge-specific metadata stored in the new
NodeCollection / Edges data structures (e.g. node / edge color, node size, edge width, transparency, etc.).
Users can also visualize statistical summaries of these node / edge metadata variables with the datashader back end.
Fourth, users can now include hover information for the interactive viz backends.
This release also drops support for use in Python 3.8 and adds support for Python 3.13, following the timeline of Python’s supported versions: https://devguide.python.org/versions/.
Finally, this release revises our CI/CD framework from using conda environments to uv virtual environments.
Added#
There is a completely new
HivePlotclass. The class from previous releases is still available for use with minimal changs (see Changed section below), but has been renamed to the lower-levelBaseHivePlotclass.Add
NodeCollectionclass to create collections of nodes frompandasdataframes. Users can also now visualize nodes (e.g. color, size, transparency) according to variables stored in theNodeCollection.datadataframe.Add
Edgesclass to create edges frompandasdataframes ornumpyarrays. Users can also now visualize edges (e.g. color, width, transparency) according to variables stored in theEdges.datadataframe.Add hover information support for
node_viz(),edge_viz(),axes_viz(), andhive_plot_viz()with thebokeh,plotly, andholoviews(withbokeh, notmatplotlib) back ends. This capability is enabled by default, but can be disabled by settinghover=Falsein the function calls. Specific hover information can also be turned on inhive_plot_viz()by providing one or more of["nodes", "edges", "axes"]as inputs to thehoverparameter. Hover information for nodes will include provided node data and metadata in theHivePlot.nodesattribute. Hover information for edges will include provided edge data and metadata in theHivePlot.edgesattribute. Hover information for axes will include settings from eachAxisinstance in theHivePlot.axesattribute. Hovering should be comparable between the three hover-supporting backends, with the exception that axis hover information with theplotlybackend will show up on the axis label, not the axis itself. Note: hover information is only currently supported for Hive Plots, not P2CPs.Add
hiveplotlib.datasets.toy_hive_plots.example_node_data()to generate an examplepandas.DataFrameof node data.Add
hiveplotlib.datasets.toy_hive_plots.example_node_collection()to generate an exampleNodeCollectioninstance.Add
hiveplotlib.datasets.toy_hive_plots.example_edge_data()to generate an examplepandas.DataFrameof edge data.Add
hiveplotlib.datasets.toy_hive_plots.example_edges()to generate an exampleEdgesinstance.Add
hiveplotlib.Axis.add_metadata()method to add metadata to anAxisinstance. This metadata will be included in the hover information for theAxiswhen visualizing with the interactive viz backends.Add
node_kwargsparameter tohiveplotlib.viz.datashader.datashade_hive_plot_mpl()to allow users to pass separate keyword arguments to modify the node rasterization. Users can still provide additional keyword arguments that now only modify the edge rasterization.Add
hiveplotlib.hiveplot.supported_viz_backends()to return the supported viz back ends for visualizing hive plots in the currenthiveplotlibversion.Add
hiveplotlib.exceptions.hive_plotmodule to generate custom exceptions for better error-handling when building / modifying hive plots.Add
hiveplotlib.exceptions.nodemodule to generate custom exceptions for better error-handling when building / modifyingNodeCollectioninstances.Add
hiveplotlib.node.node_collection_from_node_list()to createNodeCollectionfrom a list ofNodevalues.Add
hiveplotlib.node.subset_node_collection_by_unique_ids()to create a subset dataframe of node data corresponding to a list of unique node IDs.Add
overwrite_existing_kwargs,reset_existing_kwargs, andwarn_on_no_edgesflags tohiveplotlib.BaseHivePlot.add_edge_kwargs()andhiveplotlib.BaseHivePlot.connect_axes(). Default behavior gives same results as before, except adding edge kwargs to a non-existent set of edges is now allowed (but will raise a warning by default). Settingreset_existing_kwargstoTrueallows a user to drop all previously-set edge kwargs for the user-specified subset of edges dictated by the other parameters. Settingoverwrite_existing_kwargstoFalseprevents overwriting any already-provided edge kwargs for the user-specified subset of edges dictated by the other parameters.Add
warn_on_no_edgesflag tohiveplotlib.BaseHivePlot.add_edge_kwargs(). Default behaviorTrueleaves behavior unchanged from before. Setting toFalsesilences warnings to user about setting edge kwargs for nonexistent edges.
Changed#
Breaking Changes#
The
HivePlotclass of past releases has been renamed toBaseHivePlot. This class is still available for use, but is now the basis for the new, higher-levelHivePlotclass.hiveplotlib.BaseHivePlot.place_nodes_on_axis()now works off of a dataframe of node data and metadata via the newnode_dfparameter, not lists or 1dnumpyarrays of unique IDs. The oldunique_idsparameter will now raise aTypeError, pointing the user to thenode_dfparameter. This was a necessary change to support hover information for the interactive viz backends.The hive plot edges constructed in
BaseHivePlotare now stored under thehive_plot_edgesattribute instead of theedgesattribute, which is now reserved for storing edges with the higher-levelEdgesclass.hiveplotlib.datasets.toy_hive_plots.example_hive_plot()has been revised to randomly generate aHivePlotinstance. The originalexample_hive_plot()function persists, but has been renamedhiveplotlib.datasets.toy_hive_plots.example_base_hive_plot(), in accordance with renaming the previous hive plot classBaseHivePlot.Axisnode_placement_labelattribute renamed tosorting_variable. Also, the two private methods have been renamed as public methods (_set_node_placements()now calledset_node_placements()and_set_node_placement_label()now calledset_sorting_variable()). The parameter inputs for the now-namedhiveplotlib.Axis.set_node_placements()have also been revised to a dataframe and a unique ID column name.hiveplotlib.viz.datashader.datashade_hive_plot_mpl()parameters have been revised. Specifically,log_cmaphas been replaced with two separatelog_cmap_nodesandlog_cmap_edgesparameters to allow for controlling log scales separately between nodes and edges. Similarly,reductionhas been replaced withreduction_nodesandreduction_edgesparameters. The default values for all these parameters are the same as the originallog_cmap=Trueandreduction=ds.count()values.hiveplotlib.converters.networkx_to_nodes_edges()has been revised to return aNodeCollectionand aEdgesinstance instead of a list ofNodeinstances and an(n, 2)numpyarray of edges.
Other Changes#
hiveplotlib.Axis.node_placements, a dataframe attribute that originally only stored positional infromation, now also stores the associated node metadata. This was done to allow for adding node hover information for the interactive viz backends. Theunique_idcolumn in this dataframe may now have a different name as a function of the specified name of unique IDs when creating nodes via theNodeCollectionclass. Note:hiveplotlib.BaseHivePlot.to_json()will still always call node unique IDs"unique_id"in the resulting JSON data.BaseHivePlotclass now tracks itsnodesattribute of as typeNodeCollectioninstead of a dictionary with unique ID keys andNodevalues.hiveplotlib.BaseHivePlot.add_nodes()now supports adding a list ofNodevalues (as it did before) or aNodeCollection.hiveplotlib.viz.holoviews()axis visualization now backed by a holoviews.Segments() call. This was originally aholoviews.Curve()call. This may affect axes-related keyword arguments when plotting with either of the supportedholoviewsback ends.hiveplotlib.viz.holoviews()edge visualization now backed by a holoviews.Contours() call. This was originally aholoviews.Path()call. This may affect edge-related keyword arguments when plotting with either of the supportedholoviewsback ends. When using theholoviews-bokehback end, edge colors also MUST be specified via the"color"parameter ("line_color"will not be accepted, now raising aValueError).Axisrepr and str representations now includes more metadata about current settings for a given axis.Axisnow tracks thevminandvmaxvalues used to place nodes on theAxisviahiveplotlib.BaseHivePlot.place_nodes_on_axis(). Additionally, this tracks whether thevminand / orvmaxvalues were inferred, storing those boolean values as the newinferred_vminandinferred_vmaxattributes in theAxisinstance.
Fixed#
hiveplotlib.BaseHivePlot.reset_edges()used to trigger an error if requesting the deletion of edges that do not exist. This has been fixed (the method now does nothing when asked to delete edges that do not exist).hive_plot_viz()calls with different viz backends on empty hive plots (a lack of axes in particular) used to returnNonevalues and / or error out in strange ways. This has now been standardized to return the expected figure types without error. The sole exception ishiveplotlib.viz.datashader.datashade_hive_plot_mpl(), which will now return amatplotlibfigure, axis, and twoNonevalues (one per lack of datashaded image for both nodes and edges) when plotting an empty hive plot.Fixed incorrect type hints in
hiveplotlib.viz.datashadermodule forreductionparameter.Fixed incorrect behavior for the
vmaxsettings for node and edge viz functionality with thedatashaderbackend. An internal bug causedvmax=Noneto fail if there were any NaN values. This has been fixed by changing a.max()call to anumpy.nanmax()call.Fixed incorrect behavior for for node and edge viz functionality with the
datashaderbackend. A bug caused thevmin/vmaxvalues to be ignored iflog_cmapwas set toFalse.
Tooling Changes#
Drop support for Python 3.8 and add support for Python 3.13.
Developer environment and CI/CD framework revised from using conda environments to uv virtual environments.
Developers can now test multiple installations and python versions through CI/CD as optional jobs on feature branch pipelines.
Added Makefile for local developers.
Deprecated#
hiveplotlib.hive_plot_n_axesis set to be removed in version0.28.0. Its functionality has been fully incorporated into the revisedHivePlotclass.
Version 0.25.1 (released Jul 5, 2024)#
This bugfix release adds numpy>=2.0.0 support.
Fixed#
Compatibility with
numpy 2.0.0.
Version 0.25.0 (released Mar 23, 2024)#
Added#
Added
hiveplotlib.viz.holoviewsmodule supporting hive plot and P2CP viz in holoviews.hiveplotlib.datasets.example_p2cp()added for generating P2CP with Gaussian four blobs example.
Version 0.24.0 (Released Feb 18, 2024)#
Added#
hiveplotlib.datasets.example_nodes_and_edges()added for generating random nodes, node splits, and edges for an arbitrary number of axes.hiveplotlib.HivePlot.connect_axes()now allows users to specifycontrol_rho_scaleandcontrol_angle_shift, which allow users to modify the positioning of the control point for the Bézier curve of each edge. By default, the control point for an edge between two nodes is the polar midpoint of the two curves, but users can now scale the polar distance from the origin (control_rho_scale) or shift the angle counterclockwise (control_angle_shift) for each control point relative to its default median polar position.
Changed#
hiveplotlib.HivePlot.add_axes()now supports adding a singleAxisinstance (before, a singleAxisneeded to be added as a list with one element).hiveplotlib.viz.matplotlibwhen settingcenter_plot=Truenow performsax.axis("equal")for the provided / resultingmatplotlibaxis. Before, the global effectplt.axis("equal")was being called.Code hygiene (linting and formatting) revised from
flake8andblack, respectively, to ruff.Documentation moved over to ReadTheDocs: https://hiveplotlib.readthedocs.io/stable/.
Fixed#
hiveplotlib.viz.matplotlib.hive_plot_viz()andhiveplotlib.viz.matplotlib.p2cp_viz()had a bug from the0.23.0release that made the function calls non-responsive to changing thecenter_plot,buffer, andaxes_offparameters.hiveplotlib.viz.matplotlibhad a bug that made composing viz functions from this module and callingaxes_off=Falsefor a later function call unable to cancel out theaxes_off=Truebehavior of an earlier function call.
Removed#
hiveplotlib.HivePlot.to_json()revised to generate a more D3-friendly JSON structure. The"curves"key originally contained multiple lines in a single list of[x, y]values separated by[null, null]values. The lines are now split into their own lists. This proved more compatible for plotting in JavaScript. The original JSON structure could still be created for now by running withdeprecated_version=Truein versions0.22.0and0.23.0. The old JSON structure was deprecated in version0.22.0and has been removed in this version.
- Many thanks to:
@besiansejdiu for ideas, discussion, and code review for exposing the changing of control points of edge Bézier curves.
@michael.catanzaro for assistance on migrating to
ruff.@abrahamdavidsmith for assistance on automating Gitlab releases.
Version 0.23.0 (released Feb 2, 2024)#
Added#
Added
hiveplotlib.viz.plotlymodule supporting hive plot and P2CP viz in plotly.hiveplotlib.HivePlotnow tracks the radius corresponding to the largest polar endpoint of all axes with themax_polar_endparameter.
Changed#
All occurances of
mpl_axes_offinhiveplotlib.viz.matplotlibandhiveplotlib.viz.datashaderrenamed toaxes_offfor consistency between different viz back ends.Many redundant viz warnings used for all viz back ends pulled out of individual viz functions into
hiveplotlib.viz.input_checks.input_check()to avoid redundant code, especially as the repository expands support for more visualization packages. User experience will not be changed by this.Other redundant, viz package-agnostic code pulled out from individual viz functions into the
hiveplotlib.viz.basesub-module as well as into private_fig_setupmethods. User experience will not be changed by either of these revisions.For all occurances of
axes_labels_fontsizeinhiveplotlib.viz.bokeh, the default value has been raised from"13px"to"16px".For all occurances of
bufferinhiveplotlib.viz.bokeh, the default value has been raised from"0.2"to"0.3"(to compensate for the larger default font for axes labels).For all occurances of
center_plotinhiveplotlib.viz, if the provided hive plot / P2CP has no axes, then no centering will run. (This would previously trigger an error.)hiveplotlib.datasets.example_hive_plot()no longer defaults to putting the kwargalpha=1on all edges for viz, as this does not generalize to thehiveplotlib.viz.plotlyuse case. Kwargs now exposed for the underlyinghiveplotlib.hive_plot_n_axes()call.
Version 0.22.0 (released Jan 23, 2024)#
Added#
hiveplotlib.datasets.example_hive_plot()added for generating a hive plot with random nodes and edges.
Changed#
hiveplotlib.HivePlot.to_json()revised to generate a more D3-friendly JSON structure. The"curves"key originally contained multiple lines in a single list of[x, y]values separated by[null, null]values. The lines are now split into their own lists. This proved more compatible for plotting in JavaScript. The original JSON structure can still be created for now by running withdeprecated_version=True. Running this way will raise aDeprecationWarningand will be removed in version0.24.0.Moving to full semantic versioning (e.g.
x.y.z) this release and onward.
Version 0.21 (released Mar 20, 2023)#
Enhancements#
hiveplotlib.hive_plot_n_axes()now accepts aNonevalue as one of the values in theaxes_assignmentsinput. TheNoneaxis takes all otherwise-unassigned nodes from thenode_listinput and assigns them to that axis.Restructure
hiveplotlib.__init__.pyto split out capabilities into submodules. Now havehiveplotlib.node,hiveplotlib.axis,hiveplotlib.hiveplot, andhiveplotlib.p2cpmodules. High-level imports have been left unchanged.split_nodes_on_variable(), a node-specific utility function, moved fromhiveplotlib.utilsmoved intohiveplotlib.node.The two
P2CP-specific utility functions inhiveplotlib.p2cp_utils–split_df_on_variable()andindices_for_unique_values()– have been moved intohiveplotlib.p2cp. Thehiveplotlib.p2cp_utilsmodule has been deleted.Added
hiveplotlib.node.dataframe_to_node_list()for converting rows of a dataframe into a list ofNodeinstances.Added
hiveplotlib.viz.datashader.datashade_hive_plot_mpl()for higher-level call to do fully-datashaded hive plots (node and edges plus the standardaxes_viz()).Add a
bufferparameter to the datashading calls to have their extent go slightly beyond axis extents by default (and can be increased further by the user as desired).Add some international trade network data to the package, and a reader function
hiveplotlib.datasets.international_trade_data(). Also added generalized runner with instructions for how to make additional trade datasets from the Harvard Growth Lab dataset in the hiveplotlib repository under./runners/make_trade_network_dataset.py.Improved type hinting throughout the package.
Fix / clarify some of the
hiveplotlib.viz.datashaderfunction docstrings.Formally add
seabornto dependencies forhiveplotlib[datashader]. Switch default edge colormap forhiveplotlib.viz.datashader.datashade_edges_mpl()from"viridis"to theseaborncolormap used in the “Hive Plots for Large Networks” example notebook.All remaining
np.random.seed()removed from repository (some of this was still in the test suite). These have all been replaced withrng = np.random.default_rng(0).Added notebook called “Hive Plots with More Than 3 Groups,” documenting examples of the new
Noneaxis capability as well as other 4+ group hive plot options, specifically a multi-layered axes hive plots, and a Hive Plot Matrix (HPM).Major refurbishment of the “Bitcoin Trader Network” notebook.
Bug Fixes#
Fix to the
hiveplotlib.viz.datashaderfunctions, which did not correctly compose. If datashading onto an existing figure and axis without any hive plot axes, the image did not span the correct extent. Now, when datashading onto an existing figure and and axis, the datashader images will now always auto-scale to the extent of the hive plot axes.
Removed Deprecations#
The
_mplnamed viz functions, which raised aDeprecationWarningin version0.20, have been removed in version0.21. For example,hiveplotlib.viz.hive_plot_viz_mpl()is now calledhiveplotlib.viz.hive_plot_viz. Although thematplotlibbackend is available by default, different backends can be accessed within thehiveplotlib.vizmodule. For example an explicitmatplotlibbackend hive plot visualization can now be called viahiveplotlib.viz.matplotlib.hive_plot_viz(), and abokehbackend hive plot visualization can now be called viahiveplotlib.viz.bokeh.hive_plot_viz().Note
hiveplotlib.viz.datashader.datashade_edges_mpl()andhiveplotlib.viz.datashader.datashade_nodes_mplhave been left with their_mplnaming for now, as datashading could eventually be done via multiple backends.
Version 0.20 (released Jan 19, 2023)#
Enhancements#
hiveplotlib.viz.bokehsubmodule ofbokeh-backend viz functions for hive plots and P2CPs added.hiveplotlib.vizdefaultmatplotlib-backend viz functions have been renamed without the_mplending.matplotlib-backend viz code is now contained in thehiveplotlib.viz.matplotlibsub-module, making the_mplredundant. Default viz called underhiveplotlib.viz, however, will still use thematplotlibbackend.Improvements to
hiveplotlib.vizdocstrings.Exposed kwargs that allow the modification of axes labels in the
hiveplotlib.vizmodule.hiveplotlibnow being checked againstflake8-docstrings. (flake8and documentation-building checks also incorporated into the CI pipeline). Many subtle documentation revisions from this change.hiveplotlib.vizfunctions that are exposed to bothHivePlotandP2CPinstances now use thehiveplotlib.viz.input_checks.input_check()call to validate proper inputs. This will scale better if the code ever supports additional instances or further checks on said instances. In the least, this made the viz code a little more DRY.
Note
The _mpl named viz functions will raise a DeprecationWarning in version 0.20, with support to be removed
in version 0.21.
hiveplotlib.viz.datashader.datashade_edges_mpl() and
hiveplotlib.viz.datashader.datashade_nodes_mpl have been left with their _mpl naming for now,
as datashading could eventually be done via multiple backends.
Bug Fixes#
pytestwarnings in the CI about a coming deprecation resolved.
Version 0.19 (released Sept 6, 2022)#
Enhancements#
Added
hiveplotlib.viz.datashadermodule added, plus documentation explaining and demonstrating datashading capabilities for both hive plots and P2CPs.hiveplotlib.viz.edge_viz_mpl(),hiveplotlib.viz.hive_plot_viz_mpl()andhiveplotlib.viz.p2cp_viz_mpl()now have an exposedtagsparameter that allows plotting a subset of tags (with default behavior to plot all tags).Improved type hints for
hiveplotlib.vizmodule.hiveplotlib.viz.p2cp_legend_mpl()revisedtags_to_includeparameter totagsto be more consistent with the rest of the API.License revised from GNU AGPL to BSD License (BSD-3-Clause).
Bug Fixes#
Major bug fix in
hiveplotlib.viz.edge_viz_mpl(), which made incorrect assumptions about how one can compose lines inmatplotlib. Revised to useLineCollectionon the backend.Incorrect assumptions also found in notebooks demonstrating viz in other packages. These have been corrected.
Fixed
hiveplotlib.viz.axes_viz_mpl()not responding tompl_axes_of=Falseuse case.
Version 0.18 (released Aug 17, 2022)#
Enhancements#
HivePlot.to_json()andP2CP.to_json()implemented.Documentation notebook showing how to visualize hive plots and P2CPs with other viz libraries off of the JSON output.
Started this change log (and filled in a little bit of it looking back at some previous versions).
Switched the spacers between discretized edges in the
(n, 2)numpyarrays to beingnp.naninstead ofNone. This allows us to preservefloat-typed arrays instead of being forced to switch toObject-typed arrays, which speeds up the code and improves memory usage.
Bug Fixes#
HivePlot.add_edge_kwargs()doesn’t need to be run witha2_to_a1=Falseto avoid errors with axis <-> repeat axis anymore.Generally more case control / useful warnings for
HivePlot.add_edge_kwargs()when trying to put kwargs on impossible edge sets.Revised
DeprecationWarningissues that were arising from usingpytest.warns(None)throughout the test suite.Revised random draws in
hiveplotlib.datasets.four_gaussian_blobs_3d()to usenp.random.default_rng()instead ofnp.random.seed().
Version 0.17 (released Feb 8, 2022)#
A couple of bug fixes in
hive_plot_n_axes(), additional utility functions, pandas futurewarning resolved, lots more documentation.
Enhancements#
Additional Utility Functions
Bug Fixes#
A couple of bug fixes in
hive_plot_n_axes().
Version 0.16 (released Dec 21, 2021)#
Started a change log!
Added in Polar Parallel Coordinate Plots (P2CPs).