Changeset 13479 for trunk/Ohana/src/relastro
- Timestamp:
- May 22, 2007, 12:23:09 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/relastro/src/plotstuff.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relastro/src/plotstuff.c
r12892 r13479 21 21 int open_graph (int N) { 22 22 23 Xgraph[N] = KiiOpen ("kapa", NULL); 23 char name[100]; 24 25 sprintf (name, "gastro [%d]", N); 26 Xgraph[N] = KapaOpen ("kapa", name); 27 24 28 if (Xgraph[N] < 0) { 25 29 fprintf (stderr, "error starting kapa\n"); … … 59 63 if (Xgraph[N] < 1) if (!open_graph(N)) return; 60 64 61 KapaClear (Xgraph[N], TRUE);65 KapaClearSections (Xgraph[N]); 62 66 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); 75 68 return; 76 69 } … … 83 76 } 84 77 85 void PlotVector (int Npts, double *vect, int mode, int N ) {78 void PlotVector (int Npts, double *vect, int mode, int N, char *type) { 86 79 87 80 float *values; … … 95 88 } 96 89 97 Nbytes = Npts * sizeof (float); 98 write (Xgraph[N], values, Nbytes); 90 KapaPlotVector (Xgraph[N], Npts, values, type); 99 91 free (values); 100 92 return; … … 123 115 124 116 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"); 127 119 if (label != NULL) PlotLabel (label, 0); 128 120 DonePlotting (graphdata, 0);
Note:
See TracChangeset
for help on using the changeset viewer.
