exe_xterm_gplot
render 2D surface data or 1D X-Y data by GNUplot in X-Windows. This assumes gnuplot is installed and can be found in the path as "gnuplot".
Synopsis
int exe_xterm_gplot(
char *gplot_data_name,
char *gplot_template_name,
char *gplot_cmd_file,
char *title,
char *display,
int xterm_geom_coord[ 2 ],
int gplot_geom_size[ 2 ],
int gplot_geom_coord[ 2 ]
)
Unmodified Input Variable
- gplot_data_name - full pathanme of the file containing the gnuplot
readable data, an ASCII file, where data are arranged
in column form. For 3D data, (x, y, z) coordinates are
arranged in 3 separated columns, a blank line is inserted
whenever z-coordiantes is changed. For 2D data, no blank
line is needed.
- gplot_template_name - the filename of GNUplot template command file
where "gplot_data_name", the 1st argument of this
subroutine, will replace "DATAFILE-PATHNAME" in
gplot_template_name.
- gplot_cmd_file - the filename of the actual gnuplot command file,
It is the resulting file of the insertion of
"gplot_data_name" in "gplot_template_name".
i.e. gplot_cmd_file = gplot_template_name( gplot_data_name )
- title - string of the title to be used in xterm's and gnuplot_x11's title-bar,
If title == NULL, default title will be used
- display - name of the display/machine to be used. If display == NULL or
strlen( display ) == 0, then display option in xterm and gnuplot
will NOT be set
- xterm_geom_coord - Integer array of 2, specify the location of the Xterm
in the unit of pixel. If coord[ ii ] is negative,
NO xterm geometry coordinate will be set.
- gplot_geom_size - Integer array of 2, specify the size of the GNUplot
in the unit of pixel. If size[ ii ] is zero or negative
NO gplot geometry szie will be set.
- gplot_geom_coord - Integer array of 2, specify the location of the GNUplot
in the unit of pixel. If coord[ ii ] is negative,
NO gplot geometry coordinate will be set.
Notes on the usage
The second argument of the subroutine, gplot_template_name, which is a
template needed by this subroutine to successfully run gnuplot as
the program runs. Typical templates are included in the distribution
tree, $(RGX)/demo. GNUPLOT_template_1D.cmd is for 1D data, a X-Y graph.
GNUPLOT_template_2D_mov.cmd and GNUPLOT_template_2D_pic.cmd are for 2D
surface data, a (X,Y)-Z graph. Where "mov" stands for movie, an animated
rotation of 2D surface data. And "pic" is a static view of the 2D
surface data. Example of usage of this routine can be found in
$(RGX)/src/demo-laplace/exe_gplot_Task_Grid.c and laplace_main.c.
This routine requires str_replace.c to compile.
Notes on Fortran Interface
The RGX routines which have this message have a Fortran interface.
If the C function that is defined here has a returned integer status,
the Fortran interface will have an additional argument, ierr, at the
end of its argument list.
Additional Notes on the Fortran Interface
Since the subroutine is defined in C, and most of what subroutine
does is string manupilation using string.h. So user is assumed to
put a NULL character, i.e. "\0", at the end of all the character
arrays variables for termination, namely first 5 variables in the
argument list of this subroutine.
Definition Location
This subroutine is NOT defined in the librgx.a. But the source code
can be found in the distribution tree.
Location:../src/librgx/exe_xterm_gplot.c