ftp.nice.ch/pub/next/unix/developer/plplot.3.0.s.tar.gz#/plplot/examples/example02.c

This is example02.c in view mode; [Download] [Up]

/* Demonstrates multiple windows */

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

main()
{
  int i,j;
  double vmin,vmax;
  char text[3];

  /* Divide screen into 16 regions */
  plstar(4,4);
  plschr(0.0,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(0.0,1.0,0.0,1.0);
      plbox("bc",0.0,0,"bc",0.0,0);
      vmin = vmin + 0.1;
      vmax = vmax - 0.1;
    }
    plwid(1);
    plptex(0.5,0.5,1.0,0.0,0.5,text);
  }
  plend();
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.