Results 1 to 3 of 3

Thread: How to hide legend for only one curve?

  1. #1
    Join Date
    Jun 2012
    Posts
    7
    Thanks
    2

    Default How to hide legend for only one curve?

    Hi,

    I have several curves on a plot. But I only need to show some curves' line type or symbol in legend, not all of them. So I have to hide some curve legend.

    I have tried QwtLegend::remove. But dosen't work.

    I appreciate if you can help.

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

    Default Re: How to hide legend for only one curve?

    Qt Code:
    1. curve->setItemAttribute( QwtPlotItem::Legend, true/false );
    To copy to clipboard, switch view to plain text mode 
    Uwe

  3. #3
    Join Date
    Jun 2012
    Posts
    7
    Thanks
    2

    Default Re: How to hide legend for only one curve?

    It works. Thank you, Uwe
    Have a great day!

Similar Threads

  1. Replies: 3
    Last Post: 3rd February 2014, 17:04
  2. connect 1 legend item and 2 curve
    By ruzik in forum Qwt
    Replies: 1
    Last Post: 13th September 2011, 11:21
  3. Replies: 5
    Last Post: 7th February 2011, 08:38
  4. Drawing curve legend
    By lni in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 03:42
  5. Replies: 3
    Last Post: 22nd January 2010, 16:46

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.