Hi all,
I'd like to create a pdf document of my plot (QwtPlot)
QwtPlotRenderer* plotRender = new QwtPlotRenderer();
plotRender->setDiscardFlag(QwtPlotRenderer:iscardBackground,true);
plotRender->setDiscardFlag(QwtPlotRenderer:iscardCanvasBackground,true);
plotRender->setDiscardFlag(QwtPlotRenderer:iscardLegend,false);
plotRender->setDiscardFlag(QwtPlotRenderer:iscardTitle,false);
plotRender->setLayoutFlag(QwtPlotRenderer::FrameWithScales,tr ue);
plotRender->setLayoutFlag(QwtPlotRenderer::KeepFrames,true) ;
plotRender->setLayoutFlag(QwtPlotRenderer::KeepMargins,true );
plotRender->renderDocument(plot,"F:/pippo.pdf","pdf",QSizeF(100,150),150);
This code desn't render the axis of the plot!
the axis are defined in the following way:
axis y
// A color bar on the right axis
QwtScaleWidget colorAxis;
colorAxis = axisWidget(QwtPlot::yLeft);
colorAxis->setColorBarEnabled(true);
colorAxis->setColorMap( zInterval, new ColorMap());
colorAxis->setMinBorderDist(10,6);
enableAxis(QwtPlot::yLeft,true);
axis x
QwtScaleWidget *bottomAxis;
enableAxis(QwtPlot::xBottom,true);
bottomAxis = axisWidget(QwtPlot::xBottom);
QTime time;
setAxisScaleDraw(QwtPlot::xBottom, new TimeScaleDraw(time));
setAxisLabelAlignment(QwtPlot::xBottom, Qt::AlignLeft | Qt::AlignBottom);
this is the result:
pippo.pdf
can you help me?
thanks cla
Bookmarks