Loading ...
Sorry, an error occurred while loading the content.

38579RE: [libertybasic] SINE WAVE

Expand Messages
  • Henrik
    Jul 1, 2009
    • 0 Attachment
      Could we change the line:
      ‘print #m , "line 0 0 0 500 "
      In the following code by something eles please

      The code
      WindowWidth = 400
      WindowHeight = WindowWidth
      UpperLeftX = (DisplayWidth- WindowWidth) /2
      UpperLeftY = (DisplayHeight- WindowHeight) /2
      open "Graph Plotting" for graphics_nsb as #m
      '#m "trapclose [quit]"
      #m "down"
      #m "color black"    'color of the Coordinates
      #m "size 5"         'Size of the Coordinates
      #m "home"
      #m "posxy CenterX CenterY"
      #m "line 0 "; CenterY; " "; CenterX * 2; " "; CenterY   'the line of X axis
      '#m "line "; CenterX; " 0 "; CenterX; " "; CenterY * 2   'the line of Y axis
      print #m , "line 0 0 0 500 "
      #m "flush"
      close #m
      --- On Wed, 7/1/09, Stefan Pendl <pendl2megabit@...> wrote:

      From: Stefan Pendl <pendl2megabit@...>
      Subject: RE: [libertybasic] SINE WAVE
      To: libertybasic@yahoogroups.com
      Date: Wednesday, July 1, 2009, 6:04 AM

      > Thanks,Could you please clear it how to move the Y axis from
      > the center to the left side.

      The top-left-hand corner of a graphics control is the origin (0/0).

      Using the HOME and POSXY graphics methods, gives us the center of the graphics control, so we can display any graph in the four
      Cartesian quadrants.

      If you only like to display the positive X-axis, just do not base the display values on CenterX and start at zero.

      The X-axis of my examples is from left to right, the Y-axis from top to bottom.

      Stefan Pendl

      Liberty BASIC Assist 4.03 ........ http://www.libertyb asic.com/ assist.html
      Liberty BASIC 4.04 public beta ... http://www.libertyb asic.com/ lb404b3setup. exe

      Windows Vista Home Premium 32-bit SP2
      AMD Turion X2 RM-70 2GHz
      4GB RAM

      [Non-text portions of this message have been removed]
    • Show all 19 messages in this topic