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

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

#include "plplot.h"

/* Plots single horizontal error bar */
static void plerx1(xmin,xmax,y)
double xmin, xmax, y;
{
      double mindef, minht, xpmm, ypmm;
      int yminor;

      gmin(&mindef,&minht);
      gpixmm(&xpmm,&ypmm);
      yminor = MAX(1.0,minht*ypmm);
      movwor(xmin,y);
      plxtik(wcpcx(xmin),wcpcy(y),yminor,yminor);
      drawor(xmax,y);
      plxtik(wcpcx(xmax),wcpcy(y),yminor,yminor);
}

/* Plots horizontal error bars (xmin[i],y[i]) to (xmax[i],y[i]) */
void plerrx(n,xmin,xmax,y)
int n;
FLOAT *xmin, *xmax, *y;
{
      int level;
      short i;

      glev(&level);
      if (level < 3) plexit("Please set up window before calling plerrx.");
      for (i=0;i<n;i++)
        plerx1(xmin[i],xmax[i],y[i]);
}

/* Plots single vertical error bar */
static void plery1(x,ymin,ymax)
double x, ymin, ymax;
{
      double mindef, minht, xpmm, ypmm;
      int xminor;

      gmin(&mindef,&minht);
      gpixmm(&xpmm,&ypmm);
      xminor = MAX(1.0,minht*xpmm);
      movwor(x,ymin);
      plytik(wcpcx(x),wcpcy(ymin),xminor,xminor);
      drawor(x,ymax);
      plytik(wcpcx(x),wcpcy(ymax),xminor,xminor);
}

/* Plots vertical error bars (x,ymin(i)) to (x(i),ymax(i)) */
void plerry(n,x,ymin,ymax)
int n;
FLOAT *x, *ymin, *ymax;
{
      int level;
      short i;

      glev(&level);
      if (level < 3) plexit("Please set up window before calling plerry.");
      for(i=0; i<n; i++)
        plery1(x[i],ymin[i],ymax[i]);
}

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