00001 00002 /*-------------------------------------------------------------------------*/ 00016 /*--------------------------------------------------------------------------*/ 00017 00018 /* 00019 $Id: gnuplot_i.h,v 1.11 2003/01/27 08:58:04 ndevilla Exp $ 00020 $Author: ndevilla $ 00021 $Date: 2003/01/27 08:58:04 $ 00022 $Revision: 1.11 $ 00023 */ 00024 00025 #ifndef _GNUPLOT_PIPES_H_ 00026 #define _GNUPLOT_PIPES_H_ 00027 00028 /*--------------------------------------------------------------------------- 00029 Includes 00030 ---------------------------------------------------------------------------*/ 00031 #include <stdio.h> 00032 00034 #define GP_MAX_TMP_FILES 64 00035 00036 /*--------------------------------------------------------------------------- 00037 New Types 00038 ---------------------------------------------------------------------------*/ 00039 00040 /*-------------------------------------------------------------------------*/ 00053 /*-------------------------------------------------------------------------*/ 00054 00055 typedef struct _GNUPLOT_CTRL_ { 00057 FILE * gnucmd ; 00058 00060 int nplots ; 00062 char pstyle[32] ; 00063 00065 char* tmp_filename_tbl[GP_MAX_TMP_FILES] ; 00067 int ntmp ; 00068 } gnuplot_ctrl ; 00069 00070 /*--------------------------------------------------------------------------- 00071 Function ANSI C prototypes 00072 ---------------------------------------------------------------------------*/ 00073 00074 00075 /*-------------------------------------------------------------------------*/ 00086 /*--------------------------------------------------------------------------*/ 00087 gnuplot_ctrl * gnuplot_init(void); 00088 00089 /*-------------------------------------------------------------------------*/ 00100 /*--------------------------------------------------------------------------*/ 00101 void gnuplot_close(gnuplot_ctrl * handle); 00102 00103 /*-------------------------------------------------------------------------*/ 00126 /*--------------------------------------------------------------------------*/ 00127 void gnuplot_cmd(gnuplot_ctrl * handle, char const * cmd, ...); 00128 00129 /*-------------------------------------------------------------------------*/ 00149 /*--------------------------------------------------------------------------*/ 00150 void gnuplot_setstyle(gnuplot_ctrl * h, char * plot_style); 00151 00152 /*-------------------------------------------------------------------------*/ 00161 /*--------------------------------------------------------------------------*/ 00162 void gnuplot_set_xlabel(gnuplot_ctrl * h, char * label); 00163 00164 00165 /*-------------------------------------------------------------------------*/ 00174 /*--------------------------------------------------------------------------*/ 00175 void gnuplot_set_ylabel(gnuplot_ctrl * h, char * label); 00176 00177 /*-------------------------------------------------------------------------*/ 00186 /*--------------------------------------------------------------------------*/ 00187 void gnuplot_resetplot(gnuplot_ctrl * h); 00188 00189 /*-------------------------------------------------------------------------*/ 00218 /*--------------------------------------------------------------------------*/ 00219 void gnuplot_plot_x(gnuplot_ctrl * handle, double * d, int n, char * title); 00220 00221 /*-------------------------------------------------------------------------*/ 00251 /*--------------------------------------------------------------------------*/ 00252 void gnuplot_plot_xy( 00253 gnuplot_ctrl * handle, 00254 double * x, 00255 double * y, 00256 int n, 00257 char * title 00258 ) ; 00259 00260 00261 /*-------------------------------------------------------------------------*/ 00280 /*--------------------------------------------------------------------------*/ 00281 void gnuplot_plot_once( 00282 char * title, 00283 char * style, 00284 char * label_x, 00285 char * label_y, 00286 double * x, 00287 double * y, 00288 int n 00289 ); 00290 00291 /*-------------------------------------------------------------------------*/ 00315 /*--------------------------------------------------------------------------*/ 00316 void gnuplot_plot_slope( 00317 gnuplot_ctrl * handle, 00318 double a, 00319 double b, 00320 char * title 00321 ) ; 00322 00323 /*-------------------------------------------------------------------------*/ 00346 /*--------------------------------------------------------------------------*/ 00347 void gnuplot_plot_equation(gnuplot_ctrl * h, char * equation, char * title) ; 00348 00364 int gnuplot_write_x_csv( 00365 char const * fileName, 00366 double const * d, 00367 int n, 00368 char const * title); 00369 00385 int gnuplot_write_xy_csv( 00386 char const * fileName, 00387 double const * x, 00388 double const * y, 00389 int n, 00390 char const * title); 00391 00411 int gnuplot_write_multi_csv( 00412 char const * fileName, 00413 double const ** xListPtr, 00414 int n, 00415 int numColumns, 00416 char const * title); 00417 00418 #endif