/* program to test KOMPLOT functions in C */
#include <stdio.h>
#include <math.h>
#include "komplot.h"
int main()
{
float x[10], y[10];
float xb[]={1, 6, 6, 1};
float yb[]={1, 1, 4, 4};
int i;
/* parameter_dump_short(1);
parameter_dump_short(1);
*/
/* MIND the single quotes of the switch character $ */
font_switch_character('$');
/* define fonts, default = Times-Roman */
ps_define_font("A", "Times-Roman");
ps_define_font("B", "Helvetica");
ps_define_font("C", "Symbol");
ps_background(0.95);
gridlines(1,1);
ps_grid_attributes(0.04, 1);
suppress_ticks(1,1);
suppress_axislines(1,1);
clip_at_axes(1);
ps_frame_attributes(0.04, 0);
frame(10, 0, 10, 10, 0, 10,"$BXlabel$A","$BYlabel$A", "$BPostScript features$A");
for(i=1 ; i < 11 ; i++)
{
x[i-1]=i;
y[i-1]=0.1*i*i;
}
ps_graph_attributes(0.2, 0.5);
polyline(" ",10,x,y);
for(i=1 ; i < 11 ; i++)
y[i-1]=0.1*i*i + 1.0;
ps_graph_attributes(0.1, 0);
line_style_nr(2);
polyline(" ",10,x,y);
ps_graph_attributes(0.02, 1);
ps_fill_area(" ", 4,xb, yb);
ps_graph_attributes(0.02, 0);
gstrng(2,3,0.4, 0,"C");
gstrng(999, 2.9, -0.3, 0, "2" );
gstrng(999, 3, -0.4, 0, "H");
gstrng(999, 2.9, -0.3, 0, "5" );
gstrng(2, 2, -0.3, 0, "$Ca$A = 1.0 , $CF$A = 2.0");
printf (" >>>>>> This program generated KOMPLOT.TMP\n");
printf (" >>>>>> KOMPLOT.TMP is inputfile for komplot\n");
/*
gstrng(2, 2, -0.3, 0, "$Ma$A = 1.0 , $MF$A = 2.0");
komplot(40,"psf.ps");
system("xv psf.ps");
*/
return 0;
}