home *** CD-ROM | disk | FTP | other *** search
- /* Demonstrates multiple windows */
-
- #include "plplot.h"
- #include <stdio.h>
- #include <math.h>
-
- main()
- {
- PLINT i,j;
- PLFLT vmin,vmax;
- char text[3];
-
- /* Divide screen into 16 regions */
- plstar(4,4);
- plschr((PLFLT)0.0,(PLFLT)3.5);
- plfont(4);
-
- for (i=0; i<=15; i++) {
- plcol(i/4+1);
- sprintf(text,"%d",i);
- pladv(0);
- vmin = 0.1;
- vmax = 0.9;
- for (j=0; j<=2; j++) {
- plwid(j+1);
- plvpor(vmin,vmax,vmin,vmax);
- plwind((PLFLT)0.0,(PLFLT)1.0,(PLFLT)0.0,(PLFLT)1.0);
- plbox("bc",(PLFLT)0.0,0,"bc",(PLFLT)0.0,0);
- vmin = vmin + 0.1;
- vmax = vmax - 0.1;
- }
- plwid(1);
- plptex((PLFLT)0.5,(PLFLT)0.5,(PLFLT)1.0,(PLFLT)0.0,(PLFLT)0.5,text);
- }
-
- plend();
- }
-
-