Results 1 to 3 of 3

Thread: Anyone used a plot function???

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Posts
    85

    Anyone used a plot function???

    Hi all
    I am trying to figure out how to plot a graph. I allready know how to do a TREND ( from right to left across the picture box) but I now need to find out how to do a plot from left to right, where you are able to see the plot building up as the inputs come in.

    I hope you can understand what I am trying to do.

  2. #2
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    This should work

    VB Code:
    1. Dim X As Integer
    2. Dim Y As Integer
    3.  
    4. For X = 0 To Picture1.ScaleWidth
    5.     For Y = 0 To Picture1.ScaleHeight
    6.         SetPixelV Picture1.hDC, X, Y, vbBlack 'from left to right
    7.         SetPixelV Picture1.hDC, Picture1.ScaleWidth - X, Y, vbBlack 'from right to left
    8.     Next
    9. Next
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  3. #3
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    btw...
    that code fills the picture, but the main thing is the Picture1.ScaleWidth - X code that does the same thing, but backwards
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width