home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 344b.lha / plplot_v2.6 / examples / example05.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-27  |  385 b   |  23 lines

  1. /* Test of drawing a histogram */
  2.  
  3. #include "plplot.h"
  4. #include <math.h>
  5.  
  6. main()
  7. {
  8.    int i;
  9.    static float data[2048];
  10.  
  11.    /* Fill up data points */
  12.  
  13.    for (i=0; i<2048; i++)
  14.      data[i]=sin(0.01*(i+1));
  15.  
  16.    plstar(1,1);
  17.    plhist(2048,data,-1.1,1.1,44,0);
  18.    pllab("#frValue","#frFrequency",
  19.             "#frPLPLOT Example 5 - Probability function of Oscillator");
  20.  
  21.    plend();
  22. }
  23.