- Add ab_glyph font backend
- Color maps
- Fix broken unaligned read in unsafe code
- A lot of broken links and typos
- EvcxR feature compiling issue without bitmap backend enabled
- Color types manipulations
- The EvcxR integration now supports bitmap output. (Thanks to @lisanhu)
- Fix the plotters crate's edition requirement
- Pie element (by @hhamana)
- Improved documentaiton for predefined colors. (Thanks to @siefkenj)
- Introduce the full Material Design 2014 Color Palette. (Thanks to @siefkenj)
- Massive documentation improvements (Thanks to @facorread and many others)
- More float point axis key point algorithm fixes (@38)
- Default rasterizer fixes (@shinmili and @38)
- Surface series now supports more customizations
- Z-orde support for 3D plots
- Allow passing colors by value and reference (thanks to chrisduerr)
- Infinte loop / panic when the axis range is zero
- UB in minifb example (thanks to TheEdward162)
- Examples that uses old APIs (thanks to chrisduerr)
This is the next major release of Plotters, see release notes for more detials.
- The plotters backend API crate is introduced which allows third-party backend.
- Allow slice used as a coordinate if the item type implements
PartialOrd
. - Linspace coordinate type, which allows define a discrete coordinate on continous value types (such as f32, DateTime, etc) with a step specification
- Nested coordinate type, now we support define pair of category and nested values as nested coordinate.
- Introduce backend crates: plotters-bitmap, plotters-svg, plotters-cairo, plotters-canvas, plotters-console
- 3D Plotting features
- Adjust Canvas backend size with DPR (Thanks to Marius-Mueller)
- Enhanced key point algorithms: New key point hint trait are used for key point algorithms && many improvment on key point algorithms for different types
- Renamed
MeshStyle::line\_style\_1
andMeshStyle::line\_style\_2
tobold\_line\_style
andlight\_line\_style
- Reorganize the "plotters::coord" namespace
- Improved discrete coordinate trait
- Split backend code into isolated crates and can be maintained indepdendenly
- Category coordinate is now replaced by slice coordinate
- Removing the requirement for
Debug
trait for chart coordinate, allows ranged coordinate define its own formatting function.
- The
Path
name alias forPathElement
- Most code
plotters::drawing::backend\_impl::\*
(expectMockedBackend
for testing purpose) is removed due to crate split. - Piston backend due to the Piston project seems not actively developing
- Division by zero with logarithmic coord (issue #143)
- Update dependencies
- Compile error with older rustc which causing breaks
- Line width is supported for SVG
- Updated dependencies
- Default rasterizer causing bitmap backend draw out-of-range pixels
- Depdendicy fix
- BitMapBackend now is able to support different pixel format natively. Check our new minifb demo for details.
- Incremental Rendering by saving the previous chart context into a state and restore it on a different drawing area.
- BoxPlot support (See boxplot example for more details) (Thanks to @nuald)
- Category coordinate spec which allows use a list of given values as coordinate (Thanks to @nuald)
- New text positioning model which allows develvoper sepecify the anchor point. This is critical for layouting SVG correctly. See
plotters::style::text::text_anchor
for details. (Thanks to @nuald)
- Faster bitmap blending algorithm, which is 5x faster than the original one.
- Text alignment improvement, now we can suggest the invariant point by giving
TextAlignment
to the text style (Thanks to @nauld) - More controls on features, allows opt in and out series types
- Remove dependency to svg crate, since it doesn't provide more feature than a plain string.
- Add font style support, now we are able to set font variations: normal, oblique, italic or bold.
- Font description is greatly improved, general font family is supported:
serif
,serif-sans
,monospace
(Thanks to @Tatrix) - Tested the font loading on Linux, OSX and Windowns. Make font loading more reliable.
BitMapBackend
isn't depdends onimage
crate now. Only the image encoding part relies on theimage
crate- Refactored WASM demo use ES6 and
wasm-pack
(Thanks to @Tatrix) - Label style for X axis and Y axis can be set seperately now using
x\_label\_style
andy\_label\_style
. (Thanks to @zhiburt)
- Refactored and simplified TTF font cache, use RwLock instead of mutex which may benefit for parallel rendering. (Thanks to @Tatrix)
- The fast bitmap filling algorithm may overflow the framebuffer and cause segfault
- Avoid copying image buffer when manipulate the image. (Thanks to @ralfbiedert)
- Bitmap element which allows blit the image to another drawing area.
- Performance improvement: now the bitmap backend is 8 times faster
- Added benchmarks to monitor the performance change
- Performance fix: '?' operator is very slow
- Dynamic Element lifetime bound: Fix a bug that prevents area series draws on non-static lifetime backend
- Cairo backend, which supports using Plotters draw a GTK surface.
- Allow secondary axis to be configured with different label style.
- Relative Sizing, now font and size can use relative scale:
(10).percent\_height()
means we want the size is 10% of parent's height. - Allow the axis overlapping with the plotting area with
ChartBuilder::set\_\label\_area\_overlap
. - Allow label area is on the top of the drawing area by setting the label area size to negative (Thanks to @serzhiio).
- Allow configure the tick mark size, when the tick mark size is negative the axis becomes inward (Thanks to @serzhiio).
FontError
from rusttype isn'tSync
andSend
. We don't have trait bound to ensure this. (Thanks to @dalance)
- New convenient functions:
disable_mesh
anddisable_axes
- GIF Support, now bitmap backend is able to render gif animation
- Fixed several polygon filling bugs.
- Completely DateTime coordinate system support
- Allowing axis be placed on top or right by setting
right_y_label_area
andtop_x_label_area
- Dual-coord system chart support: Now we are able to attach a secondary coord system to the chart using
ChartContext::set_secondary_coord
. Anddraw_secondary_axes
to configure the style of secondary axes. Usedraw_secondary axis
to draw series under the secondary coordinate system. - Add support for
y_label_offset
. Previously only X axis label supports offset attribute. - New label area size API
set_label_area_size
can be used for all 4 label area - Added new error bar element
- New axis specification type
PartialAxis
which allows the partially rendered axis. For example, we can define the chart's axis range as0..1
, but only0.3..0.7
is rendered on axis. This can be done by(0.0..1.0).partial_axis(0.3..0.7)
- Drawing backend now support fill polygon and introduce polygon element
- Area Chart Support
- More examples are included
- Date coordinate now support using monthly or yearly axis. This is useful when plotting some data in monthly or yearly basis.
- Make margin on different side of a chart can be configured separately.
- Better test coverage
- Key points algorithm for numeric coordinate might not respect the constraint
- Add
i128
andu128
as coordinate type (Credit to @Geemili)
- Date coordinate is working for a long time span now
- Color system now is based on
palette
crate (Credit to @Veykril)
- More documentation: a Jupyter interactive notebook of Plotters tutorial
- Add more quadrants to the
SeriesLabelPosition
(Credit to @wolfjagger).
- Histogram improvements, horizontal bar is supported, new creation API which compiler can infer the type
- Supporting split the drawing area with a list of breakpoints using
DrawingArea::split_by_breakpoints
- Enable SVG support for WASM
- Make the
BitMapBackend
takes an in memory mutable buffer
- Rectangle drawing bug when the axis is reversed
- Move the sample images and other documentation data out of this repository.
- Make drawing errors shareable across threads. Otherwise, it causes compile error in some cases. (Thanks to @rkarp)
- Add relative sizing by added function
DrawingArea::relative_to_height
andDrawingArea::relative_to_width
. - Added piston backend, now we can render plot on a window and dynamically render the plot
- Creating drawing area with
&Rc<RefCell<DrawingBackend>>
. Previously, the drawing area creation requires take over the drawing backend ownership. But sometimes the drawing backend may have additional options. With new API, this can be done by putting the backend drawing area into smart pointers, thus, the drawing backend is accessible after creates the root drawing area.
- Font is now support rotation transformation. Use
FontDesc::transform
to apply an rotation to transformation. For example,font.transform(FontTransform::Rotate90)
. - ChartContext now support drawing axis description. Use
MeshStyle::x_desc
andMeshStyle::y_desc
to specify the axis description text. - Add series label support.
ChartContext::draw_series
now returns a structSeriesAnno
that collects the additional information for series labeling.ChartContext::draw_series_labels
are used to actually draw the series label. (Seeexamples/chart.rs
for detailed examples) - Mocking drawing backend.
- evcxr Support
- Unify
OwnedText
andText
intoText
. Previously,OwnedText
andText
are two separate types, one holds aString
another holds a&str
. NowOwnedText
is removed. useText::new("text".to_string(),...)
for owned text element andText::new("text", ...)
for borrowed text. - Refactor the color representation code, since previously it's heavily relies on the trait object and hard to use
- More test cases
- New abstraction of backend style with
BackendStyle
trait which should be able to extend easier in the future - Backend support features, now feature options can be used to control which backend should be supported
- Add new trait
IntoDrawingArea
, now we can usebackend.into_drawing_area()
to convert the backend into a raw drawing area - Now elements support dynamic dispatch, use
element.into_dyn()
to convert the element into a runtime dispatching element
- Improved the overall code quality
- Documentation polish
- Stabilized APIs
- New conversion traits implementations
- Now transparent color is ignored by SVG, bitmap and HTML Canvas backend
- Changed the open-close pattern to a
present
function which indicates the end of drawing one frame - Fix the but that
ChartBuilder::title
andChartBuilder::margin
cannot be called at the same time &&build_ranged
now returning a result.