MCPcopy Create free account
hub / github.com/HViktorTsoi/FAST_LIO_LOCALIZATION / boxplot

Function boxplot

include/matplotlibcpp.h:891–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889
890template<typename Numeric>
891bool boxplot(const std::vector<std::vector<Numeric>>& data,
892 const std::vector<std::string>& labels = {},
893 const std::map<std::string, std::string> & keywords = {})
894{
895 detail::_interpreter::get();
896
897 PyObject* listlist = detail::get_listlist(data);
898 PyObject* args = PyTuple_New(1);
899 PyTuple_SetItem(args, 0, listlist);
900
901 PyObject* kwargs = PyDict_New();
902
903 // kwargs needs the labels, if there are (the correct number of) labels
904 if (!labels.empty() && labels.size() == data.size()) {
905 PyDict_SetItemString(kwargs, "labels", detail::get_array(labels));
906 }
907
908 // take care of the remaining keywords
909 for (const auto& it : keywords)
910 {
911 PyDict_SetItemString(kwargs, it.first.c_str(), PyString_FromString(it.second.c_str()));
912 }
913
914 PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_boxplot, args, kwargs);
915
916 Py_DECREF(args);
917 Py_DECREF(kwargs);
918
919 if(res) Py_DECREF(res);
920
921 return res;
922}
923
924template<typename Numeric>
925bool boxplot(const std::vector<Numeric>& data,

Callers

nothing calls this directly

Calls 2

get_listlistFunction · 0.85
get_arrayFunction · 0.85

Tested by

no test coverage detected