@@ -47,6 +47,7 @@ namespace matplot {
47
47
if (next_plot_replace_) {
48
48
children_.clear ();
49
49
colororder_index_ = 0 ;
50
+ axes_type::clear ();
50
51
}
51
52
children_.push_back (obj);
52
53
touch ();
@@ -2214,6 +2215,9 @@ namespace matplot {
2214
2215
y_axis_.limits_mode_auto (true );
2215
2216
y2_axis_.limits_mode_auto (true );
2216
2217
z_axis_.limits_mode_auto (true );
2218
+ axes_type::x_axis ().reverse (false );
2219
+ axes_type::y_axis ().reverse (false );
2220
+ minor_grid (false );
2217
2221
touch ();
2218
2222
}
2219
2223
@@ -2318,8 +2322,6 @@ namespace matplot {
2318
2322
line_handle axes_type::plot (const std::vector<double > &x,
2319
2323
const std::vector<double > &y,
2320
2324
std::string_view line_spec) {
2321
- this ->y_axis ().reverse (false );
2322
- this ->minor_grid (false );
2323
2325
axes_silencer s{this };
2324
2326
line_handle l = std::make_shared<class line >(this , x, y, line_spec);
2325
2327
this ->emplace_object (l);
@@ -2328,8 +2330,6 @@ namespace matplot {
2328
2330
2329
2331
line_handle axes_type::plot (const std::vector<double > &y,
2330
2332
std::string_view line_spec) {
2331
- this ->y_axis ().reverse (false );
2332
- this ->minor_grid (false );
2333
2333
axes_silencer s{this };
2334
2334
line_handle l = std::make_shared<class line >(this , y, line_spec);
2335
2335
this ->emplace_object (l);
0 commit comments