Results 1 to 2 of 2

Thread: Histogram

  1. #1
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Histogram

    Hi.
    I tried to put a legend in Hisotrgr. Although the legend is displayed, there are no symbols attached to the text in the legend.
    Why?

    Qt Code:
    1. legend = new QwtLegend;
    2.  
    3.  
    4.  
    5. rataPlot = new HistogramItem(tr("Rata"));
    6. rataPlot->attach(qwtPlot);
    7. rataPlot->setColor(Qt::red);
    8.  
    9. rawPlot = new HistogramItem(tr("MOL - Dati grezzi"));
    10. rawPlot->attach(qwtPlot);
    11. rawPlot->setColor(Qt::darkGray);
    12.  
    13. qwtPlot->setCanvasBackground(QColor(Qt::white));
    14.  
    15. qwtPlot->insertLegend(legend,QwtPlot::BottomLegend);
    To copy to clipboard, switch view to plain text mode 

  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: Histogram

    Because the implementation of HistogramItem ( if it is the one from the Qwt examples ) is incomplete. If you want to see more than the text only you have to implement HistogramItem::updateLegend().

    Uwe

Similar Threads

  1. Gradient in histogram
    By giusepped in forum Qwt
    Replies: 1
    Last Post: 1st August 2009, 12:48
  2. Qwt(histogram) in eclipse?
    By kid17 in forum Qwt
    Replies: 1
    Last Post: 29th November 2008, 13:38
  3. How display an histogram?
    By kid17 in forum Qt Programming
    Replies: 3
    Last Post: 24th November 2008, 16:22
  4. Histogram with different colors
    By NoRulez in forum Qwt
    Replies: 1
    Last Post: 14th September 2008, 18:57
  5. Request Qwt histogram design advice
    By goes2bob in forum Qwt
    Replies: 1
    Last Post: 10th April 2008, 11:12

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.