Skip to ContentSkip to Navigation
Society/business Center for Information Technology Research and Innovation Support Virtual Reality and Visualisation

Basic graph

								

/* KOMPLOT basic graph in C/C++  */

#include <stdio.h>
#include <math.h>
#include "komplot.h"

int main()
{
 float x[20], y[20];
 int i;

 frame(10, 0, 10, 8, 0, 100, "xlabel", "ylabel", "basic graph");
 for(i=1 ; i < 21 ; i++)
  {
   x[i-1]=i;
   y[i-1]=i*i;
  }
 markers("points of y = x*x", 20, x, y, 17);
 curve("curve interpolated through points ",20, x, y);

 printf (" >>>>>> This program generated KOMPLOT.TMP\n");
 printf (" >>>>>> KOMPLOT.TMP is inputfile for komplot\n");

/*
 komplot(40,"bg.ps");
 system("ghostscript bg.ps"); 
*/
 return 0;

}

							
Last modified:02 October 2015 10.22 p.m.