GraphingLib/GraphingLib: GraphingLib 1.6.0 Release
Abstract
GraphingLib 1.6.0 Release Notes Highlights New SmartFigure, SmartFigureWCS and SmartTwinAxis that unify the Figure and MultiFigure classes New LegendElement objects to create custom legend entries New PlottableAxMethod object to use any plotting method from matplotlib New Ellipse class The to_desmos method for the Plottable1D classes allows export of a 1D plot into coordinates readable by Desmos New Features Color bar parameters, color map range and histogram orientation Added the color bar parameters (label, position, orientation, etc.) for Scatter, Heatmap and Contour. These can be specified by calling the set_color_bar_params method. Also, added the color map range, which can be specified with color_map_range=(start, end). Added the possibility to plot a horizontal histogram with orientation="horizontal". (PR #566) New custom ticks setting options Custom ticks can now be specified even if labels are left unspecified. In that case, labels are automatically generated. New xtick_spacing and ytick_spacing options to set the spacing between each tick without specifying the tick explicit positions. (PR #569) New behaviour for Hlines and Vlines x_min/x_max or y_min/y_max Now optional and None by default, the lines are spanning the entire axes if left to None. When specified, the behaviour is unchanged. (PR #571) Plottable1D, Plottable2D, Plottable1D.to_desmos and Plottable1D.eq The new Plottable1D and Plottable2D dummy classes can be used for type hinting. Also, the Plottable1D.to_desmos method can now be used to export a Plottable1D into a list of coordinates, readable by Desmos. Every Plottable1D also now has a __eq__ method for comparing x and y data. (PR #573) New set_grid method for more Figure grid customization Added a new Figure.set_grid method to set the grid parameters and added parameter to set which grid lines to display (either "both", "major" or "minor") independently for both axes. (PR #577) Added SmartFigure, SmartFigureWCS and SmartTwinAxis Added the SmartFigure, SmartFigureWCS and SmartTwinAxis classes to unify Figure and MultiFigure in a single class as well as provide a complete way to customize the layout of the figure. (PR #590) Added SmartFigure handbook sections Added the "Creating a simple figure with the SmartFigure", "Advanced plotting with the SmartFigure" and "Specialized SmartFigures for different projections" handbook sections to the documentation. (PR #590) Added LegendElement classes Added LegendLine, LegendMarker and LegendPatch classes to create custom legend entries with the SmartFigure. (PR #590) Added PlottableAxMethod Added the PlottableAxMethod class to allow users to create plots that aren't implemented in GraphingLib yet. (PR #590) Added fit max_iterations Added a "max_iterations" parameter to fitting classes. (PR #591) Added alpha parameter Added an "alpha" parameter to Curve, Fits, Scatter, Point, HLines, VLines, Text, Arrow and Line classes to control opacity. (PR #595) Added Text.rotation parameter Added a "rotation" parameter to the Text class to allow rotation of text elements. (PR #595) Added Ellipse class Added the Ellipse class to create and manipulate ellipse shapes, with properties for width, height, and circumference. (PR #602) Text highlighting Added highlight_color, highlight_alpha, and highlight_padding parameters to the Text class. (PR #603) Added MathematicalObject Protocol class Added a MathematicalObject Protocol class in graphinglib.tools to provide default implementations for reverse and in-place mathematical operations. (PR #604) Added Plottable.copy_with method Added a copy_with method to the Plottable class to create modified copies of Plottables with updated attributes. (PR #605) Heatmap mesh properties Heatmap now supports x_mesh and y_mesh properties to define the coordinates of the heatmap cells. (PR #627) Contour doesn't require mesh Contour now automatically generates mesh coordinates if x_mesh and y_mesh are not provided. (PR #627) Contour line_widths property Contour now includes a line_widths property to customize the width of contour lines, if not filled. (PR #627) Added Arrow styles Added "style" parameter to the Arrow class, which can be "->", "-|>", "-[", "]->", "simple", "fancy", or "wedge". (PR #633) norm parameter for Heatmap Added a norm parameter for Heatmap as exists for imshow. (PR #634) Improvements Renamed Histogram.number_of_bins Renamed parameter "number_of_bins" to "bins" in Histogram class for consistency and clarity since this parameter can be used to specify bin edges as well as the number of bins. (PR #591) Improved Fits fitting range Modified Fits classes to choose their fitting range based on the minimum and maximum x-values of the provided data instead of the first and last points. (PR #591) Improved Histogram.init and Heatmap._plot_element Cleaned these methods by removing redundant code and improving readability. (PR #591) Renamed Point.color to face_color Renamed the "color" parameter in the Point class to "face_color" for consistency with the Scatter class. (PR #591) Transformed Heatmap._xy_range to a property _xy_range is now a property to keep it updated if the axis ranges are modified after the Heatmap's creation. (PR #591) Filling Curve between bounds now uses facecolor Modified Curve._plot_element so it uses facecolor instead of color when filling between bounds to remove the solid contour. (PR #591) Added valid links in handbook Updated all links to methods and functions in the handbook to ensure they are clickable. Also corrected some old method names in the handbook. (PR #591) Renamed Heatmap alpha_value Renamed the alpha_value parameter in the Heatmap class to alpha to maintain consistency with other Plottable classes. (PR #606) Improved copy_with support Added copy_with to all objects, and improved validation so only public writable properties can be overridden. (PR #637) Split axis label color control Axis label colors can be controlled independently from one another through the set_visual_params method of the SmartFigure. (PR #662) Typing for default/inheritance GraphingLib's inheritance sentinel was changed from a string to a marker: Inherit is now the marker type used in annotations (for example float | Inherit). INHERIT is the value used at runtime for defaults, comparisons, and resets. (PR #666) Bug Fixes Fixed bug in FitFromPolynomial.str Fixed a bug where the __str__ method would fail if the polynomial had a 0 coefficient. (PR #591) Fixed bug of repeated Histogram parameters in figure legend Fixed a bug where showing multiple times the same Histogram in a figure would stack repeatedly its parameters in the legend. (PR #591) Fixed SyntaxWarnings Added raw strings to remove SyntaxWarnings in strings containing backslashes. (PR #591) Fixed Plottable1D.eq Fixed a bug where the data could not be compared since the truth value was ambiguous. (PR #591) Fixed Polygon fill Fixed a bug where the Polygon fill would not render when plotted on a Heatmap. (PR #591) NaNs are now ignored in to_desmos Not a number values (NaNs) are now ignored when calling the to_desmos method of Plottable1D objects. (PR #607) Bugfix for Shapes in matplotlib styles Fixed a bug where the Shapes class was not replacing its Inherit values when plotting, which caused errors when using matplotlib styles that have default values for these parameters. (PR #652) Contributors A total of 5 people contributed to this release. @mamar828 @Mykola-P @Oddball777 @yalap13 @charlesantoineparent3 Merged Pull Requests A total of 21 pull requests were merged for this release. #566 : Color bar parameters, color map range and histogram orientation #569 : Rework ticks setting method #571 : New behaviour for Hlines and Vlines #573 : Plottable1D / Plottable2D updates #577 : set_grid method #590 : Introducing SmartFigure #591 : Miscellaneous corrections #595 : Alpha + Text.rotation #602 : Ellipse object #603 : Text highlighting #604 : MathematicalObject Protocol #605 : copy_with #606 : Heatmap alpha rename #607 : NaN handling #627 : Heatmap/Contour meshes #633 : Arrow styles #634 : Heatmap norm #637 : copy_with refactor #652 : Shapes bugfix #662 : Axis color split #666 : Inherit marker
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 1 May 2026