Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. [Qwt-Plot]How can I set the samples to fit data structures ?

[Qwt-Plot]How can I set the samples to fit data structures ?

Scheduled Pinned Locked Moved 3rd Party Software
4 Posts 3 Posters 2.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aCOSwt
    wrote on last edited by
    #1

    If I correctly understand the documentation of set(Raw)Samples, the arguments given suggest that they must fit a declaration of the kind :
    @double X[SIZE],Y[SIZE];@
    I mean that consecutive X are consecutive in memory.
    Is there a way to setSamples according to the following declaration:
    @typedef struct{
    double X;
    double Y;}
    DATA;

    DATA curve[SIZE];@
    I mean to define some series when consecutive X (and Y) are offset by sizeof(DATA); ?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      What you are referring to is not the general case of set(Raw)Samples.
      Use "QPlotCurve::setSamples":http://qwt.sourceforge.net/class_qwt_plot_curve.html#a67b24f3663484ff5e973a288c6071b2a
      AFAIK this refers to the more common usage within QWT .

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        QT PROFESSIONAL
        wrote on last edited by
        #3

        Ответ прост-размер графика

        Windows 8 qt for Nokia N 8-00

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aCOSwt
          wrote on last edited by
          #4

          [quote author="koahnig" date="1379584558"]What you are referring to is not the general case of set(Raw)Samples.
          Use "QPlotCurve::setSamples":http://qwt.sourceforge.net/class_qwt_plot_curve.html#a67b24f3663484ff5e973a288c6071b2a
          AFAIK this refers to the more common usage within QWT . [/quote]
          If I understand correctly, you advise to use QVectors.
          Hmm... I fear this to be far too "heavy" for what I want.
          Thanks anyway for helping.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved