Expand description

constants for dot options

Example

use net_ensembles::{*, rand::SeedableRng, dot_constants::*};
use rand_pcg::Pcg64;

let rng = Pcg64::seed_from_u64(0);
let ensemble = ErEnsembleM::<EmptyNode, _>::new(10, 20, rng);

// create dot
let dot = ensemble.graph().to_dot_with_labels_from_contained(
    dot_options!(TRANSPARENT_BG, NO_OVERLAP, SIZE_A4, RATIO_FILL),
    |_, index|
    {
        format!("Hey, I am at index: {}", index)
    }
);

println!("{}", dot);

Constants

  • Example options. You are free to use your own. Search for graphviz.
  • do not use margin
  • no overlapping nodes
  • dot option: ratio=“fill”
  • Din A4 size
  • activate splines
  • use transparent background