You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: gnuplot/src/axes2d.rs
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -607,6 +607,36 @@ impl Axes2D
607
607
self
608
608
}
609
609
610
+
// Plot a polygon given coordinates of its vertices.
611
+
//
612
+
// # Arguments
613
+
// * `x` - x coordinates of the vertices
614
+
// * `y` - y coordinates of the vertices
615
+
// * `options` - Array of PlotOption<&str> controlling the appearance of the plot element. The relevant options are:
616
+
// * `Caption` - Specifies the caption for this dataset. Use an empty string to hide it (default).
617
+
// * `FillAlpha` - Sets the transparency of the filled region
618
+
// * `Color` - Sets the color of the filled region (and the border, unless `BorderColor` is set)
619
+
// * `BorderColor` - Sets the color of the border
620
+
// * `FillPattern` - Sets the fill pattern
621
+
pubfnpolygon<
622
+
'l,
623
+
Tx:DataType,
624
+
X:IntoIterator<Item = Tx>,
625
+
Ty:DataType,
626
+
Y:IntoIterator<Item = Ty>,
627
+
>(
628
+
&'lmutself,x:X,y:Y,options:&[PlotOption<&str>],
629
+
) -> &'lmutSelf
630
+
{
631
+
self.common.elems.push(PlotElement::new_plot2(
632
+
Polygons,
633
+
x,
634
+
y,
635
+
options.to_one_way_owned(),
636
+
));
637
+
self
638
+
}
639
+
610
640
/// Plot a 2D scatter-plot using boxes of automatic width. Box widths are set so that there are no gaps between successive boxes (i.e. each box may have a different width).
611
641
/// Boxes start at the x-axis and go towards the y value of the datapoint.
0 commit comments