Results 1 to 2 of 2

Thread: Help: Multiple Colours in one Qwt Curve

  1. #1
    Join Date
    Mar 2008
    Posts
    1
    Thanks
    1

    Default Help: Multiple Colours in one Qwt Curve

    Hi,

    I am doing a realtime plotting of the graph.
    However, I want to plot different colours from point a to point b during certain intervals.

    Do I use the function below or?
    virtual void draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const

    Thanks in advance
    Wis

  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: Help: Multiple Colours in one Qwt Curve

    You have to overload QwtPlotCurve::drawCurve and QwtPlotCurve::drawSymbols. Here you can split your paint operation, and assign different colors to your painter/symbol before you call the methods of the base class for each interval.

    Uwe

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

    Wisley (14th March 2008)

Similar Threads

  1. Replies: 4
    Last Post: 25th October 2007, 12:23

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.