[pyton/matplotlib] Support plot

This commit is contained in:
Romain Goyet
2020-03-11 17:25:23 -04:00
committed by Émilie Feral
parent a6773ad73b
commit a3b1b51f75
9 changed files with 119 additions and 22 deletions

View File

@@ -14,6 +14,25 @@ void PlotView::drawRect(KDContext * ctx, KDRect rect) const {
for (PlotStore::Dot dot : m_store->dots()) {
drawDot(ctx, rect, dot.x(), dot.y(), dot.color());
}
for (PlotStore::Label label : m_store->labels()) {
drawLabel(ctx, rect,
label.x(), label.y(), label.string(),
KDColorBlack,
CurveView::RelativePosition::Before,
CurveView::RelativePosition::None
);
}
for (PlotStore::Segment segment : m_store->segments()) {
drawSegment2(
ctx, rect,
segment.xStart(), segment.yStart(),
segment.xEnd(), segment.yEnd(),
segment.color()
);
}
}
}