00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef IRPLIB_PLOT_H
00029 #define IRPLIB_PLOT_H
00030
00031
00032
00033
00034
00035 #include <cpl.h>
00036
00037
00038
00039
00040
00041 #define irplib_plot_manpage \
00042 "The recipe can produce a number of predefined plots. " \
00043 "Zero means that none of the plots are produced, while " \
00044 "increasing values (e.g. 1 or 2) increases the number " \
00045 "of plots produced. If the plotting fails a warning is " \
00046 "produced, and the recipe continues. " \
00047 "The default behaviour of the plotting is to use " \
00048 "gnuplot (with option -persist). The recipe currently " \
00049 "produces 1D-plots using gnuplot commands. The recipe " \
00050 "user can control the actual plotting-command used by " \
00051 "the recipe to create the plot by setting the " \
00052 "environment variable IRPLIB_PLOTTER. Currently, if " \
00053 "IRPLIB_PLOTTER " \
00054 "is set it must contain the string 'gnuplot'. Setting " \
00055 "it to 'cat > my_gnuplot_$$.txt' causes a number of " \
00056 "ASCII-files to be created, which each produce a plot " \
00057 "when given as standard input to gnuplot (e.g. later " \
00058 "or on a different computer). A finer control of the " \
00059 "plotting options can be obtained by writing an " \
00060 "executable script, e.g. my_gnuplot.pl, that " \
00061 "executes gnuplot after setting the desired gnuplot " \
00062 "options (e.g. set terminal pslatex color) " \
00063 "and then setting IRPLIB_PLOTTER to my_gnuplot.pl. " \
00064 "The predefined plots include plotting of images. " \
00065 "Images can be plotted not only with gnuplot, but also " \
00066 "using the pnm format. This is controlled with the " \
00067 "environment variable IRPLIB_IMAGER. If IRPLIB_IMAGER " \
00068 "is set to a string that does not contain the word " \
00069 "gnuplot, the recipe will generate the plot in pnm " \
00070 "format. E.g. setting IRPLIB_IMAGER to " \
00071 "'cat | display - &' will produce a gray-scale image " \
00072 "using the image viewer display."
00073
00074
00075
00086
00087 #define irplib_vector_plot( pre, options, post, vector) \
00088 irplib_vector_plot_macro(pre, options, post, vector, __FILE__, __LINE__)
00089
00090
00102
00103 #define irplib_vectors_plot( pre, options, post, vectors, nvec) \
00104 irplib_vectors_plot_macro(pre, options, post, vectors, nvec)
00105
00106
00119
00120 #define irplib_table_plot( pre, options, post, table, x_lab, y_lab) \
00121 irplib_table_plot_macro(pre, options, post, table, x_lab, y_lab, \
00122 __FILE__, __LINE__)
00123
00124
00135
00136 #define irplib_bivector_plot( pre, options, post, bivector) \
00137 irplib_bivector_plot_macro(pre, options, post, bivector, __FILE__, __LINE__)
00138
00139
00151
00152 #define irplib_bivectors_plot( pre, options, post, bivectors, nbvec) \
00153 irplib_bivectors_plot_macro(pre, options, post, bivectors, nbvec)
00154
00155
00166
00167 #define irplib_image_plot( pre, options, post, image) \
00168 irplib_image_plot_macro(pre, options, post, image, __FILE__, __LINE__)
00169
00170
00184
00185 #define irplib_image_row_plot( pre, options, post, image, \
00186 firstrow, lastrow, rowstep) \
00187 irplib_image_row_plot_macro(pre, options, post, image, \
00188 firstrow, lastrow, rowstep, \
00189 __FILE__, __LINE__)
00190
00191
00205
00206 #define irplib_image_col_plot( pre, options, post, image, \
00207 firstcol, lastcol, colstep) \
00208 irplib_image_col_plot_macro(pre, options, post, image, \
00209 firstcol, lastcol, colstep, \
00210 __FILE__, __LINE__)
00211
00212
00213
00214
00215
00216
00217 cpl_error_code irplib_vector_plot_macro(const char *, const char *,
00218 const char *, const cpl_vector *,
00219 const char *, const unsigned);
00220
00221 cpl_error_code irplib_vectors_plot_macro(const char *, const char *,
00222 const char *, const cpl_vector **, int);
00223
00224 cpl_error_code irplib_bivector_plot_macro(const char *, const char *,
00225 const char *, const cpl_bivector *,
00226 const char *, const unsigned);
00227
00228 cpl_error_code irplib_bivectors_plot_macro(const char *, const char **,
00229 const char *, const cpl_bivector **,
00230 int);
00231
00232 cpl_error_code irplib_image_plot_macro(const char *, const char *, const char *,
00233 const cpl_image *,
00234 const char *, const unsigned);
00235
00236 cpl_error_code irplib_image_row_plot_macro(const char *, const char *,
00237 const char *, const cpl_image *,
00238 int, int, int,
00239 const char *, const unsigned);
00240
00241 cpl_error_code irplib_image_col_plot_macro(const char *, const char *,
00242 const char *, const cpl_image *,
00243 int, int, int,
00244 const char *, const unsigned);
00245
00246 cpl_error_code irplib_table_plot_macro(const char *, const char *,
00247 const char *,
00248 const cpl_table *,
00249 const char *, const char *,
00250 const char *, const unsigned);
00251
00252 #endif