Skip to content

Commit 1480780

Browse files
SpiritSeekerBenno Evers
authored andcommitted
Updated named plots to infer different datatypes in case of x and y inputs.
1 parent 5b88e8b commit 1480780

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

matplotlibcpp.h

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy