Results 1 to 4 of 4

Thread: Sticks on plot not working

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

    Default Sticks on plot not working

    I would like to plot vertical stick son my graph.
    I tried according to the documentation:
    Qt Code:
    1. plotEnergy = new QwtPlotCurve();
    2. plotEnergy->attach(this);
    3. plotEnergy->setStyle(QwtPlotCurve::Sticks);
    4. plotEnergy->setBaseline(0);
    5. plotEnergy->setPen(QPen(Qt::black));
    To copy to clipboard, switch view to plain text mode 
    But nothing: the plot still is plotted with lines

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

    Default Re: Sticks on plot not working

    The code is correct, the bug is somewhere on your side.

    Uwe

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

    Default Re: Sticks on plot not working

    You was right.
    Anyway, I have now this question.
    There is a way to put a head on the top of the stick?
    Now I'm doing by making a new Plot, changing its style to Dots, and draw that plot over the sticks. But, in this way I have boring problem in the legend: I cannot have the legend symbol as the plot. For example, I would like to have a legend symbol as a dot+ine, i.e. as the plot.
    Regards

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

    Default Re: Sticks on plot not working

    My fault: it is enough to put a QwtSymbol in the plot:
    plot->setSymbol(s);

Similar Threads

  1. Put plot axis out of the plot
    By KosyakOFF in forum Qwt
    Replies: 7
    Last Post: 21st June 2013, 13:36
  2. Sticks on plot not working
    By giusepped in forum Qwt
    Replies: 0
    Last Post: 10th February 2009, 07:19
  3. Replies: 7
    Last Post: 22nd September 2008, 22:05

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
  •  
Qt is a trademark of The Qt Company.