Results 1 to 4 of 4

Thread: NEED HELP: GSL with QWT

  1. #1
    Join Date
    Oct 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default NEED HELP: GSL with QWT

    Hi All. I'm new with qwt library, and now I'm having big troubles with next problem:
    I have a gsl_matrix *My_matrix object, and realy haven't idea and understanding how plot it...(I need something like Scatter plot screenshot in qwt web site from my gsl_matrix).
    How I have read firstly I need to create a QwtPlot *My_Plot and QwtPlotCurve *My_Curve objects. And after that I must set data into the curve...But If I right understand curve have two ways of data settings:
    1) setRawData (const double * xData, const double *yData, int size)
    And i dont understand what this function mean (is xData just simple value (and if its true how set array of data) or xData is array, and in this case I don't understand how transfer data from my gsl_matrix here (probably it is possible wiyh using matrix_view but I dont know how))
    2) using setData(const double *xData, const double *yData, int size) which is also not simple for me cause I'have not idea how...

    Please explain me how deside my problem. TIA

  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: NEED HELP: GSL with QWT

    The only way to connect values to a curve is to use a QwtData object. All other QwtPlotCurve::setData() methods are convenience functions, that create an internal QwtData object.

    So subclass QwtData and implement the virtual methods as a bridge to your matrix. Note that YourData::copy() only needs to copy the bridge - not the matrix itsself.

    Uwe

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: NEED HELP: GSL with QWT

    Are you mean that I need doing something like that:

    QwtData *My_data = new QwtData();
    My_data -> copy( My_gsl_matrix);

    ??? sorry about misunderstuding?

  4. #4
    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: NEED HELP: GSL with QWT

    QwtData is an interface only - the functionality behind is implemented in derived classes. ( like QAbstractItemModel ). If you don't know the concept of abstract interfaces please have a look in your OO bible.

    Uwe

Similar Threads

  1. QWT doesnt show any windows
    By Cal in forum Qwt
    Replies: 5
    Last Post: 30th June 2009, 17:05
  2. qwt 5.2 install on qt 4.5
    By HyperB in forum Qwt
    Replies: 4
    Last Post: 13th May 2009, 20:03
  3. Step by step Qwt on MinGW
    By Doug Broadwell in forum Qwt
    Replies: 2
    Last Post: 23rd January 2009, 00:19
  4. How to upgrade Qwt 5.0.1 to Qwt 5.0.2
    By luffy27 in forum Qwt
    Replies: 1
    Last Post: 15th July 2007, 19:55
  5. use interesting QWT Library with QT3.X
    By raphaelf in forum Qwt
    Replies: 2
    Last Post: 23rd January 2006, 11:24

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.