[python/matplotlib] Add a Dot iterator

This commit is contained in:
Romain Goyet
2020-03-11 13:43:49 -04:00
committed by Émilie Feral
parent 6f3d3f62de
commit 5ada80d03b
4 changed files with 109 additions and 43 deletions

View File

@@ -11,8 +11,7 @@ void PlotView::drawRect(KDContext * ctx, KDRect rect) const {
drawLabelsAndGraduations(ctx, rect, Axis::Vertical, true);
drawLabelsAndGraduations(ctx, rect, Axis::Horizontal, true);
for (int i=0; i<m_store->numberOfDots(); i++) {
PlotStore::Dot dot = m_store->dotAtIndex(i);
for (PlotStore::Dot dot : m_store->dots()) {
drawDot(ctx, rect, dot.x(), dot.y(), dot.color());
}
}