Source code for line graphing 
Author Message
 Source code for line graphing

Does anyone have source code for drawing a line graph
in pixels so one can have 100's of points.  The commercial
programs I have tried are all very limited as to the number
of data points they can plot.

Alan



Fri, 26 Mar 1999 03:00:00 GMT  
 Source code for line graphing

Quote:

> Does anyone have source code for drawing a line graph
> in pixels so one can have 100's of points.  The commercial
> programs I have tried are all very limited as to the number
> of data points they can plot.

> Alan

        To plot a point, just to this:

Switch to a graphics mode (screen 7 & screen 13 can support 360x200
points, screen 12 640x480, and screen 9 640x200).

just do this:
SCREEN x        'x = whatever mode you want, look above.
PSET (x,y),color        'x & y are the x and y positions of the point,      
                        '"color" is a number from 1 to 15.

Here's an example:

SCREEN 12
PSET (320,240),12

That code will put a red 'point' at those co-ordinates (Which happens to
be the middle of that particular screen.).. I hope that answers your
question, If not, I just sounded like a real dork :)




Sat, 27 Mar 1999 03:00:00 GMT  
 Source code for line graphing

Quote:


> > Does anyone have source code for drawing a line graph
> > in pixels so one can have 100's of points.  The commercial
> > programs I have tried are all very limited as to the number
> > of data points they can plot.

> > Alan

>         To plot a point, just to this:

> Switch to a graphics mode (screen 7 & screen 13 can support 360x200
> points, screen 12 640x480, and screen 9 640x200).

Whoops!  I think you mean *320*x200, not 360x200 for screens 7 and 13.  
Also, screen mode 13h supports higher resolutions using ModeX, but that's
a different thing entirely.

Quote:

> just do this:
> SCREEN x        'x = whatever mode you want, look above.
> PSET (x,y),color        'x & y are the x and y positions of the point,
>                         '"color" is a number from 1 to 15.

Two somewhat petty corrections.  :-)

No. 1.  Screen modes 7, 8, 9, and 12 are 16 color modes.  That means that
you can use colors 0-15 not 1-15.

Also.  Screen mode 13h allows 256 colors, so you aren't limited to colors
0-15, but rather you have colors 0-255.

-Jesse

Quote:
> Here's an example:

> SCREEN 12
> PSET (320,240),12

> That code will put a red 'point' at those co-ordinates (Which happens to
> be the middle of that particular screen.).. I hope that answers your
> question, If not, I just sounded like a real dork :)



--
====================================
Very funny Scotty!
Now beam down my clothes!
====================================


Sat, 27 Mar 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Crystal Report Graph Problem (No Zero and No Lines attached in Line Graph)

2. Setting reports graph source in code

3. Wanted: VB source code of graphing data

4. VB3 Graph Control for Line graph

5. Visual Basic source-code to C++ source-code

6. Visual Basic source-code to C++ source-code

7. Visual Basic source-code to C++ source-code

8. VB.NET Source Code Line Delimiter

9. Thousands of lines of FREE vb source code!!!

10. Split VB source code in 2 lines

11. VB Source Code Line Numbering

12. error line source code

 

 
Powered by phpBB® Forum Software