Results 1 to 2 of 2

Thread: Legend manipulation

  1. #1
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Legend manipulation

    Hi,
    In a plot, I have a curve with huge number of points. To make for good printing, i don't show symbols on curves, but rather use markers to show a select few on them.
    There are other curves too. Now I want to show a legend for
    1. Only some of the curves on the plot
    2. with the symbol of markers

    I know this is quite irritating a thing to ask for, but is there a way to do this! I am using Qwt6.
    Thanks in advance!

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

    Default Re: Legend manipulation

    Markers and curves are plot items and for each item you can configure if it is supposed to appear on the legend or not:

    Qt Code:
    1. QwtPlotItem::setItemAttribute( QwtPlotItem::Legend, true/false);
    To copy to clipboard, switch view to plain text mode 
    With reimplementing YourCurve::drawLegendIdentifier() you can display your marker symbol.

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    pkj (17th March 2011)

Similar Threads

  1. Replies: 6
    Last Post: 8th September 2010, 22:48
  2. Text Manipulation.
    By suneel1310 in forum Qt Programming
    Replies: 7
    Last Post: 26th July 2010, 11:07
  3. Sending over UDP - Binary Manipulation
    By Cotlone in forum Newbie
    Replies: 6
    Last Post: 9th June 2010, 10:24
  4. Replies: 4
    Last Post: 8th May 2010, 12:40
  5. QString manipulation - QRegExp
    By mattia in forum Newbie
    Replies: 1
    Last Post: 18th March 2008, 12:21

Tags for this Thread

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.