Skip to content

Commit

Permalink
Updated named plots to infer different datatypes in case of x and y i…
Browse files Browse the repository at this point in the history
…nputs.
  • Loading branch information
SpiritSeeker authored and Benno Evers committed Apr 2, 2021
1 parent 5b88e8b commit 1480780
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions matplotlibcpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1661,8 +1661,8 @@ bool named_plot(const std::string& name, const std::vector<Numeric>& y, const st
return res;
}

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

Expand All @@ -1688,8 +1688,8 @@ bool named_plot(const std::string& name, const std::vector<Numeric>& x, const st
return res;
}

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

Expand All @@ -1715,8 +1715,8 @@ bool named_semilogx(const std::string& name, const std::vector<Numeric>& x, cons
return res;
}

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

Expand All @@ -1742,8 +1742,8 @@ bool named_semilogy(const std::string& name, const std::vector<Numeric>& x, cons
return res;
}

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

Expand Down

0 comments on commit 1480780

Please sign in to comment.