Problem with QwtScaleDraw
Hello,there is a simple problem about QwtScaleDraw that need help.
The problem is : I have a plot with the scale of Y axis from 64.789240 to 64.789250 for example,but the lable of Y axis only show 64.7892, 64.7892,64.7892...
How to make the lable show 64.789240 to 64.789250?
Thanksï¼:o
Re: Problem with QwtScaleDraw
Overload: QwtScaleDraw::label( double ) const.
Uwe
Re: Problem with QwtScaleDraw
Quote:
Originally Posted by
Uwe
Overload: QwtScaleDraw::label( double ) const.
Uwe
Thank you very much,Uwe!
I am a Qt beginner.I only know how to set the axis scale.This is a part of my plot code:
ui->qwtplot->setAxisScale(QwtPlot::yLeft,64.789240,64.789250,0 .000001)
Can you tell me more details about how to use QwtScaleDraw to make my plot show the axis scale label correctly.
64.789240-64.789250,not 64.7892-64.7892
Thanks!
Re: Problem with QwtScaleDraw
Quote:
Originally Posted by
kanzaky
Hello,there is a simple problem about QwtScaleDraw that need help.
The problem is : I have a plot with the scale of Y axis from 64.789240 to 64.789250 for example,but the lable of Y axis only show 64.7892, 64.7892,64.7892...
How to make the lable show 64.789240 to 64.789250?
Thanksï¼:o
Uwe,I have know how to make my Y axis lable show normal.
class MyScaleDraw: public QwtScaleDraw
{
public:
virtual QwtText label(double v) const
{
return QString::number(v,'g',8);
}
}
...
ui->qwtPlot->setAxisScaleDraw(QwtPlot::xBottom,new MyScaleDraw());
Thank you!