{
...
virtual QwtText label
( double value
) const {
if ( value == 0.0 )
return "ABB";
if ( value == 1.0 )
return "BCC";
...
};
plot
->setAxisScale
(QwtPlot::xBottom,
0.0,
6.0,
1.0);
plot
->setAxisMaxMinor
(QwtPlot::xBottom,
0);
plot
->setAxisScaleDraw
(QwtPlot::xBottom,
new YourScaleDraw
());
class YourScaleDraw: public QwtScaleDraw
{
...
virtual QwtText label( double value) const
{
if ( value == 0.0 )
return "ABB";
if ( value == 1.0 )
return "BCC";
...
return QwtScaleDraw::label(value);
};
plot->setAxisScale(QwtPlot::xBottom, 0.0, 6.0, 1.0);
plot->setAxisMaxMinor(QwtPlot::xBottom, 0);
plot->setAxisScaleDraw(QwtPlot::xBottom, new YourScaleDraw());
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks