Skip to main content

Crate plotters_ternary

Crate plotters_ternary 

Source
Expand description

Publication-quality ternary diagrams built on Plotters.

The crate combines a backend-independent ternary geometry and clipping kernel with a Cartesian-backed Plotters chart. It supports full and rectangularly cropped ternary views, configurable axes, native Plotters legends, scientific markers, polygons, composition-anchored text, regular-grid line contours, per-level contour styling, native legends, colour bars, and portable labels.

Start with prelude for common stable types, then see the README and the examples for complete PNG/SVG rendering programs. Cubic-alpha contour construction requires the cubic-alpha feature.

§Guarantees and limits

Ternary coordinates always retain semantic A/B/C order. Viewport clipping is mathematical and the viewport frame is invisible. Cubic contour fields share exact one-dimensional edge intervals and are C0 across regular-grid edges; C1 continuity, cubic-alpha filled contours, irregular triangulation, and N-component grids are not provided in 0.1.0.

Re-exports§

pub use chart::AxisLabelFormat;
pub use chart::AxisNamePosition;
pub use chart::AxisTextStyle;
pub use chart::CartesianChartContext;
pub use chart::CartesianPlottingArea;
pub use chart::ContourColorBar;
pub use chart::ContourColorBarOrientation;
pub use chart::ContourColorBarPosition;
pub use chart::ContourDisplayError;
pub use chart::ContourLabelAnchor;
pub use chart::ContourLabelConfig;
pub use chart::ContourLabelMode;
pub use chart::ContourLabelPlacement;
pub use chart::ContourLabelStyle;
pub use chart::CornerLabelVisibility;
pub use chart::CroppedAxisPolicy;
pub use chart::EndpointLabelPolicy;
pub use chart::TernaryAxis;
pub use chart::TernaryAxisConfig;
pub use chart::TernaryChart;
pub use chart::TernaryChartBuilder;
pub use chart::TernaryChartError;
pub use chart::TernaryMesh;
pub use chart::TernaryMeshConfig;
pub use chart::TickDirection;
pub use chart::TickRangeMode;
pub use chart::TickSpec;
pub use chart::TickStyle;
pub use coord::CartesianSegment;
pub use coord::ClippedSegment;
pub use coord::Component;
pub use coord::EQUILATERAL_TRIANGLE_HEIGHT;
pub use coord::Error;
pub use coord::Normalization;
pub use coord::PixelBounds;
pub use coord::PixelPoint;
pub use coord::PixelRect;
pub use coord::TernaryCartesian;
pub use coord::TernaryGeometry;
pub use coord::TernaryPoint;
pub use coord::TernaryViewport;
pub use coord::Tolerance;
pub use coord::TriangleEdge;
pub use coord::TriangleOrientation;
pub use coord::TrianglePointLocation;
pub use coord::VertexOrder;
pub use coord::ViewportAlignment;
pub use coord::ViewportFit;
pub use coord::ViewportPointLocation;
pub use coord::ViewportTransform;
pub use coord::VisibleTriangleEdge;
pub use coord::clip_segment;
pub use coord::clip_segment_with_parameters;
pub use series::AnnotationClipMode;
pub use series::AnnotationError;
pub use series::AnnotationTextStyle;
pub use series::ContourBandBorderMode;
pub use series::ContourBandStylePolicy;
pub use series::ContourLegendPolicy;
pub use series::ContourStylePolicy;
pub use series::HorizontalAnchor;
pub use series::InvalidPointPolicy;
pub use series::LocalPoint;
pub use series::LocalSegment;
pub use series::MarkerClipMode;
pub use series::MarkerDrawing;
pub use series::MarkerElement;
pub use series::MarkerError;
pub use series::MarkerFill;
pub use series::MarkerFillPolygon;
pub use series::MarkerGeometry;
pub use series::MarkerPartition;
pub use series::MarkerShape;
pub use series::MarkerSlice;
pub use series::MarkerStyle;
pub use series::PointMarkerStyleProvider;
pub use series::PolygonError;
pub use series::PreparedPolygon;
pub use series::ScalarMapResolution;
pub use series::SeriesError;
pub use series::SweepDirection;
pub use series::TernaryContourBandSeries;
pub use series::TernaryContourSeries;
pub use series::TernaryInterpolation;
pub use series::TernaryLineSeries;
pub use series::TernaryPointSeries;
pub use series::TernaryPolygon;
pub use series::TernaryScalarMapSeries;
pub use series::TernarySeries;
pub use series::TernarySmoothSeries;
pub use series::TernaryText;
pub use series::TextAnchor;
pub use series::TextRotation;
pub use series::VerticalAnchor;
pub use series::prepare_points;
pub use series::prepare_polygon;
pub use series::prepare_polyline;

Modules§

chart
contour
Compatibility re-exports for the backend-independent numerical contour core.
coord
Ternary composition validation and geometric projection.
interpolation
Compatibility re-exports for the extracted numerical interpolation core.
prelude
Common stable imports for ordinary ternary chart and contour workflows.
series

Structs§

AdaptiveContourOptions
Bounds for adaptive cubic topology extraction in barycentric coordinates.
ContourBand
One scalar interval of a ContourBandSet.
ContourBandOptions
Backend-independent options for piecewise-linear filled contour bands.
ContourBandSet
Complete deterministic piecewise-linear isoband geometry.
ContourFragment
One simple, open polygon fragment of a contour band.
ContourLevel
Contours produced for one requested finite scalar level.
ContourOptions
Shared options for one super::ContourSet computation.
ContourPath
ContourRegion
One connected filled-band region.
ContourRegularization
Equal-arclength redistribution and implicit-level projection settings.
ContourSet
Backend-independent line contours and optional cubic diagnostics.
CubicAlphaOptions
Cubic-alpha construction policy.
CubicContourDiagnostics
Diagnostics from cubic field preparation, refinement, and projection.
GridVertexId
Stable identifier in the field’s canonical value ordering.
LatticeCoordinate
Integer ternary lattice coordinate satisfying i+j+k=n.
RegularTernaryGrid
A reusable view of the canonical regular ternary composition lattice.
RegularTernaryScalarField
A scalar field sampled on the regular ternary lattice i+j+k=n.
TernaryCoordinate
A semantic (a, b, c) composition coordinate owned by the numerical core.

Enums§

BinaryExtrapolation
Geometric extension of a directed binary interaction into a ternary interior.
ContourError
ContourInterpolation
Scalar interpolation model used for contour construction.
CubicAlphaMethod
Shape-preserving one-dimensional method used to derive cubic-alpha intervals.
CubicBoundaryPolicy
Behaviour when a regular-lattice line has only two samples.
FieldError
Error returned while validating a regular ternary scalar field or constructing its cubic-alpha edge model.
GridEvaluationError
Error returned while evaluating a user scalar function over a regular grid.