File matplotlibcpp.h
Defines
-
NPY_NO_DEPRECATED_API
-
namespace matplotlibcpp
Functions
-
inline void backend(const std::string &name)
Select the backend
NOTE: This must be called before the first plot command to have any effect.
Mainly useful to select the non-interactive ‘Agg’ backend when running matplotlibcpp in headless mode, for example on a machine with no display.
See also: https://matplotlib.org/2.0.2/api/matplotlib_configuration_api.html#matplotlib.use
-
template<typename Numeric>
bool plot(const std::vector<Numeric> &x, const std::vector<Numeric> &y, const std::map<std::string, std::string> &keywords) Plot a line through the given x and y data points..
See: https://matplotlib.org/3.2.1/api/_as_gen/matplotlib.pyplot.plot.html
-
template<typename Numeric>
void plot_surface(const std::vector<::std::vector<Numeric>> &x, const std::vector<::std::vector<Numeric>> &y, const std::vector<::std::vector<Numeric>> &z, const std::map<std::string, std::string> &keywords = std::map<std::string, std::string>())
-
template<typename Numeric>
void plot3(const std::vector<Numeric> &x, const std::vector<Numeric> &y, const std::vector<Numeric> &z, const std::map<std::string, std::string> &keywords = std::map<std::string, std::string>())
-
template<typename Numeric>
bool stem(const std::vector<Numeric> &x, const std::vector<Numeric> &y, const std::map<std::string, std::string> &keywords)
-
template<typename Numeric>
bool fill(const std::vector<Numeric> &x, const std::vector<Numeric> &y, const std::map<std::string, std::string> &keywords)
-
template<typename Numeric>
bool fill_between(const std::vector<Numeric> &x, const std::vector<Numeric> &y1, const std::vector<Numeric> &y2, const std::map<std::string, std::string> &keywords)
-
template<typename Numeric>
bool hist(const std::vector<Numeric> &y, long bins = 10, std::string color = "b", double alpha = 1.0, bool cumulative = false)
-
inline void imshow(const unsigned char *ptr, const int rows, const int columns, const int colors, const std::map<std::string, std::string> &keywords = {}, PyObject **out = nullptr)
-
inline void imshow(const float *ptr, const int rows, const int columns, const int colors, const std::map<std::string, std::string> &keywords = {}, PyObject **out = nullptr)
-
template<typename NumericX, typename NumericY>
bool scatter(const std::vector<NumericX> &x, const std::vector<NumericY> &y, const double s = 1.0, const std::map<std::string, std::string> &keywords = {})
-
template<typename Numeric>
bool boxplot(const std::vector<std::vector<Numeric>> &data, const std::vector<std::string> &labels = {}, const std::map<std::string, std::string> &keywords = {})
-
template<typename Numeric>
bool boxplot(const std::vector<Numeric> &data, const std::map<std::string, std::string> &keywords = {})
-
template<typename Numeric>
bool bar(const std::vector<Numeric> &x, const std::vector<Numeric> &y, std::string ec = "black", std::string ls = "-", double lw = 1.0, const std::map<std::string, std::string> &keywords = {})
-
template<typename Numeric>
bool bar(const std::vector<Numeric> &y, std::string ec = "black", std::string ls = "-", double lw = 1.0, const std::map<std::string, std::string> &keywords = {})
-
template<typename Numeric>
bool named_hist(std::string label, const std::vector<Numeric> &y, long bins = 10, std::string color = "b", double alpha = 1.0)
-
template<typename NumericX, typename NumericY>
bool plot(const std::vector<NumericX> &x, const std::vector<NumericY> &y, const std::string &s = "")
-
template<typename NumericX, typename NumericY, typename NumericU, typename NumericW>
bool quiver(const std::vector<NumericX> &x, const std::vector<NumericY> &y, const std::vector<NumericU> &u, const std::vector<NumericW> &w, const std::map<std::string, std::string> &keywords = {})
-
template<typename NumericX, typename NumericY>
bool stem(const std::vector<NumericX> &x, const std::vector<NumericY> &y, const std::string &s = "")
-
template<typename NumericX, typename NumericY>
bool semilogx(const std::vector<NumericX> &x, const std::vector<NumericY> &y, const std::string &s = "")
-
template<typename NumericX, typename NumericY>
bool semilogy(const std::vector<NumericX> &x, const std::vector<NumericY> &y, const std::string &s = "")
-
template<typename NumericX, typename NumericY>
bool loglog(const std::vector<NumericX> &x, const std::vector<NumericY> &y, const std::string &s = "")
-
template<typename NumericX, typename NumericY>
bool errorbar(const std::vector<NumericX> &x, const std::vector<NumericY> &y, const std::vector<NumericX> &yerr, const std::map<std::string, std::string> &keywords = {})
-
template<typename Numeric>
bool named_plot(const std::string &name, const std::vector<Numeric> &y, const std::string &format = "")
-
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 Numeric>
bool named_semilogx(const std::string &name, const std::vector<Numeric> &x, const std::vector<Numeric> &y, const std::string &format = "")
-
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 Numeric>
bool named_loglog(const std::string &name, const std::vector<Numeric> &x, const std::vector<Numeric> &y, const std::string &format = "")
-
template<typename Numeric>
bool plot(const std::vector<Numeric> &y, const std::map<std::string, std::string> &keywords)
-
inline long figure(long number = -1)
-
inline bool fignum_exists(long number)
-
inline void figure_size(size_t w, size_t h)
-
inline void legend()
-
inline double *xlim()
-
inline double *ylim()
-
template<typename Numeric>
inline void xticks(const std::vector<Numeric> &ticks, const std::vector<std::string> &labels = {}, const std::map<std::string, std::string> &keywords = {})
-
template<typename Numeric>
inline void xticks(const std::vector<Numeric> &ticks, const std::map<std::string, std::string> &keywords)
-
template<typename Numeric>
inline void yticks(const std::vector<Numeric> &ticks, const std::vector<std::string> &labels = {}, const std::map<std::string, std::string> &keywords = {})
-
template<typename Numeric>
inline void yticks(const std::vector<Numeric> &ticks, const std::map<std::string, std::string> &keywords)
-
inline void tick_params(const std::map<std::string, std::string> &keywords, const std::string axis = "both")
-
inline void subplot(long nrows, long ncols, long plot_number)
-
inline void subplot2grid(long nrows, long ncols, long rowid = 0, long colid = 0, long rowspan = 1, long colspan = 1)
-
inline void title(const std::string &titlestr, const std::map<std::string, std::string> &keywords = {})
-
inline void suptitle(const std::string &suptitlestr, const std::map<std::string, std::string> &keywords = {})
-
inline void axvline(double x, double ymin = 0., double ymax = 1., const std::map<std::string, std::string> &keywords_string = std::map<std::string, std::string>(), const std::map<std::string, double> &keywords_double = std::map<std::string, double>())
-
inline void xlabel(const std::string &str, const std::map<std::string, std::string> &keywords = {})
-
inline void ylabel(const std::string &str, const std::map<std::string, std::string> &keywords = {})
-
inline void set_zlabel(const std::string &str, const std::map<std::string, std::string> &keywords = {})
-
inline void grid(bool flag)
-
inline void show(const bool block = true)
-
inline void close()
-
inline void xkcd()
-
inline void draw()
-
inline void clf()
-
inline void ion()
-
inline std::vector<std::array<double, 2>> ginput(const int numClicks = 1, const std::map<std::string, std::string> &keywords = {})
-
inline void tight_layout()
-
template<typename ...Args>
bool plot()
-
template<typename A, typename B, typename ...Args>
bool plot(const A &a, const B &b, const std::string &format, Args... args)
-
class Plot
Public Functions
-
template<typename Numeric>
inline Plot(const std::string &name, const std::vector<Numeric> &x, const std::vector<Numeric> &y, const std::string &format = "")
-
template<typename Numeric>
inline bool update(const std::vector<Numeric> &x, const std::vector<Numeric> &y)
-
inline bool clear()
-
inline void remove()
-
inline ~Plot()
Private Functions
-
inline void decref()
-
template<typename Numeric>
-
namespace detail
Typedefs
Functions
-
struct _interpreter
-
Public Members
-
PyObject *s_python_function_show
-
PyObject *s_python_function_close
-
PyObject *s_python_function_draw
-
PyObject *s_python_function_pause
-
PyObject *s_python_function_save
-
PyObject *s_python_function_figure
-
PyObject *s_python_function_fignum_exists
-
PyObject *s_python_function_plot
-
PyObject *s_python_function_quiver
-
PyObject *s_python_function_semilogx
-
PyObject *s_python_function_semilogy
-
PyObject *s_python_function_loglog
-
PyObject *s_python_function_fill
-
PyObject *s_python_function_fill_between
-
PyObject *s_python_function_hist
-
PyObject *s_python_function_imshow
-
PyObject *s_python_function_scatter
-
PyObject *s_python_function_boxplot
-
PyObject *s_python_function_subplot
-
PyObject *s_python_function_subplot2grid
-
PyObject *s_python_function_legend
-
PyObject *s_python_function_xlim
-
PyObject *s_python_function_ion
-
PyObject *s_python_function_ginput
-
PyObject *s_python_function_ylim
-
PyObject *s_python_function_title
-
PyObject *s_python_function_axis
-
PyObject *s_python_function_axvline
-
PyObject *s_python_function_xlabel
-
PyObject *s_python_function_ylabel
-
PyObject *s_python_function_gca
-
PyObject *s_python_function_xticks
-
PyObject *s_python_function_yticks
-
PyObject *s_python_function_tick_params
-
PyObject *s_python_function_grid
-
PyObject *s_python_function_clf
-
PyObject *s_python_function_errorbar
-
PyObject *s_python_function_annotate
-
PyObject *s_python_function_tight_layout
-
PyObject *s_python_colormap
-
PyObject *s_python_empty_tuple
-
PyObject *s_python_function_stem
-
PyObject *s_python_function_xkcd
-
PyObject *s_python_function_text
-
PyObject *s_python_function_suptitle
-
PyObject *s_python_function_bar
-
PyObject *s_python_function_colorbar
-
PyObject *s_python_function_subplots_adjust
Public Static Functions
-
static inline _interpreter &get()
-
PyObject *s_python_function_show
-
template<typename T>
struct is_callable Public Types
-
typedef is_callable_impl<std::is_class<T>::value, T>::type type
-
typedef is_callable_impl<std::is_class<T>::value, T>::type type
-
template<typename T>
struct is_callable_impl<false, T> Public Types
-
typedef is_function<T> type
-
typedef is_function<T> type
-
template<typename T>
struct is_callable_impl<true, T> Public Types
-
typedef decltype(&Fallback::operator()) dtype
Public Static Functions
-
template<>
struct Derived : public T, public matplotlibcpp::detail::is_callable_impl<true, T>::Fallback
-
template<>
struct Fallback Subclassed by matplotlibcpp::detail::is_callable_impl< true, T >::Derived
Public Functions
-
void operator()()
-
void operator()()
-
typedef decltype(&Fallback::operator()) dtype
-
template<typename IsYDataCallable>
struct plot_impl
-
template<typename T>
struct select_npy_type Public Static Attributes
-
static const NPY_TYPES type = NPY_NOTYPE
-
static const NPY_TYPES type = NPY_NOTYPE
-
template<>
struct select_npy_type<bool> Public Static Attributes
-
static const NPY_TYPES type = NPY_BOOL
-
static const NPY_TYPES type = NPY_BOOL
-
template<>
struct select_npy_type<double> Public Static Attributes
-
static const NPY_TYPES type = NPY_DOUBLE
-
static const NPY_TYPES type = NPY_DOUBLE
-
template<>
struct select_npy_type<float> Public Static Attributes
-
static const NPY_TYPES type = NPY_FLOAT
-
static const NPY_TYPES type = NPY_FLOAT
-
template<>
struct select_npy_type<int16_t> Public Static Attributes
-
static const NPY_TYPES type = NPY_SHORT
-
static const NPY_TYPES type = NPY_SHORT
-
template<>
struct select_npy_type<int32_t> Public Static Attributes
-
static const NPY_TYPES type = NPY_INT
-
static const NPY_TYPES type = NPY_INT
-
template<>
struct select_npy_type<int64_t> Public Static Attributes
-
static const NPY_TYPES type = NPY_INT64
-
static const NPY_TYPES type = NPY_INT64
-
template<>
struct select_npy_type<int8_t> Public Static Attributes
-
static const NPY_TYPES type = NPY_INT8
-
static const NPY_TYPES type = NPY_INT8
-
template<>
struct select_npy_type<uint16_t> Public Static Attributes
-
static const NPY_TYPES type = NPY_USHORT
-
static const NPY_TYPES type = NPY_USHORT
-
template<>
struct select_npy_type<uint32_t> Public Static Attributes
-
static const NPY_TYPES type = NPY_ULONG
-
static const NPY_TYPES type = NPY_ULONG
-
struct _interpreter
-
inline void backend(const std::string &name)