38579RE: [libertybasic] SINE WAVE
- Jul 1, 2009Could we change the line:
‘print #m , "line 0 0 0 500 "
In the following code by something eles please
WindowWidth = 400
WindowHeight = WindowWidth
UpperLeftX = (DisplayWidth- WindowWidth) /2
UpperLeftY = (DisplayHeight- WindowHeight) /2
open "Graph Plotting" for graphics_nsb as #m
'#m "trapclose [quit]"
#m "color black" 'color of the Coordinates
#m "size 5" 'Size of the Coordinates
#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 "
--- On Wed, 7/1/09, Stefan Pendl <pendl2megabit@...> wrote:
From: Stefan Pendl <pendl2megabit@...>
Subject: RE: [libertybasic] SINE WAVE
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
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.
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
[Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>