pub struct ScatterPlot { /* private fields */ }Expand description
A structure representing a scatter plot.
The ScatterPlot struct facilitates the creation and customization of scatter plots with various options
for data selection, grouping, layout configuration, and aesthetic adjustments. It supports grouping of data,
customization of marker shapes, colors, sizes, opacity settings, and comprehensive layout customization
including titles, axes, and legends.
§Arguments
data- A reference to theDataFramecontaining the data to be plotted.x- A string slice specifying the column name to be used for the x-axis (independent variable).y- A string slice specifying the column name to be used for the y-axis (dependent variable).group- An optional string slice specifying the column name to be used for grouping data points.sort_groups_by- Optional comparatorfn(&str, &str) -> std::cmp::Orderingto control group ordering. Groups are sorted lexically by default.facet- An optional string slice specifying the column name to be used for faceting (creating multiple subplots).facet_config- An optional reference to aFacetConfigstruct for customizing facet behavior (grid dimensions, scales, gaps, etc.).opacity- An optionalf64value specifying the opacity of the plot markers (range: 0.0 to 1.0).size- An optionalusizespecifying the size of the markers.color- An optionalRgbvalue specifying the color of the markers. This is used whengroupis not specified.colors- An optional vector ofRgbvalues specifying the colors for the markers. This is used whengroupis specified to differentiate between groups.shape- An optionalShapespecifying the shape of the markers. This is used whengroupis not specified.shapes- An optional vector ofShapevalues specifying multiple shapes for the markers when plotting multiple groups.plot_title- An optionalTextstruct specifying the title of the plot.x_title- An optionalTextstruct specifying the title of the x-axis.y_title- An optionalTextstruct specifying the title of the y-axis.legend_title- An optionalTextstruct specifying the title of the legend.x_axis- An optional reference to anAxisstruct for customizing the x-axis.y_axis- An optional reference to anAxisstruct for customizing the y-axis.legend- An optional reference to aLegendstruct for customizing the legend of the plot (e.g., positioning, font, etc.).
§Example
use plotlars::{Axis, Legend, Plot, Rgb, ScatterPlot, Shape, Text, TickDirection};
use polars::prelude::*;
let dataset = LazyCsvReader::new(PlPath::new("data/penguins.csv"))
.finish()
.unwrap()
.select([
col("species"),
col("sex").alias("gender"),
col("flipper_length_mm").cast(DataType::Int16),
col("body_mass_g").cast(DataType::Int16),
])
.collect()
.unwrap();
let axis = Axis::new()
.show_line(true)
.tick_direction(TickDirection::OutSide)
.value_thousands(true);
ScatterPlot::builder()
.data(&dataset)
.x("body_mass_g")
.y("flipper_length_mm")
.group("species")
.sort_groups_by(|a, b| {
if a.len() == b.len() {
a.cmp(b)
} else {
a.len().cmp(&b.len())
}
})
.opacity(0.5)
.size(12)
.colors(vec![
Rgb(178, 34, 34),
Rgb(65, 105, 225),
Rgb(255, 140, 0),
])
.shapes(vec![
Shape::Circle,
Shape::Square,
Shape::Diamond,
])
.plot_title(
Text::from("Scatter Plot")
.font("Arial")
.size(20)
.x(0.065)
)
.x_title("body mass (g)")
.y_title("flipper length (mm)")
.legend_title("species")
.x_axis(
&axis.clone()
.value_range(vec![2500.0, 6500.0])
)
.y_axis(
&axis.clone()
.value_range(vec![170.0, 240.0])
)
.legend(
&Legend::new()
.x(0.85)
.y(0.15)
)
.build()
.plot();
Implementations§
Source§impl ScatterPlot
impl ScatterPlot
Sourcepub fn builder<'f1, 'f2, 'f3, 'f4, 'f5, 'f6, 'f7, 'f8, 'f9>() -> ScatterPlotBuilder<'f1, 'f2, 'f3, 'f4, 'f5, 'f6, 'f7, 'f8, 'f9>
pub fn builder<'f1, 'f2, 'f3, 'f4, 'f5, 'f6, 'f7, 'f8, 'f9>() -> ScatterPlotBuilder<'f1, 'f2, 'f3, 'f4, 'f5, 'f6, 'f7, 'f8, 'f9>
Examples found in repository?
examples/faceting.rs (line 496)
479fn scatterplot_example() {
480 let dataset = LazyCsvReader::new(PlPath::new("data/penguins.csv"))
481 .finish()
482 .unwrap()
483 .select([
484 col("species"),
485 col("sex").alias("gender"),
486 col("bill_length_mm"),
487 col("bill_depth_mm"),
488 ])
489 .collect()
490 .unwrap();
491
492 let facet_config = FacetConfig::new()
493 .highlight_facet(true)
494 .unhighlighted_color(Rgb(220, 220, 220));
495
496 ScatterPlot::builder()
497 .data(&dataset)
498 .x("bill_length_mm")
499 .y("bill_depth_mm")
500 .group("gender")
501 .facet("species")
502 .facet_config(&facet_config)
503 .plot_title(Text::from("Penguin Bill Morphology with Gender Comparison"))
504 .x_title("bill length (mm)")
505 .y_title("bill depth (mm)")
506 .opacity(0.6)
507 .size(8)
508 .colors(vec![Rgb(128, 128, 128), Rgb(255, 0, 255), Rgb(0, 255, 255)])
509 .shapes(vec![Shape::Diamond, Shape::Circle, Shape::Square])
510 .legend_title("gender")
511 .build()
512 .plot();
513}More examples
examples/scatterplot.rs (line 22)
4fn main() {
5 let dataset = LazyCsvReader::new(PlPath::new("data/penguins.csv"))
6 .finish()
7 .unwrap()
8 .select([
9 col("species"),
10 col("sex").alias("gender"),
11 col("flipper_length_mm").cast(DataType::Int16),
12 col("body_mass_g").cast(DataType::Int16),
13 ])
14 .collect()
15 .unwrap();
16
17 let axis = Axis::new()
18 .show_line(true)
19 .tick_direction(TickDirection::OutSide)
20 .value_thousands(true);
21
22 ScatterPlot::builder()
23 .data(&dataset)
24 .x("body_mass_g")
25 .y("flipper_length_mm")
26 .group("species")
27 .sort_groups_by(|a, b| {
28 if a.len() == b.len() {
29 a.cmp(b)
30 } else {
31 a.len().cmp(&b.len())
32 }
33 })
34 .opacity(0.5)
35 .size(12)
36 .colors(vec![Rgb(178, 34, 34), Rgb(65, 105, 225), Rgb(255, 140, 0)])
37 .shapes(vec![Shape::Circle, Shape::Square, Shape::Diamond])
38 .plot_title(Text::from("Scatter Plot").font("Arial").size(20).x(0.065))
39 .x_title("body mass (g)")
40 .y_title("flipper length (mm)")
41 .legend_title("species")
42 .x_axis(&axis.clone().value_range(vec![2500.0, 6500.0]))
43 .y_axis(&axis.clone().value_range(vec![170.0, 240.0]))
44 .legend(&Legend::new().x(0.85).y(0.15))
45 .build()
46 .plot();
47}examples/subplot_grid.rs (line 59)
15fn regular_grid_example() {
16 let dataset1 = LazyCsvReader::new(PlPath::new("data/animal_statistics.csv"))
17 .finish()
18 .unwrap()
19 .collect()
20 .unwrap();
21
22 let plot1 = BarPlot::builder()
23 .data(&dataset1)
24 .labels("animal")
25 .values("value")
26 .orientation(Orientation::Vertical)
27 .group("gender")
28 .sort_groups_by(|a, b| a.len().cmp(&b.len()))
29 .error("error")
30 .colors(vec![Rgb(255, 127, 80), Rgb(64, 224, 208)])
31 .plot_title(Text::from("Bar Plot").x(-0.05).y(1.35).size(14))
32 .y_title(Text::from("value").x(-0.055).y(0.76))
33 .x_title(Text::from("animal").x(0.97).y(-0.2))
34 .legend(
35 &Legend::new()
36 .orientation(Orientation::Horizontal)
37 .x(0.4)
38 .y(1.2),
39 )
40 .build();
41
42 let dataset2 = LazyCsvReader::new(PlPath::new("data/penguins.csv"))
43 .finish()
44 .unwrap()
45 .select([
46 col("species"),
47 col("sex").alias("gender"),
48 col("flipper_length_mm").cast(DataType::Int16),
49 col("body_mass_g").cast(DataType::Int16),
50 ])
51 .collect()
52 .unwrap();
53
54 let axis = Axis::new()
55 .show_line(true)
56 .tick_direction(TickDirection::OutSide)
57 .value_thousands(true);
58
59 let plot2 = ScatterPlot::builder()
60 .data(&dataset2)
61 .x("body_mass_g")
62 .y("flipper_length_mm")
63 .group("species")
64 .sort_groups_by(|a, b| {
65 if a.len() == b.len() {
66 a.cmp(b)
67 } else {
68 a.len().cmp(&b.len())
69 }
70 })
71 .opacity(0.5)
72 .size(12)
73 .colors(vec![Rgb(178, 34, 34), Rgb(65, 105, 225), Rgb(255, 140, 0)])
74 .shapes(vec![Shape::Circle, Shape::Square, Shape::Diamond])
75 .plot_title(Text::from("Scatter Plot").x(-0.075).y(1.35).size(14))
76 .x_title(Text::from("body mass (g)").y(-0.4))
77 .y_title(Text::from("flipper length (mm)").x(-0.078).y(0.5))
78 .legend_title("species")
79 .x_axis(&axis.clone().value_range(vec![2500.0, 6500.0]))
80 .y_axis(&axis.clone().value_range(vec![170.0, 240.0]))
81 .legend(&Legend::new().x(0.98).y(0.95))
82 .build();
83
84 let dataset3 = LazyCsvReader::new(PlPath::new("data/debilt_2023_temps.csv"))
85 .with_has_header(true)
86 .with_try_parse_dates(true)
87 .finish()
88 .unwrap()
89 .with_columns(vec![
90 (col("tavg") / lit(10)).alias("avg"),
91 (col("tmin") / lit(10)).alias("min"),
92 (col("tmax") / lit(10)).alias("max"),
93 ])
94 .collect()
95 .unwrap();
96
97 let plot3 = TimeSeriesPlot::builder()
98 .data(&dataset3)
99 .x("date")
100 .y("avg")
101 .additional_series(vec!["min", "max"])
102 .colors(vec![Rgb(128, 128, 128), Rgb(0, 122, 255), Rgb(255, 128, 0)])
103 .lines(vec![Line::Solid, Line::Dot, Line::Dot])
104 .plot_title(Text::from("Time Series Plot").x(-0.05).y(1.35).size(14))
105 .y_title(Text::from("temperature (ºC)").x(-0.055).y(0.6))
106 .legend(&Legend::new().x(0.9).y(1.25))
107 .build();
108
109 let plot4 = BoxPlot::builder()
110 .data(&dataset2)
111 .labels("species")
112 .values("body_mass_g")
113 .orientation(Orientation::Vertical)
114 .group("gender")
115 .box_points(true)
116 .point_offset(-1.5)
117 .jitter(0.01)
118 .opacity(0.1)
119 .colors(vec![Rgb(0, 191, 255), Rgb(57, 255, 20), Rgb(255, 105, 180)])
120 .plot_title(Text::from("Box Plot").x(-0.075).y(1.35).size(14))
121 .x_title(Text::from("species").y(-0.3))
122 .y_title(Text::from("body mass (g)").x(-0.08).y(0.5))
123 .legend_title(Text::from("gender").size(12))
124 .y_axis(&Axis::new().value_thousands(true))
125 .legend(&Legend::new().x(1.0))
126 .build();
127
128 SubplotGrid::regular()
129 .plots(vec![&plot1, &plot2, &plot3, &plot4])
130 .rows(2)
131 .cols(2)
132 .v_gap(0.4)
133 .title(
134 Text::from("Regular Subplot Grid")
135 .size(16)
136 .font("Arial bold")
137 .y(0.95),
138 )
139 .build()
140 .plot();
141}
142
143fn irregular_grid_example() {
144 let dataset1 = LazyCsvReader::new(PlPath::new("data/penguins.csv"))
145 .finish()
146 .unwrap()
147 .select([
148 col("species"),
149 col("sex").alias("gender"),
150 col("flipper_length_mm").cast(DataType::Int16),
151 col("body_mass_g").cast(DataType::Int16),
152 ])
153 .collect()
154 .unwrap();
155
156 let axis = Axis::new()
157 .show_line(true)
158 .show_grid(true)
159 .value_thousands(true)
160 .tick_direction(TickDirection::OutSide);
161
162 let plot1 = Histogram::builder()
163 .data(&dataset1)
164 .x("body_mass_g")
165 .group("species")
166 .opacity(0.5)
167 .colors(vec![Rgb(255, 165, 0), Rgb(147, 112, 219), Rgb(46, 139, 87)])
168 .plot_title(Text::from("Histogram").x(0.0).y(1.35).size(14))
169 .x_title(Text::from("body mass (g)").x(0.94).y(-0.35))
170 .y_title(Text::from("count").x(-0.062).y(0.83))
171 .x_axis(&axis)
172 .y_axis(&axis)
173 .legend_title(Text::from("species"))
174 .legend(&Legend::new().x(0.87).y(1.2))
175 .build();
176
177 let dataset2 = LazyCsvReader::new(PlPath::new("data/stock_prices.csv"))
178 .finish()
179 .unwrap()
180 .collect()
181 .unwrap();
182
183 let increasing = Direction::new()
184 .line_color(Rgb(0, 200, 100))
185 .line_width(0.5);
186
187 let decreasing = Direction::new()
188 .line_color(Rgb(200, 50, 50))
189 .line_width(0.5);
190
191 let plot2 = CandlestickPlot::builder()
192 .data(&dataset2)
193 .dates("date")
194 .open("open")
195 .high("high")
196 .low("low")
197 .close("close")
198 .increasing(&increasing)
199 .decreasing(&decreasing)
200 .whisker_width(0.1)
201 .plot_title(Text::from("Candlestick").x(0.0).y(1.35).size(14))
202 .y_title(Text::from("price ($)").x(-0.06).y(0.76))
203 .y_axis(&Axis::new().show_axis(true).show_grid(true))
204 .build();
205
206 let dataset3 = LazyCsvReader::new(PlPath::new("data/heatmap.csv"))
207 .finish()
208 .unwrap()
209 .collect()
210 .unwrap();
211
212 let plot3 = HeatMap::builder()
213 .data(&dataset3)
214 .x("x")
215 .y("y")
216 .z("z")
217 .color_bar(
218 &ColorBar::new()
219 .value_exponent(ValueExponent::None)
220 .separate_thousands(true)
221 .tick_length(5)
222 .tick_step(5000.0),
223 )
224 .plot_title(Text::from("Heat Map").x(0.0).y(1.35).size(14))
225 .color_scale(Palette::Viridis)
226 .build();
227
228 SubplotGrid::irregular()
229 .plots(vec![
230 (&plot1, 0, 0, 1, 1),
231 (&plot2, 0, 1, 1, 1),
232 (&plot3, 1, 0, 1, 2),
233 ])
234 .rows(2)
235 .cols(2)
236 .v_gap(0.35)
237 .h_gap(0.05)
238 .title(
239 Text::from("Irregular Subplot Grid")
240 .size(16)
241 .font("Arial bold")
242 .y(0.95),
243 )
244 .build()
245 .plot();
246}
247
248fn mixed_grid_example() {
249 // 2D cartesian scatter (baseline)
250 let penguins = LazyCsvReader::new(PlPath::new("data/penguins.csv"))
251 .finish()
252 .unwrap()
253 .collect()
254 .unwrap()
255 .lazy()
256 .select([
257 col("species"),
258 col("bill_length_mm"),
259 col("flipper_length_mm"),
260 col("body_mass_g"),
261 ])
262 .collect()
263 .unwrap();
264
265 let scatter_2d = ScatterPlot::builder()
266 .data(&penguins)
267 .x("bill_length_mm")
268 .y("flipper_length_mm")
269 .group("species")
270 .opacity(0.65)
271 .size(10)
272 .plot_title(Text::from("Penguins 2D").y(1.3))
273 .build();
274
275 // 3D scene subplot
276 let scatter_3d = Scatter3dPlot::builder()
277 .data(&penguins)
278 .x("bill_length_mm")
279 .y("flipper_length_mm")
280 .z("body_mass_g")
281 .group("species")
282 .opacity(0.35)
283 .size(6)
284 .plot_title(Text::from("Penguins 3D").y(1.45))
285 .build();
286
287 // Polar subplot
288 let polar_df = LazyCsvReader::new(PlPath::new("data/product_comparison_polar.csv"))
289 .finish()
290 .unwrap()
291 .collect()
292 .unwrap();
293
294 let polar = ScatterPolar::builder()
295 .data(&polar_df)
296 .theta("angle")
297 .r("score")
298 .group("product")
299 .mode(Mode::LinesMarkers)
300 .size(10)
301 .plot_title(Text::from("Product Comparison (Polar)").y(1.5).x(0.72))
302 .legend(&Legend::new().x(0.8))
303 .build();
304
305 // Domain-based subplot (Sankey)
306 let sankey_df = LazyCsvReader::new(PlPath::new("data/energy_transition.csv"))
307 .finish()
308 .unwrap()
309 .collect()
310 .unwrap();
311
312 let sankey = SankeyDiagram::builder()
313 .data(&sankey_df)
314 .sources("source")
315 .targets("target")
316 .values("value")
317 .orientation(Orientation::Horizontal)
318 .arrangement(Arrangement::Freeform)
319 .plot_title(Text::from("Energy Flow").y(1.2))
320 .build();
321
322 // Mapbox subplot
323 let map_df = LazyCsvReader::new(PlPath::new("data/cities.csv"))
324 .finish()
325 .unwrap()
326 .collect()
327 .unwrap();
328
329 let scatter_map = ScatterMap::builder()
330 .data(&map_df)
331 .latitude("latitude")
332 .longitude("longitude")
333 .group("city")
334 .zoom(4)
335 .center([50.0, 5.0])
336 .opacity(0.8)
337 .plot_title(Text::from("Cities (Mapbox)").y(1.2))
338 .build();
339
340 // Geo subplot
341 let geo_df = LazyCsvReader::new(PlPath::new("data/world_cities.csv"))
342 .finish()
343 .unwrap()
344 .collect()
345 .unwrap();
346
347 let scatter_geo = ScatterGeo::builder()
348 .data(&geo_df)
349 .lat("lat")
350 .lon("lon")
351 .group("continent")
352 .mode(Mode::Markers)
353 .size(10)
354 .color(Rgb(255, 140, 0))
355 .shape(Shape::Circle)
356 .plot_title(Text::from("Global Cities (Geo)").x(0.65).y(1.2))
357 .legend(&Legend::new().x(0.8))
358 .build();
359
360 SubplotGrid::regular()
361 .plots(vec![
362 &scatter_2d,
363 &scatter_3d,
364 &polar,
365 &sankey,
366 &scatter_map,
367 &scatter_geo,
368 ])
369 .rows(2)
370 .cols(3)
371 .h_gap(0.12)
372 .v_gap(0.22)
373 .title(
374 Text::from("Mixed Subplot Grid")
375 .size(16)
376 .font("Arial bold")
377 .y(0.95),
378 )
379 .build()
380 .plot();
381}examples/dimensions.rs (line 61)
7fn main() {
8 let penguins_dataset = LazyCsvReader::new(PlPath::new("data/penguins.csv"))
9 .finish()
10 .unwrap()
11 .select([
12 col("species"),
13 col("sex").alias("gender"),
14 col("flipper_length_mm").cast(DataType::Int16),
15 col("body_mass_g").cast(DataType::Int16),
16 ])
17 .collect()
18 .unwrap();
19
20 let temperature_dataset = LazyCsvReader::new(PlPath::new("data/debilt_2023_temps.csv"))
21 .with_has_header(true)
22 .with_try_parse_dates(true)
23 .finish()
24 .unwrap()
25 .with_columns(vec![
26 (col("tavg") / lit(10)).alias("tavg"),
27 (col("tmin") / lit(10)).alias("tmin"),
28 (col("tmax") / lit(10)).alias("tmax"),
29 ])
30 .collect()
31 .unwrap();
32
33 let animals_dataset = LazyCsvReader::new(PlPath::new("data/animal_statistics.csv"))
34 .finish()
35 .unwrap()
36 .collect()
37 .unwrap();
38
39 let axis = Axis::new()
40 .show_line(true)
41 .tick_direction(TickDirection::OutSide)
42 .value_thousands(true);
43
44 let plot1 = TimeSeriesPlot::builder()
45 .data(&temperature_dataset)
46 .x("date")
47 .y("tavg")
48 .additional_series(vec!["tmin", "tmax"])
49 .colors(vec![Rgb(128, 128, 128), Rgb(0, 122, 255), Rgb(255, 128, 0)])
50 .lines(vec![Line::Solid, Line::Dot, Line::Dot])
51 .plot_title(
52 Text::from("De Bilt Temperature 2023")
53 .font("Arial Bold")
54 .size(16),
55 )
56 .y_title(Text::from("temperature (°C)").size(13).x(-0.08))
57 // .legend_title(Text::from("Measure").size(12))
58 .legend(&Legend::new().x(0.1).y(0.9))
59 .build();
60
61 let plot2 = ScatterPlot::builder()
62 .data(&penguins_dataset)
63 .x("body_mass_g")
64 .y("flipper_length_mm")
65 .group("species")
66 .sort_groups_by(|a, b| {
67 if a.len() == b.len() {
68 a.cmp(b)
69 } else {
70 a.len().cmp(&b.len())
71 }
72 })
73 .opacity(0.6)
74 .size(10)
75 .colors(vec![Rgb(178, 34, 34), Rgb(65, 105, 225), Rgb(255, 140, 0)])
76 .shapes(vec![Shape::Circle, Shape::Square, Shape::Diamond])
77 .plot_title(Text::from("Penguin Morphology").font("Arial Bold").size(16))
78 .x_title(Text::from("body mass (g)").size(13))
79 .y_title(Text::from("flipper length (mm)").size(13).x(-0.11))
80 .legend_title(Text::from("Species").size(12))
81 .x_axis(&axis.clone().value_range(vec![2500.0, 6500.0]))
82 .y_axis(&axis.clone().value_range(vec![170.0, 240.0]))
83 .legend(&Legend::new().x(0.85).y(0.4))
84 .build();
85
86 let plot3 = BarPlot::builder()
87 .data(&animals_dataset)
88 .labels("animal")
89 .values("value")
90 .orientation(Orientation::Vertical)
91 .group("gender")
92 .sort_groups_by(|a, b| a.len().cmp(&b.len()))
93 .error("error")
94 .colors(vec![Rgb(255, 127, 80), Rgb(64, 224, 208)])
95 .plot_title(Text::from("Animal Statistics").font("Arial Bold").size(16))
96 .x_title(Text::from("animal").size(13))
97 .y_title(Text::from("value").size(13))
98 .legend_title(Text::from("Gender").size(12))
99 .legend(
100 &Legend::new()
101 .orientation(Orientation::Horizontal)
102 .x(0.35)
103 .y(0.9),
104 )
105 .build();
106
107 let plot4 = BoxPlot::builder()
108 .data(&penguins_dataset)
109 .labels("species")
110 .values("body_mass_g")
111 .orientation(Orientation::Vertical)
112 .group("gender")
113 .box_points(true)
114 .point_offset(-1.5)
115 .jitter(0.01)
116 .opacity(0.15)
117 .colors(vec![Rgb(0, 191, 255), Rgb(57, 255, 20), Rgb(255, 105, 180)])
118 .plot_title(
119 Text::from("Body Mass Distribution")
120 .font("Arial Bold")
121 .size(16),
122 )
123 .x_title(Text::from("species").size(13))
124 .y_title(Text::from("body mass (g)").size(13).x(-0.12))
125 .legend_title(Text::from("Gender").size(12))
126 .y_axis(&Axis::new().value_thousands(true))
127 .legend(&Legend::new().x(0.85).y(0.9))
128 .build();
129
130 let dimensions = Dimensions::new().width(1400).height(850).auto_size(false);
131
132 SubplotGrid::regular()
133 .plots(vec![&plot1, &plot2, &plot3, &plot4])
134 .rows(2)
135 .cols(2)
136 .v_gap(0.3)
137 .h_gap(0.2)
138 .dimensions(&dimensions)
139 .title(
140 Text::from("Scientific Data Visualization Dashboard")
141 .size(26)
142 .font("Arial Bold"),
143 )
144 .build()
145 .plot();
146}Trait Implementations§
Source§impl Clone for ScatterPlot
impl Clone for ScatterPlot
Source§fn clone(&self) -> ScatterPlot
fn clone(&self) -> ScatterPlot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Serialize for ScatterPlot
impl Serialize for ScatterPlot
impl PlotHelper for ScatterPlot
Auto Trait Implementations§
impl Freeze for ScatterPlot
impl !RefUnwindSafe for ScatterPlot
impl !Send for ScatterPlot
impl !Sync for ScatterPlot
impl Unpin for ScatterPlot
impl !UnwindSafe for ScatterPlot
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
Converts
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> ⓘ
Converts
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 more