Changeset 13479 for trunk/Ohana/src/opihi/lib.data/PlotVectors.c
- Timestamp:
- May 22, 2007, 12:23:09 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.data/PlotVectors.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.data/PlotVectors.c
r10795 r13479 1 1 # include "display.h" 2 2 3 static int Xgraph; 3 int PlotVectorPair (int kapa, int Npts, float *xValues, float *yValues, Graphdata *graphmode) { 4 4 5 int PrepPlotting (int Npts, Graphdata *graphmode) { 5 KapaPrepPlot (kapa, Npts, graphmode); 6 KapaPlotVector (kapa, Npts, xValues, "x"); 7 KapaPlotVector (kapa, Npts, yValues, "y"); 6 8 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);21 9 return (TRUE); 22 10 } 23 11 24 int PlotVector (int Npts, float *values) {12 int PlotVectorTriplet (int kapa, int Npts, float *xValues, float *yValues, float *zValues, Graphdata *graphmode) { 25 13 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"); 27 18 28 Nbytes = Npts * sizeof (float);29 write (Xgraph, values, Nbytes);30 19 return (TRUE); 31 20 } 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.
