Skip to content

Commit 76e16aa

Browse files
author
Benno Evers
committed
Remove unnecessary overloads for stem() and name_plot().
1 parent e0bdd04 commit 76e16aa

File tree

1 file changed

+6
-25
lines changed

1 file changed

+6
-25
lines changed

matplotlibcpp.h

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,12 @@ struct _interpreter {
230230
} // end namespace detail
231231

232232
// must be called before the first regular call to matplotlib to have any effect
233-
void backend(const std::string& name)
233+
inline void backend(const std::string& name)
234234
{
235235
detail::s_backend = name;
236236
}
237237

238-
bool annotate(std::string annotation, double x, double y)
238+
inline bool annotate(std::string annotation, double x, double y)
239239
{
240240
PyObject * xy = PyTuple_New(2);
241241
PyObject * str = PyString_FromString(annotation.c_str());
@@ -963,7 +963,7 @@ inline void draw()
963963
}
964964

965965
template<typename Numeric>
966-
void pause(Numeric interval)
966+
inline void pause(Numeric interval)
967967
{
968968
PyObject* args = PyTuple_New(1);
969969
PyTuple_SetItem(args, 0, PyFloat_FromDouble(interval));
@@ -1140,37 +1140,18 @@ bool plot(const A& a, const B& b, const std::string& format, Args... args)
11401140
* This group of plot() functions is needed to support initializer lists, i.e. calling
11411141
* plot( {1,2,3,4} )
11421142
*/
1143-
bool plot(const std::vector<double>& x, const std::vector<double>& y, const std::string& format = "") {
1143+
inline bool plot(const std::vector<double>& x, const std::vector<double>& y, const std::string& format = "") {
11441144
return plot<double,double>(x,y,format);
11451145
}
11461146

1147-
bool plot(const std::vector<double>& y, const std::string& format = "") {
1147+
inline bool plot(const std::vector<double>& y, const std::string& format = "") {
11481148
return plot<double>(y,format);
11491149
}
11501150

1151-
bool plot(const std::vector<double>& x, const std::vector<double>& y, const std::map<std::string, std::string>& keywords) {
1151+
inline bool plot(const std::vector<double>& x, const std::vector<double>& y, const std::map<std::string, std::string>& keywords) {
11521152
return plot<double>(x,y,keywords);
11531153
}
11541154

1155-
bool stem(const std::vector<double>& x, const std::vector<double>& y, const std::string& format = "")
1156-
{
1157-
return stem<double, double>(x, y, format);
1158-
}
1159-
1160-
bool stem(const std::vector<double>& y, const std::string& format = "")
1161-
{
1162-
return stem<double>(y, format);
1163-
}
1164-
1165-
bool stem(const std::vector<double>& x, const std::vector<double>& y, const std::map<std::string, std::string>& keywords)
1166-
{
1167-
return stem<double>(x, y, keywords);
1168-
}
1169-
1170-
bool named_plot(const std::string& name, const std::vector<double>& x, const std::vector<double>& y, const std::string& format = "") {
1171-
return named_plot<double>(name,x,y,format);
1172-
}
1173-
11741155
#endif
11751156

11761157
} // end namespace matplotlibcpp

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