Skip to ContentSkip to Navigation
Maatschappij/bedrijvenCentrum voor Informatie TechnologieResearch and Innovation SupportVirtual Reality en Visualisatie

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;

}

							
Laatst gewijzigd:02 oktober 2015 22:22