pub struct DendrogramPlot<F: Float> {
pub branches: Vec<Branch<F>>,
pub leaves: Vec<Leaf>,
pub colors: Vec<String>,
pub legend: Vec<LegendEntry>,
pub bounds: (F, F, F, F),
pub config: DendrogramConfig<F>,
}Expand description
Enhanced dendrogram visualization data structure
Fields§
§branches: Vec<Branch<F>>Branch coordinates for drawing
leaves: Vec<Leaf>Leaf positions and labels
colors: Vec<String>Color assignments for each branch
legend: Vec<LegendEntry>Legend information
bounds: (F, F, F, F)Plot bounds (min_x, max_x, min_y, max_y)
config: DendrogramConfig<F>Configuration used to create this plot
Implementations§
Source§impl<F: Float> DendrogramPlot<F>
impl<F: Float> DendrogramPlot<F>
Sourcepub fn to_html(&self) -> Result<String>
pub fn to_html(&self) -> Result<String>
Export the dendrogram plot to HTML format with interactive features
This method creates an HTML document with an embedded D3.js visualization that allows for interactive exploration of the dendrogram.
§Returns
Result<String>- HTML document as a string
§Example
let html = plot.to_html().unwrap();
std::fs::write("dendrogram.html", html).unwrap();Sourcepub fn to_svg(&self) -> Result<String>
pub fn to_svg(&self) -> Result<String>
Export the dendrogram plot to SVG format
This method creates a scalable vector graphics representation of the dendrogram that can be embedded in web pages or used in publications.
§Returns
Result<String>- SVG document as a string
Sourcepub fn to_json(&self) -> Result<String>
pub fn to_json(&self) -> Result<String>
Export the dendrogram plot to JSON format
This method serializes the plot data to JSON for programmatic use or integration with other visualization libraries.
§Returns
Result<String>- JSON representation of the plot
Sourcepub fn export_with_config(&self, config: &ExportConfig) -> Result<String>
pub fn export_with_config(&self, config: &ExportConfig) -> Result<String>
Trait Implementations§
Source§impl<F: Clone + Float> Clone for DendrogramPlot<F>
impl<F: Clone + Float> Clone for DendrogramPlot<F>
Source§fn clone(&self) -> DendrogramPlot<F>
fn clone(&self) -> DendrogramPlot<F>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<F> Freeze for DendrogramPlot<F>where
F: Freeze,
impl<F> RefUnwindSafe for DendrogramPlot<F>where
F: RefUnwindSafe,
impl<F> Send for DendrogramPlot<F>where
F: Send,
impl<F> Sync for DendrogramPlot<F>where
F: Sync,
impl<F> Unpin for DendrogramPlot<F>where
F: Unpin,
impl<F> UnwindSafe for DendrogramPlot<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.