Skip to content

Commit b2af8c4

Browse files
rmburgandrei-ng
authored andcommitted
Change Contours size to be f64 instead of usize
1 parent 78fddde commit b2af8c4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/scientific_charts/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn customizing_size_and_range_of_a_contour_plots_contours() {
6666
let trace = Contour::new_z(z)
6767
.color_scale(ColorScale::Palette(ColorScalePalette::Jet))
6868
.auto_contour(false)
69-
.contours(Contours::new().start(0.0).end(8.0).size(2));
69+
.contours(Contours::new().start(0.0).end(8.0).size(2.0));
7070

7171
let layout = Layout::new().title("Customizing Size and Range of Contours");
7272
let mut plot = Plot::new();

plotly/src/traces/contour.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub struct Contours {
5353
r#type: Option<ContoursType>,
5454
start: Option<f64>,
5555
end: Option<f64>,
56-
size: Option<usize>,
56+
size: Option<f64>,
5757
coloring: Option<Coloring>,
5858
#[serde(rename = "showlines")]
5959
show_lines: Option<bool>,
@@ -522,7 +522,7 @@ mod tests {
522522
.type_(ContoursType::Levels)
523523
.start(0.0)
524524
.end(10.0)
525-
.size(5)
525+
.size(5.0)
526526
.coloring(Coloring::HeatMap)
527527
.show_lines(true)
528528
.show_labels(false)
@@ -535,7 +535,7 @@ mod tests {
535535
"type": "levels",
536536
"start": 0.0,
537537
"end": 10.0,
538-
"size": 5,
538+
"size": 5.0,
539539
"coloring": "heatmap",
540540
"showlines": true,
541541
"showlabels": false,

0 commit comments

Comments
 (0)