Tag: plot

在C中打印毕达哥拉斯三重奏的代表

我正在尝试创建一个程序,用于打印C中发现的毕达哥拉斯三元组的映射数据。到目前为止,我编写了程序以便能够找到三元组。 #include #include int main (int argc, char * argv[]) { int a, b, c; int a2, b2, c2; int limit = 60; for (a = 1; a <= limit; a++) { a2 = a * a; for (b = 1; b <= limit; b++) { b2 = b * b; for (c = 0; […]

‘QwtLog10ScaleEngine’之前的预期类型说明符?

版本:qwt 6.0.1我试图为Spectrum开发对数缩放。 我用简单的线来启用缩放plotspectrum-> setAxisScaleEngine(QwtPlot :: yLeft,new QwtLog10ScaleEngine); 问题:未绘制数据,因此绘图为空,编译器返回以下错误:“QwtLog10ScaleEngine之前的预期类型说明符”任何帮助都不胜感激这里是我的代码: class SpectrumPlot : public QWidget { Q_OBJECT public: PlotSpektrum(); private: QHBoxLayout* m_SpectrumLayout; QwtPlot* m_SpectrumPlot; QwtPlotCurve* m_SpectrumCurve; QwtPlotMarker* m_Marker; }; SpectrumPlot::SpectrumPlot() { m_SpectrumLayout = new QHBoxLayout(); m_SpectrumPlot = new QwtPlot(); m_SpectrumCurve = new QwtPlotCurve(); QwPlotGrid* pGrid = new QwtPlotGrid(); QPen GridPen; GridPen.setColor(Qt::green); GridPen.setWidthF(0.7); GridPen.setStyle(Qt::DashLine); QPen SpectrumPen; SpectrumPen.setColor(Qt::white); pGrid->setRenderHint(QwtPlotItem::RenderAntialiased); […]