thanks for the info.
i have a problem with qwtplotshapeitem: it does not overlay with the plot, any idea?
how can i set the coordinate of the rectangle to the ymax, ymin and to the plot item x=10 till x = 100?
path.addRect(20, 20, 60, 60);
QwtPlotShapeItem *pitem = new QwtPlotShapeItem();
pitem
->setRenderHint
(QwtPlotItem::RenderAntialiased,
true);
pitem->setShape(path);
pitem->setPen(color);
pitem->setBrush(color);
pitem->attach(plot.get());
plot->replot();
QColor color(255,0,0,100);
QPainterPath path;
path.addRect(20, 20, 60, 60);
QwtPlotShapeItem *pitem = new QwtPlotShapeItem();
pitem->setItemAttribute(QwtPlotItem::Legend, true);
pitem->setRenderHint(QwtPlotItem::RenderAntialiased, true);
pitem->setShape(path);
pitem->setPen(color);
pitem->setBrush(color);
pitem->attach(plot.get());
plot->replot();
To copy to clipboard, switch view to plain text mode
Bookmarks