【发布时间】:2018-01-21 10:10:47
【问题描述】:
我正在使用 qcustomplot 并绘制曲线 (QCPCurve)。下面的代码仅填充曲线上方的区域。但我想填充曲线另一侧的区域。以及如何使渐变填充区域直到图形的边界?
_myPlot->clearPlottables();
QVector<double> x;
QVector<double> y;
for(int point = 0; point < shadowZone.length() ; point++){
x.push_back(shadowZone.at(point).longitude);
y.push_back(shadowZone.at(point).latitude);
}
QBrush shadowBrush (QColor(0,0,0), Qt::Dense7Pattern);
QCPCurve *newCurve = new QCPCurve(_myPlot->xAxis, _myPlot->yAxis);
newCurve->setBrush(shadowBrush);
newCurve->addData(x,y);
_myPlot->replot();
【问题讨论】:
标签: c++ qt graph curve qcustomplot