forked from alandefreitas/matplotplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstring_function.h
More file actions
44 lines (36 loc) 路 1.33 KB
/
Copy pathstring_function.h
File metadata and controls
44 lines (36 loc) 路 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Created by Alan Freitas on 2020-07-06.
//
#ifndef MATPLOTPLUSPLUS_STRING_FUNCTION_H
#define MATPLOTPLUSPLUS_STRING_FUNCTION_H
#include <matplot/axes_objects/line.h>
#include <matplot/core/line_spec.h>
#include <matplot/util/handle_types.h>
#include <string>
namespace matplot {
class string_function : public line {
public:
explicit string_function(class axes *parent);
string_function(class axes *parent, const std::string &equation,
const std::string &line_spec = "");
/// If we receive an axes_handle, we can convert it to a raw
/// pointer because there is no ownership involved here
template <class... Args>
string_function(const axes_handle &parent, Args... args)
: string_function(parent.get(), args...) {}
public:
std::string plot_string() override;
std::string data_string() override;
double xmax() override;
double xmin() override;
double ymax() override;
double ymin() override;
enum axes_object::axes_category axes_category() override;
public:
const std::string &equation() const;
class string_function &equation(const std::string &equation);
private:
std::string equation_;
};
} // namespace matplot
#endif // MATPLOTPLUSPLUS_STRING_FUNCTION_H