@@ -823,10 +823,9 @@ bool fill_between(const std::vector<Numeric> &x, const std::vector<Numeric> &y1,
823
823
return res;
824
824
}
825
825
826
- template <typename Numeric>
827
- bool hist (const std::vector<Numeric> &y, long bins = 10 ,
828
- std::string color = " b" , double alpha = 1.0 ,
829
- bool cumulative = false ) {
826
+ template <typename VectorY>
827
+ bool hist (const VectorY &y, long bins = 10 , std::string color = " b" ,
828
+ double alpha = 1.0 , bool cumulative = false ) {
830
829
831
830
PyObject *yarray = get_array (y);
832
831
@@ -851,10 +850,12 @@ bool hist(const std::vector<Numeric> &y, long bins = 10,
851
850
return res;
852
851
}
853
852
854
- template <typename NumericX, typename NumericY>
855
- bool scatter (const std::vector<NumericX> &x, const std::vector<NumericY> &y,
856
- const double s = 1.0 ) // The marker size in points**2
857
- {
853
+ // @brief Scatter plot
854
+ // @param x x-coordinates of the 2d points
855
+ // @param y y-coordinates of the 2d points
856
+ // @param s the marker size in points**2
857
+ template <typename VectorX, typename VectorY>
858
+ bool scatter (const VectorX &x, const VectorY &y, const double s = 1.0 ) {
858
859
assert (x.size () == y.size ());
859
860
860
861
PyObject *xarray = get_array (x);
0 commit comments