Results 1 to 4 of 4

Thread: Problem with QwtScaleDraw

  1. #1

    Default 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. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,241
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Problem with QwtScaleDraw

    Overload: QwtScaleDraw::label( double ) const.

    Uwe

  3. #3

    Default Re: Problem with QwtScaleDraw

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

  4. #4

    Default Re: Problem with QwtScaleDraw

    Quote Originally Posted by kanzaky View Post
    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!

Similar Threads

  1. LayoutDirectoin of QwtScaleDraw
    By jesse_mark in forum Qwt
    Replies: 1
    Last Post: 2nd November 2012, 07:31
  2. Replies: 9
    Last Post: 5th September 2012, 16:05
  3. Refreshing a Custom QwtScaleDraw
    By grantbj74 in forum Qwt
    Replies: 6
    Last Post: 28th March 2012, 05:20
  4. Replies: 1
    Last Post: 13th October 2011, 16:52
  5. Replies: 1
    Last Post: 14th October 2010, 18:56

Bookmarks

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.