Skip to content

Commit 341041d

Browse files
committed
Updated named plots to infer different datatypes in case of x and y inputs.
1 parent 70d508f commit 341041d

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

matplotlibcpp.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,8 +1367,8 @@ bool named_plot(const std::string& name, const std::vector<Numeric>& y, const st
13671367
return res;
13681368
}
13691369

1370-
template<typename Numeric>
1371-
bool named_plot(const std::string& name, const std::vector<Numeric>& x, const std::vector<Numeric>& y, const std::string& format = "")
1370+
template<typename NumericX, typename NumericY>
1371+
bool named_plot(const std::string& name, const std::vector<NumericX>& x, const std::vector<NumericY>& y, const std::string& format = "")
13721372
{
13731373
detail::_interpreter::get();
13741374

@@ -1394,8 +1394,8 @@ bool named_plot(const std::string& name, const std::vector<Numeric>& x, const st
13941394
return res;
13951395
}
13961396

1397-
template<typename Numeric>
1398-
bool named_semilogx(const std::string& name, const std::vector<Numeric>& x, const std::vector<Numeric>& y, const std::string& format = "")
1397+
template<typename NumericX, typename NumericY>
1398+
bool named_semilogx(const std::string& name, const std::vector<NumericX>& x, const std::vector<NumericY>& y, const std::string& format = "")
13991399
{
14001400
detail::_interpreter::get();
14011401

@@ -1421,8 +1421,8 @@ bool named_semilogx(const std::string& name, const std::vector<Numeric>& x, cons
14211421
return res;
14221422
}
14231423

1424-
template<typename Numeric>
1425-
bool named_semilogy(const std::string& name, const std::vector<Numeric>& x, const std::vector<Numeric>& y, const std::string& format = "")
1424+
template<typename NumericX, typename NumericY>
1425+
bool named_semilogy(const std::string& name, const std::vector<NumericX>& x, const std::vector<NumericY>& y, const std::string& format = "")
14261426
{
14271427
detail::_interpreter::get();
14281428

@@ -1448,8 +1448,8 @@ bool named_semilogy(const std::string& name, const std::vector<Numeric>& x, cons
14481448
return res;
14491449
}
14501450

1451-
template<typename Numeric>
1452-
bool named_loglog(const std::string& name, const std::vector<Numeric>& x, const std::vector<Numeric>& y, const std::string& format = "")
1451+
template<typename NumericX, typename NumericY>
1452+
bool named_loglog(const std::string& name, const std::vector<NumericX>& x, const std::vector<NumericY>& y, const std::string& format = "")
14531453
{
14541454
detail::_interpreter::get();
14551455

0 commit comments

Comments
 (0)