Announcement

Collapse
No announcement yet.

Create a plot with dynamic scale

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Create a plot with dynamic scale

    Hi everyone,

    I want to draw a plot from two series of data, but the user needs to enter the range of the X and Y axes in a previous query. Is it possible?

    Thanks

  • #2
    Hello

    Do you need to do this with the scope widget or are you creating your own in the designer environment ? Also how is the value for X and Y entered ?

    Best regards

    Paul

    Comment


    • #3
      Hi Paul,

      My initial idea is to create a first window in the display, with two objects where the user can enter the maximum values for X and Y (e.g. 2 slider bars or options menu). Then these values will be use to build the axes of the graph to display in the next window. The data to fill the graph are collected as 2 series of data intially storage in the SD card (previously saved from an external microcontroller which takes them from analog sensors).

      Comment


      • #4
        Hello,

        The simplest way to do it would be to use PutPixel as a plot eg.

        gfx_PutPixel(x, y, color);

        You would have to calculate the x and y cordinates relative to the position n the scale and also the range. I don't think we have any examples for this for you to get ideas from.

        I hope this helps

        Best regards

        Paul

        Comment

        Working...
        X