@@ -1058,7 +1058,7 @@ template<typename NumericX, typename NumericY, typename NumericColors>
1058
1058
1059
1059
return res;
1060
1060
}
1061
-
1061
+
1062
1062
1063
1063
template <typename NumericX, typename NumericY, typename NumericZ>
1064
1064
bool scatter (const std::vector<NumericX>& x,
@@ -1069,9 +1069,9 @@ bool scatter(const std::vector<NumericX>& x,
1069
1069
const long fig_number=0 ) {
1070
1070
detail::_interpreter::get ();
1071
1071
1072
- // Same as with plot_surface: We lazily load the modules here the first time
1073
- // this function is called because I'm not sure that we can assume "matplotlib
1074
- // installed" implies "mpl_toolkits installed" on all platforms, and we don't
1072
+ // Same as with plot_surface: We lazily load the modules here the first time
1073
+ // this function is called because I'm not sure that we can assume "matplotlib
1074
+ // installed" implies "mpl_toolkits installed" on all platforms, and we don't
1075
1075
// want to require it for people who don't need 3d plots.
1076
1076
static PyObject *mpl_toolkitsmod = nullptr , *axis3dmod = nullptr ;
1077
1077
if (!mpl_toolkitsmod) {
@@ -1468,7 +1468,7 @@ bool quiver(const std::vector<NumericX>& x, const std::vector<NumericY>& y, cons
1468
1468
Py_DECREF (axis3d);
1469
1469
if (!axis3dmod) { throw std::runtime_error (" Error loading module mpl_toolkits.mplot3d!" ); }
1470
1470
}
1471
-
1471
+
1472
1472
// assert sizes match up
1473
1473
assert (x.size () == y.size () && x.size () == u.size () && u.size () == w.size () && x.size () == z.size () && x.size () == v.size () && u.size () == v.size ());
1474
1474
@@ -1496,7 +1496,7 @@ bool quiver(const std::vector<NumericX>& x, const std::vector<NumericY>& y, cons
1496
1496
{
1497
1497
PyDict_SetItemString (kwargs, it->first .c_str (), PyUnicode_FromString (it->second .c_str ()));
1498
1498
}
1499
-
1499
+
1500
1500
// get figure gca to enable 3d projection
1501
1501
PyObject *fig =
1502
1502
PyObject_CallObject (detail::_interpreter::get ().s_python_function_figure ,
@@ -1516,7 +1516,7 @@ bool quiver(const std::vector<NumericX>& x, const std::vector<NumericY>& y, cons
1516
1516
Py_INCREF (axis);
1517
1517
Py_DECREF (gca);
1518
1518
Py_DECREF (gca_kwargs);
1519
-
1519
+
1520
1520
// plot our boys bravely, plot them strongly, plot them with a wink and clap
1521
1521
PyObject *plot3 = PyObject_GetAttrString (axis, " quiver" );
1522
1522
if (!plot3) throw std::runtime_error (" No 3D line plot" );
@@ -2655,7 +2655,7 @@ inline void rcparams(const std::map<std::string, std::string>& keywords = {}) {
2655
2655
PyDict_SetItemString (kwargs, it->first .c_str (), PyLong_FromLong (std::stoi (it->second .c_str ())));
2656
2656
else PyDict_SetItemString (kwargs, it->first .c_str (), PyString_FromString (it->second .c_str ()));
2657
2657
}
2658
-
2658
+
2659
2659
PyObject * update = PyObject_GetAttrString (detail::_interpreter::get ().s_python_function_rcparams , " update" );
2660
2660
PyObject * res = PyObject_Call (update, args, kwargs);
2661
2661
if (!res) throw std::runtime_error (" Call to rcParams.update() failed." );
@@ -2818,7 +2818,7 @@ struct plot_impl<std::false_type>
2818
2818
PyObject* pystring = PyString_FromString (format.c_str ());
2819
2819
2820
2820
auto itx = begin (x), ity = begin (y);
2821
- for (size_t i = 0 ; i < xs; ++i) {
2821
+ for (decltype (xs) i = 0 ; i < xs; ++i) {
2822
2822
PyList_SetItem (xlist, i, PyFloat_FromDouble (*itx++));
2823
2823
PyList_SetItem (ylist, i, PyFloat_FromDouble (*ity++));
2824
2824
}
0 commit comments