Skip to content

Latest commit

 

History

History
115 lines (76 loc) · 3.51 KB

File metadata and controls

115 lines (76 loc) · 3.51 KB

Shapes

The following imports have been used to produce the plots below:

use ndarray::Array;
use plotly::common::{
    Fill, Font, Mode,
};
use plotly::layout::{
    Axis, GridPattern, Layout, LayoutGrid, Margin, Shape, ShapeLayer, ShapeLine,
    ShapeType,
};
use plotly::{Bar, color::NamedColor, Plot, Scatter};
use rand::rng;
use rand_distr::{Distribution, Normal};

The to_inline_html method is used to produce the html plot displayed in this page.

Filled Area Chart

{{#include ../../../../examples/shapes/src/main.rs:filled_area_chart}}

{{#include ../../../../examples/shapes/output/inline_filled_area_chart.html}}

Vertical and Horizontal Lines Positioned Relative to Axes

{{#include ../../../../examples/shapes/src/main.rs:vertical_and_horizontal_lines_positioned_relative_to_axes}}

{{#include ../../../../examples/shapes/output/inline_vertical_and_horizontal_lines_positioned_relative_to_axes.html}}

Lines Positioned Relative to the Plot and to the Axes

{{#include ../../../../examples/shapes/src/main.rs:lines_positioned_relative_to_the_plot_and_to_the_axes}}

{{#include ../../../../examples/shapes/output/inline_lines_positioned_relative_to_the_plot_and_to_the_axes.html}}

Creating Tangent Lines with Shapes

{{#include ../../../../examples/shapes/src/main.rs:creating_tangent_lines_with_shapes}}

{{#include ../../../../examples/shapes/output/inline_creating_tangent_lines_with_shapes.html}}

Rectangles Positioned Relative to the Axes

{{#include ../../../../examples/shapes/src/main.rs:rectangles_positioned_relative_to_the_axes}}

{{#include ../../../../examples/shapes/output/inline_rectangles_positioned_relative_to_the_axes.html}}

Rectangle Positioned Relative to the Plot and to the Axes

{{#include ../../../../examples/shapes/src/main.rs:rectangle_positioned_relative_to_the_plot_and_to_the_axes}}

{{#include ../../../../examples/shapes/output/inline_rectangle_positioned_relative_to_the_plot_and_to_the_axes.html}}

Highlighting Time Series Regions with Rectangle Shapes

{{#include ../../../../examples/shapes/src/main.rs:highlighting_time_series_regions_with_rectangle_shapes}}

{{#include ../../../../examples/shapes/output/inline_highlighting_time_series_regions_with_rectangle_shapes.html}}

Circles Positioned Relative to the Axes

{{#include ../../../../examples/shapes/src/main.rs:circles_positioned_relative_to_the_axes}}

{{#include ../../../../examples/shapes/output/inline_circles_positioned_relative_to_the_axes.html}}

Highlighting Clusters of Scatter Points with Circle Shapes

{{#include ../../../../examples/shapes/src/main.rs:highlighting_clusters_of_scatter_points_with_circle_shapes}}

{{#include ../../../../examples/shapes/output/inline_highlighting_clusters_of_scatter_points_with_circle_shapes.html}}

Venn Diagram with Circle Shapes

{{#include ../../../../examples/shapes/src/main.rs:venn_diagram_with_circle_shapes}}

{{#include ../../../../examples/shapes/output/inline_venn_diagram_with_circle_shapes.html}}

Adding Shapes to Subplots

{{#include ../../../../examples/shapes/src/main.rs:adding_shapes_to_subplots}}

{{#include ../../../../examples/shapes/output/inline_adding_shapes_to_subplots.html}}

SVG Paths

{{#include ../../../../examples/shapes/src/main.rs:svg_paths}}

{{#include ../../../../examples/shapes/output/inline_svg_paths.html}}