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/relastro/src/plotstuff.c

    r12892 r13479  
    2121int open_graph (int N) {
    2222
    23   Xgraph[N] = KiiOpen ("kapa", NULL);
     23  char name[100];
     24
     25  sprintf (name, "gastro [%d]", N);
     26  Xgraph[N] = KapaOpen ("kapa", name);
     27
    2428  if (Xgraph[N] < 0) {
    2529    fprintf (stderr, "error starting kapa\n");
     
    5963  if (Xgraph[N] < 1) if (!open_graph(N)) return;
    6064
    61   KapaClear (Xgraph[N], TRUE);
     65  KapaClearSections (Xgraph[N]);
    6266
    63   KiiSendCommand (Xgraph[N], 4, "PLOT");
    64  
    65   /* send Xgraph the plot details */
    66   KiiSendMessage (Xgraph[N], "%8d %8d %d %d %d %d %d %f %f",
    67                   Npts, graphmode[0].style,
    68                   graphmode[0].ptype, graphmode[0].ltype,
    69                   graphmode[0].etype, graphmode[0].ebar, graphmode[0].color,
    70                   graphmode[0].lweight, graphmode[0].size);
    71   KiiSendMessage (Xgraph[N], "%g %g %g %g",
    72                   graphmode[0].xmin, graphmode[0].xmax,
    73                   graphmode[0].ymin, graphmode[0].ymax);
    74 
     67  KapaPrepPlot (Xgraph[N], Npts, graphmode);
    7568  return;
    7669}
     
    8376}
    8477
    85 void PlotVector (int Npts, double *vect, int mode, int N) {
     78void PlotVector (int Npts, double *vect, int mode, int N, char *type) {
    8679
    8780  float *values;
     
    9588  }
    9689
    97   Nbytes = Npts * sizeof (float);
    98   write (Xgraph[N], values, Nbytes);
     90  KapaPlotVector (Xgraph[N], Npts, values, type);
    9991  free (values);
    10092  return;
     
    123115
    124116  PrepPlotting (N, graphdata, 0);
    125   PlotVector (N, xlist, 0, 0);
    126   PlotVector (N, ylist, 1, 0);
     117  PlotVector (N, xlist, 0, 0, "x");
     118  PlotVector (N, ylist, 1, 0, "y");
    127119  if (label != NULL) PlotLabel (label, 0);
    128120  DonePlotting (graphdata, 0);
Note: See TracChangeset for help on using the changeset viewer.