4 : _xlimits({-1.0, 1.0}), _ylimits({-1.0, 1.0}), _zlimits({-1.0, 1.0}),
5 _xmargins({0.15, 0.9}), _ymargins({0.15, 0.85}), _zmargins({0.15, 0.9}),
6 _title(
""), _fontsize(1.0), _majorticklength(1.0),
7 _minorticklength(2.0 / 3.0), _drawhorizontalgrid(
false),
8 _drawverticalgrid(
false), _drawhorizontalfinegrid(
false),
9 _drawverticalfinegrid(
false), _advance(
true) {
13 _xaxis.emplace_back();
14 _yaxis.emplace_back();
15 _zaxis.emplace_back();
17Plot::Plot(
Plot const &other) {
20 _xlimits = other._xlimits;
21 _ylimits = other._ylimits;
22 _zlimits = other._zlimits;
23 _xmargins = other._xmargins;
24 _ymargins = other._ymargins;
25 _zmargins = other._zmargins;
26 _title = other._title;
27 _horizontalgrid = other._horizontalgrid;
28 _verticalgrid = other._verticalgrid;
29 _xaxis = other._xaxis;
30 _yaxis = other._yaxis;
31 _zaxis = other._zaxis;
32 _fontsize = other._fontsize;
33 _majorticklength = other._majorticklength;
34 _minorticklength = other._minorticklength;
35 _drawhorizontalgrid = other._drawhorizontalgrid;
36 _drawverticalgrid = other._drawverticalgrid;
37 _drawhorizontalfinegrid = other._drawhorizontalfinegrid;
38 _drawverticalfinegrid = other._drawverticalfinegrid;
39 _advance = other._advance;
41 for (
auto &item : other._items) {
43 _items.emplace_back(item->clone());
46Plot *Plot::clone()
const {
return new Plot(*
this); }
47void Plot::add(
CanvasItem &item) { _items.emplace_back(item.clone()); }
49void Plot::add(std::vector<CanvasItem> &items) {
51 for (
auto &item : items) {
53 _items.emplace_back(item.clone());