IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 22, 2007, 12:23:09 PM (19 years ago)
Author:
eugene
Message:

upgrading to kapa 2.0 API, upgrades to dvo user interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.data/PlotVectors.c

    r10795 r13479  
    11# include "display.h"
    22
    3 static int Xgraph;
     3int PlotVectorPair (int kapa, int Npts, float *xValues, float *yValues, Graphdata *graphmode) {
    44
    5 int PrepPlotting (int Npts, Graphdata *graphmode) {
     5  KapaPrepPlot (kapa, Npts, graphmode);
     6  KapaPlotVector (kapa, Npts, xValues, "x");
     7  KapaPlotVector (kapa, Npts, yValues, "y");
    68
    7   if (!GetGraph (NULL, &Xgraph, NULL)) return (FALSE);
    8  
    9   /* tell kapa to look for the incoming image */
    10   KiiSendCommand (Xgraph, 4, "PLOT");
    11  
    12   /* send Xgraph the plot details */
    13   KiiSendMessage (Xgraph, "%8d %8d %d %d %d %d %d %f %f",
    14                   Npts, graphmode[0].style,
    15                   graphmode[0].ptype, graphmode[0].ltype,
    16                   graphmode[0].etype, graphmode[0].ebar, graphmode[0].color,
    17                   graphmode[0].lweight, graphmode[0].size);
    18   KiiSendMessage (Xgraph, "%g %g %g %g",
    19                   graphmode[0].xmin, graphmode[0].xmax,
    20                   graphmode[0].ymin, graphmode[0].ymax);
    219  return (TRUE);
    2210}
    2311
    24 int PlotVector (int Npts, float *values) {
     12int PlotVectorTriplet (int kapa, int Npts, float *xValues, float *yValues, float *zValues, Graphdata *graphmode) {
    2513
    26   int Nbytes;
     14  KapaPrepPlot   (kapa, Npts, graphmode);
     15  KapaPlotVector (kapa, Npts, xValues, "x");
     16  KapaPlotVector (kapa, Npts, yValues, "y");
     17  KapaPlotVector (kapa, Npts, zValues, "z");
    2718
    28   Nbytes = Npts * sizeof (float);
    29   write (Xgraph, values, Nbytes);
    3019  return (TRUE);
    3120}
    32 
    33 int PlotVectorPair (int N, float *xValues, float *yValues, Graphdata *graphmode) {
    34 
    35     PrepPlotting (N, graphmode);
    36     PlotVector (N, xValues);
    37     PlotVector (N, yValues);
    38 
    39     return (TRUE);
    40 }
    41 
    42 int PlotVectorTriplet (int N, float *xValues, float *yValues, float *zValues, Graphdata *graphmode) {
    43 
    44     PrepPlotting (N, graphmode);
    45     PlotVector (N, xValues);
    46     PlotVector (N, yValues);
    47     PlotVector (N, zValues);
    48 
    49     return (TRUE);
    50 }
    51 
    52 /* we don't use GetGraph in PlotVector because it flushes the connection */
Note: See TracChangeset for help on using the changeset viewer.