Results 1 to 2 of 2

Thread: Set axis title on the right side

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    157
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Set axis title on the right side

    I tried to set an extra Title on the right side:
    Qt Code:
    1. qwtPlot->setAxisTitle(QwtPlot::yLeft, "Gain");
    2. qwtPlot->setAxisTitle(QwtPlot::yRight, "Energy");
    To copy to clipboard, switch view to plain text mode 
    I can see however only the axis title on the left side.
    Is this code wrong ?

    Matthias

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Set axis title on the right side

    You also have to enable the axis to the right:
    Qt Code:
    1. plot->enableAxis(QwtPlot::yRight);
    To copy to clipboard, switch view to plain text mode 

    HTH,
    Uwe

Similar Threads

  1. Replies: 5
    Last Post: 15th February 2008, 02:54

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.