@@ -50,6 +50,8 @@ namespace matplot {
5050 double contour_max_level = *max_it;
5151
5252 std::stringstream ss;
53+ ss.precision (5 );
54+ ss << std::fixed;
5355 if (filled_) {
5456 auto [lower_levels, upper_levels] = get_lowers_and_uppers ();
5557 // Command for background filled curve
@@ -413,7 +415,8 @@ namespace matplot {
413415 _levels = levels_;
414416
415417 // Extend minimum beyond zmin (for filled plots)
416- const bool log = parent_->z_axis ().scale () == axis_type::axis_scale::log;
418+ const bool log =
419+ parent_->z_axis ().scale () == axis_type::axis_scale::log;
417420 if (extend_ == extend_option::both || extend_ == extend_option::min) {
418421 double lower = log ? 1e-250 : -1e250 ;
419422 _levels.insert (_levels.begin (), lower);
@@ -475,6 +478,8 @@ namespace matplot {
475478 double zmin = *min_level_it;
476479
477480 std::stringstream ss;
481+ ss.precision (5 );
482+ ss << std::fixed;
478483 for (size_t i = 0 ; i < lines_.size (); ++i) {
479484 if (i != 0 ) {
480485 ss << " ," ;
@@ -766,6 +771,8 @@ namespace matplot {
766771 auto [lower_levels, upper_levels] = get_lowers_and_uppers ();
767772
768773 std::stringstream ss;
774+ ss.precision (5 );
775+ ss << std::fixed;
769776 if (filled_) {
770777 // Plot the line segments
771778 // Create one filled curve for each segment of a contour.
@@ -1024,7 +1031,7 @@ namespace matplot {
10241031 // nans at end of the underlying storage)
10251032 while (j + 1 < lines_[i].first .size () &&
10261033 is_separator (lines_[i].first [j + 1 ],
1027- lines_[i].second [j + 1 ])) {
1034+ lines_[i].second [j + 1 ])) {
10281035 ++j;
10291036 }
10301037 // Include an empty line to indicate this polygon or line
0 commit comments