[python/matplotlib] Add grid control

This commit is contained in:
Romain Goyet
2020-03-11 17:53:19 -04:00
committed by Émilie Feral
parent a3b1b51f75
commit a062c570d5
7 changed files with 34 additions and 13 deletions

View File

@@ -96,15 +96,18 @@ public:
void addLabel(mp_obj_t x, mp_obj_t y, mp_obj_t string);
Iterable<ListIterator<Label>> labels() { return Iterable<ListIterator<Label>>(m_labels); }
void setGrid(bool grid) { m_grid = grid; }
bool grid() { return m_grid; }
void setAxesRequested(bool b) { m_axesRequested = b; }
bool axesRequested() const { return m_axesRequested; }
void setGridRequested(bool b) { m_gridRequested = b; }
bool gridRequested() const { return m_gridRequested; }
private:
mp_obj_t m_dots; // List of (x, y, color)
mp_obj_t m_labels; // List of (x, y, string)
mp_obj_t m_segments; // List of (x, y, dx, dy, style, color)
mp_obj_t m_rects; // List of (x, y, w, h, color)
bool m_grid;
bool m_axesRequested;
bool m_gridRequested;
};
}