gnuplot_i.h

00001 
00002 /*----------------------------------------------------------------------------
00003                                     E.S.O.
00004  -----------------------------------------------------------------------------
00005    File name    :   gnuplot_i.h
00006    Author       :   N. Devillard
00007    Created on   :   Fri Sept 26 1997
00008    Software     :   ANSI C under Solaris Unix
00009                     Part of ECLIPSE library for Adonis
00010    Description  :   C interface to gnuplot
00011   
00012     gnuplot is a freely available, command-driven graphical display tool for
00013     Unix. It compiles and works quite well on a number of Unix flavours as
00014     well as other operating systems. The following module enables sending
00015     display requests to gnuplot through simple C calls.
00016   
00017  ---------------------------------------------------------------------------*/
00018 
00019 /*
00020 
00021  $Id: gnuplot_i.h,v 1.1 2003/09/03 12:50:47 amodigli Exp $
00022  $Author: amodigli $
00023  $Date: 2003/09/03 12:50:47 $
00024  $Revision: 1.1 $
00025 
00026  */
00027 
00028 #ifndef _GNUPLOT_PIPES_H_
00029 #define _GNUPLOT_PIPES_H_
00030 
00031 /*---------------------------------------------------------------------------
00032                                 Includes
00033  ---------------------------------------------------------------------------*/
00034 
00035 #include <stdio.h>
00036 #include <stdlib.h>
00037 #include <string.h>
00038 #include <unistd.h>
00039 #include <stdarg.h>
00040 
00041 
00042 
00043 #define GP_MAX_TMP_FILES    64
00044 #define GP_TMP_NAME_SIZE    512
00045 #define GP_CMD_SIZE         1024
00046 
00047 /*---------------------------------------------------------------------------
00048                                 New Types
00049  ---------------------------------------------------------------------------*/
00050 
00051 /*
00052  * This structure holds all necessary information to talk to a gnuplot
00053  * session.
00054  */
00055 
00056 typedef struct _GNUPLOT_CTRL_ {
00057     /* command file handling */
00058     FILE    * gnucmd ;
00059     
00060     /* Plotting options */
00061     int       nplots ;      /* Number of active plots at the moment */
00062     char      pstyle[32] ;  /* Current plotting style */
00063 
00064     /* temporary files opened */
00065     char      to_delete[GP_MAX_TMP_FILES][GP_TMP_NAME_SIZE] ;
00066     int       ntmp ;
00067 
00068 
00069 } gnuplot_ctrl ;
00070 
00071 
00072 #ifndef _ECLIPSE_TYPES_H_
00073 /*
00074  * dpoint is convenient to store signals which have definition both on x and
00075  * y axis.
00076  */
00077 typedef struct _DPOINT_ {
00078     double  x ;
00079     double  y ;
00080 } dpoint ;
00081 #endif
00082 
00083 
00084 /*---------------------------------------------------------------------------
00085                         Function ANSI C prototypes
00086  ---------------------------------------------------------------------------*/
00087 
00088 /*-------------------------------------------------------------------------*/
00102 /*--------------------------------------------------------------------------*/
00103  
00104 int check_X_display(int activate);
00105 
00106 
00107 /*-------------------------------------------------------------------------*/
00137 /*-------------------------------------------------------------------------*/
00138 
00139 char * gnuplot_get_program_path(char * pname);
00140 
00141 /*-------------------------------------------------------------------------*/
00152 /*--------------------------------------------------------------------------*/
00153  
00154 gnuplot_ctrl * gnuplot_init(void);
00155 
00156 
00157 /*-------------------------------------------------------------------------*/
00170 /*--------------------------------------------------------------------------*/
00171  
00172 void gnuplot_close(gnuplot_ctrl * handle);
00173 
00174 
00175 /*-------------------------------------------------------------------------*/
00197 /*--------------------------------------------------------------------------*/
00198  
00199 void gnuplot_cmd(gnuplot_ctrl *  handle, char *  cmd, ...);
00200 
00201 
00202 /*-------------------------------------------------------------------------*/
00226 /*--------------------------------------------------------------------------*/
00227  
00228 void gnuplot_setstyle(gnuplot_ctrl * h, char * plot_style);
00229 
00230 
00231 /*-------------------------------------------------------------------------*/
00242 /*--------------------------------------------------------------------------*/
00243  
00244 void gnuplot_resetplot(gnuplot_ctrl * h);
00245 
00246 /*-------------------------------------------------------------------------*/
00278 /*--------------------------------------------------------------------------*/
00279  
00280 void gnuplot_plot1d_var1(
00281     gnuplot_ctrl    *   handle,
00282     double          *   d,
00283     int                 n_point,
00284     char            *   title
00285 ) ;
00286 
00287 
00288 /*-------------------------------------------------------------------------*/
00318 /*--------------------------------------------------------------------------*/
00319  
00320 void gnuplot_plot1d_var2(
00321     gnuplot_ctrl    *   handle,
00322     dpoint          *   d,
00323     int                 n_points,
00324     char            *   title
00325 ) ;
00326 
00327 
00328 /*-------------------------------------------------------------------------*/
00359 /*--------------------------------------------------------------------------*/
00360  
00361  
00362 void gnuplot_plot_slope(
00363     gnuplot_ctrl    *   handle,
00364     double              a,
00365     double              b,
00366     char            *   title
00367 ) ;
00368 
00369 
00370 /*-------------------------------------------------------------------------*/
00396 /*--------------------------------------------------------------------------*/
00397  
00398 void gnuplot_plot_equation(
00399     gnuplot_ctrl    *   h,
00400     char            *   equation,
00401     char            *   title
00402 ) ;
00403 
00404 
00405 
00406 #endif

Generated on Wed Oct 26 13:08:52 2005 for SINFONI Pipeline Reference Manual by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001