sagerking

// prepare data:
QVector<double> x1(4), y1(4);

for (int i=0; i<x3.size(); ++i)
{
  x4[i] = i + 1;
  y4[i] = i + 1;
}

QCPBars *bars1 = new QCPBars(customPlot->xAxis, customPlot->yAxis);
bars1->setWidth(9/(double)x4.size());
bars1->setData(x3, y3);
bars1->setPen(QPen(Qt::red));
bars1->setBrush(QColor(10, 140, 70, 160));

 

效果如下:

分类:

技术点:

相关文章:

  • 2021-12-14
  • 2021-10-10
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2021-07-30
猜你喜欢
  • 2021-06-24
  • 2021-11-07
  • 2021-10-18
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案