home *** CD-ROM | disk | FTP | other *** search
-
- # include <math.h>
- # include <stdlib.h>
- # include <stdio.h>
- # include <graph.h>
- # include <string.h>
- # include "hpplot.h"
- # include "worlddr.h"
- # include "segraph.h"
-
-
- extern BlackAndWhite;
-
- float frand(){
- float r;
- int i;
- i = rand();
- r = i;
- r = r / 32767.0;
- return(r);
- }
-
- void main()
-
- {
- int wc,i,grcolor,err;
- float xdata[52];
- float ydata[52];
- char ch;
-
- for (i = 0; i <= 20; i++ ){
- xdata[i] = i;
- ydata[i] = xdata[i]*xdata[i];
- wc = 1;
- }
-
- SortDataX(xdata,ydata,20,1);
- /****************************************************
- - IF YOU WANT TO CONFIGURE FOR CGA 4 COLORS
- CHOOSE InitSEGraphics(1);
- - HERCULES SUPPORT IS NOW INCLUDED IN MICROSOFT
- C VERSION 5.1. IF YOU WANT TO USE THE
- HERCULES DRIVER YOU MUST FIRST INSTALL
- MSHERC.COM FROM DOS BY TYPING
- msherc<enter>
- THEN IN YOUR MAIN PROGRAM CALL
- InitSEGraphics(12);
- - REFER TO THE README.DOC FILE - PART 3
- INCLUDED IN YOUR MICROSOFT C 5.1 COMPILER
- FOR DETAILS ON ADDED HERCULES SUPPORT.
- **************************************************/
-
- InitSEGraphics(6);
- for (wc = 1; wc <= 6 ; wc++ ){
- SetCurrentWindow(wc);
- ClearWindow();
- if (BlackAndWhite == 0)
- SetViewBackground(14);
- SetAxesType(0,0);
- SelectColor(1);
- AutoAxes(xdata,ydata,10,0);
- BorderCurrentWindow(wc);
- LinePlotData(xdata, ydata, 10, 4,0);
- TitleWindow("Hair Growth Study");
- TitleXAxis("Before/After Injections");
- TitleYAxis("Hair inches/wk.");
- getch();
- ClearWindow();
- }
- CloseSEGraphics();
-
- }
-
-
-