1. Beginner
Join Date
Apr 2013
Posts
3

## 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ï¼

2. Uwe
Expert
Join Date
Feb 2006
Location
Munich, Germany
Posts
3,233
Thanked 856 Times in 805 Posts
Qt products
Platforms

Uwe

3. Beginner
Join Date
Apr 2013
Posts
3

## Re: Problem with QwtScaleDraw

Originally Posted by Uwe
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!

4. Beginner
Join Date
Apr 2013
Posts
3

## Re: Problem with QwtScaleDraw

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ï¼
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!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.