22#include <caml/alloc.h>
23#include <caml/callback.h>
25#include <caml/memory.h>
27#include <caml/mlvalues.h>
28#include <caml/bigarray.h>
37#define MAX_EXCEPTION_MESSAGE_LENGTH 1000
38#define CAML_PLPLOT_PLOTTER_FUNC_NAME "caml_plplot_plotter"
39#define CAML_PLPLOT_MAPFORM_FUNC_NAME "caml_plplot_mapform"
40#define CAML_PLPLOT_DEFINED_FUNC_NAME "caml_plplot_defined"
41#define CAML_PLPLOT_LABEL_FUNC_NAME "caml_plplot_customlabel"
42#define CAML_PLPLOT_ABORT_FUNC_NAME "caml_plplot_abort"
43#define CAML_PLPLOT_EXIT_FUNC_NAME "caml_plplot_exit"
44#define CAML_PLPLOT_TRANSFORM_FUNC_NAME "caml_plplot_transform"
67 static value * pltr = NULL;
74 caml_callback2( *pltr, caml_copy_double( x ), caml_copy_double( y ) );
76 new_x = Double_val( Field( result, 0 ) );
77 new_y = Double_val( Field( result, 1 ) );
99 static value * defined = NULL;
100 if ( defined == NULL )
106 caml_callback2( *defined, caml_copy_double( x ), caml_copy_double( y ) );
107 is_it_defined = Int_val( result );
109 CAMLreturn( is_it_defined );
118 CAMLlocal1( result );
128 for ( i = 0; i < n; i++ )
132 caml_copy_double( x[i] ), caml_copy_double( y[i] ) );
135 new_x = Double_val( Field( result, 0 ) );
136 new_y = Double_val( Field( result, 1 ) );
150 CAMLlocal1( result );
153 static value * callback = NULL;
154 if ( callback == NULL )
160 caml_callback2( *callback, Val_int( axis - 1 ), caml_copy_double( n ) );
163 snprintf( label, length,
"%s", String_val( result ) );
172 CAMLlocal1( result );
175 static value * handler = NULL;
176 if ( handler == NULL )
182 caml_callback( *handler, caml_copy_string( message ) );
191 CAMLlocal1( result );
194 static value * handler = NULL;
195 if ( handler == NULL )
201 caml_callback( *handler, caml_copy_string( message ) );
203 CAMLreturn( Int_val( result ) );
212 CAMLlocal1( result );
215 static value * transform = NULL;
216 if ( transform == NULL )
222 caml_callback2( *transform, caml_copy_double( x ), caml_copy_double( y ) );
224 *xt = Double_val( Field( result, 0 ) );
225 *yt = Double_val( Field( result, 1 ) );
234 static value * pltr = NULL;
238 if ( pltr == NULL || Val_int( 0 ) == *pltr )
251 static value * defined = NULL;
252 if ( defined == NULL )
255 if ( defined == NULL || Val_int( 0 ) == *defined )
288 static value * label = NULL;
292 if ( label == NULL || Val_int( 0 ) == *label )
303 CAMLreturn( Val_unit );
310 static value * handler = NULL;
311 if ( handler == NULL )
314 if ( handler == NULL || Val_int( 0 ) == *handler )
324 CAMLreturn( Val_unit );
329 static value * handler = NULL;
330 if ( handler == NULL )
333 if ( handler == NULL || Val_int( 0 ) == *handler )
343 CAMLreturn( Val_unit );
350 static value * handler = NULL;
351 if ( handler == NULL )
354 if ( handler == NULL || Val_int( 0 ) == *handler )
364 CAMLreturn( Val_unit );
389 caml_invalid_argument(
"A custom plotter must be defined \
390 before calling plcont" );
394 c_plcont( f, nx, ny, kx, lx, ky, ly, clevel, nlevel,
421 left, right, bottom, top,
422 shade_min, shade_max,
423 sh_cmap, sh_color, sh_width, min_color, min_width,
424 max_color, max_width,
plfill, rectangular,
446 xmin, xmax, ymin, ymax,
447 clevel, nlevel, fill_width,
448 cont_color, cont_width,
468 xmin, xmax, ymin, ymax,
505 name, minx, maxx, miny, maxy );
519 if ( nplotentries > 0 )
521 minx, maxx, miny, maxy,
522 plotentries, nplotentries );
525 minx, maxx, miny, maxy,
526 NULL, nplotentries );
541 if ( nplotentries > 0 )
543 minx, maxx, miny, maxy,
544 plotentries, nplotentries );
547 minx, maxx, miny, maxy,
548 NULL, nplotentries );
564 minx, maxx, miny, maxy,
579 if ( nplotentries > 0 )
581 minx, maxx, miny, maxy,
582 plotentries, nplotentries );
585 minx, maxx, miny, maxy,
586 NULL, nplotentries );
599 dlong, dlat, minlong, maxlong, minlat, maxlat );
615 CAMLparam5( x, y, z, xg,
yg );
616 CAMLxparam2( type, data );
621 CAMLlocal2(
zg, y_ml_array );
625 int npts, nptsx, nptsy;
629 npts = Wosize_val( x ) / Double_wosize;
630 if ( ( Wosize_val( y ) / Double_wosize != Wosize_val( z ) / Double_wosize ) ||
631 ( Wosize_val( y ) / Double_wosize != npts ) ||
632 ( Wosize_val( z ) / Double_wosize != npts )
635 caml_failwith(
"ml_plgriddata: x, y, z must all have the same dimensions" );
638 nptsx = Wosize_val( xg ) / Double_wosize;
639 nptsy = Wosize_val(
yg ) / Double_wosize;
646 c_plgriddata( (
double *) x, (
double *) y, (
double *) z, npts, (
double *) xg, nptsx,
647 (
double *)
yg, nptsy, zg_local, Int_val( type ) + 1,
648 Double_val( data ) );
651 zg = caml_alloc( nptsx, 0 );
653 for ( i = 0; i < nptsx; i++ )
656 y_ml_array = caml_alloc( nptsy * Double_wosize, Double_array_tag );
657 for ( j = 0; j < nptsy; j++ )
659 Store_double_field( y_ml_array, j, zg_local[i][j] );
661 caml_modify( &Field(
zg, i ), y_ml_array );
684 plpoly3( n, x, y, z, draw, ifcc );
693 sprintf( exception_message,
"Error, return code %d", result );
694 caml_invalid_argument( exception_message );
703 int translated_option;
704 switch ( parse_option )
715 default: translated_option = -1;
717 return translated_option;
721#define INIT_STRING_ARRAY( o ) \
723 o ## _length = Wosize_val( o ); \
724 const char *c_ ## o[o ## _length]; \
725 for ( i = 0; i < o ## _length; i++ ) { c_ ## o[i] = String_val( Field( o, i ) ); }
728#define INIT_NC_STRING_ARRAY( o ) \
730 o ## _length = Wosize_val( o ); \
731 char *c_ ## o[o ## _length]; \
732 for ( i = 0; i < o ## _length; i++ ) { c_ ## o[i] = String_val( Field( o, i ) ); }
735#define INIT_INT_ARRAY( o ) \
737 o ## _length = Wosize_val( o ); \
738 int c_ ## o[o ## _length]; \
739 for ( i = 0; i < ( o ## _length ); i++ ) { ( c_ ## o )[i] = Int_val( Field( ( o ), i ) ); }
742#define INIT_INT_ARRAYS( o ) \
743 int o ## _length, o ## _inner; \
744 o ## _length = Wosize_val( o ); \
745 int *c_ ## o[o ## _length]; \
746 for ( i = 0; i < ( o ## _length ); i++ ) { \
747 INIT_INT_ARRAY( o ## _subarray ); \
748 ( c_ ## o )[i] = c_ ## o ## _subarray; \
757 while ( list != Val_emptylist )
760 result = result | variant_f( Int_val( Field( list, 0 ) ) );
762 list = Field( list, 1 );
765 CAMLreturn( result );
770 CAMLparam2(
argv, parse_method );
773 int combined_parse_method;
780 result =
plparseopts( &argv_length, c_argv, combined_parse_method );
784 sprintf( exception_message,
"Invalid arguments in plparseopts, error %d", result );
785 caml_invalid_argument( exception_message );
787 CAMLreturn( Val_unit );
796 CAMLparam5( xspec, yspec, xmin, xmax, xjump );
797 CAMLxparam5( ymin, ymax, xlpos, ylpos, y_ascl );
798 CAMLxparam5( acc, colbox, collab, colline, styline );
799 CAMLxparam4( legline, labx, laby, labtop );
803 const char* legend_copy[4];
805 for ( i = 0; i < 4; i++ )
807 colline_copy[i] = Int_val( Field( colline, i ) );
808 styline_copy[i] = Int_val( Field( styline, i ) );
809 legend_copy[i] = String_val( Field( legline, i ) );
813 plstripc( &
id, String_val( xspec ), String_val( yspec ),
814 Double_val( xmin ), Double_val( xmax ),
815 Double_val( xjump ), Double_val( ymin ), Double_val( ymax ),
816 Double_val( xlpos ), Double_val( ylpos ), Bool_val( y_ascl ),
817 Bool_val( acc ), Int_val( colbox ), Int_val( collab ),
818 colline_copy, styline_copy, legend_copy,
819 String_val( labx ), String_val( laby ), String_val( labtop ) );
821 CAMLreturn( Val_int(
id ) );
834 int translated_option;
835 switch ( legend_option )
846 default: translated_option = -1;
848 return translated_option;
853 int translated_option;
854 switch ( colorbar_option )
874 default: translated_option = -1;
876 return translated_option;
881 int translated_option;
882 switch ( position_option )
893 default: translated_option = -1;
895 return translated_option;
906 value box_line_widths,
911 CAMLparam5( position, opt, x, y, plot_width );
912 CAMLxparam5( bg_color, bb_color, bb_style, nrow, ncolumn );
913 CAMLxparam5( opt_array, text_offset, text_scale, text_spacing, text_justification );
914 CAMLxparam5( text_colors,
text, box_colors, box_patterns, box_scales );
915 CAMLxparam5( box_line_widths, line_colors, line_styles, line_widths, symbol_colors );
916 CAMLxparam3( symbol_scales, symbol_numbers, symbols );
917 CAMLlocal1( result );
918 result = caml_alloc( 2, 0 );
923 int c_position, c_opt;
926 n_legend = Wosize_val( opt_array );
928 int c_opt_array[n_legend];
948 for ( i = 0; i < n_legend; i++ )
957 pllegend( &width, &height, c_opt, c_position, Double_val( x ), Double_val( y ),
958 Double_val( plot_width ), Int_val( bg_color ),
959 Int_val( bb_color ), Int_val( bb_style ),
960 Int_val( nrow ), Int_val( ncolumn ),
961 n_legend, c_opt_array,
962 Double_val( text_offset ), Double_val( text_scale ),
963 Double_val( text_spacing ),
964 Double_val( text_justification ),
965 c_text_colors, c_text,
966 c_box_colors, c_box_patterns, (
double *) box_scales,
967 (
double *) box_line_widths,
968 c_line_colors, c_line_styles, (
double *) line_widths,
969 c_symbol_colors, (
double *) symbol_scales, c_symbol_numbers,
973 Store_field( result, 0, caml_copy_double( width ) );
974 Store_field( result, 1, caml_copy_double( height ) );
976 CAMLreturn( result );
999 CAMLparam5( opt, position, x, y, x_length );
1000 CAMLxparam5( y_length, bg_color, bb_color, bb_style, low_cap_color );
1001 CAMLxparam5( high_cap_color, cont_color, cont_width, label_opts, label );
1002 CAMLxparam4( axis_opts, ticks, sub_ticks, values );
1003 CAMLlocal1( result );
1004 result = caml_alloc( 2, 0 );
1009 int c_opt, c_position;
1012 n_labels = Wosize_val( label_opts );
1015 n_axes = Wosize_val( axis_opts );
1030 int c_label_opts[ n_labels ];
1031 for ( i = 0; i < n_labels; i++ )
1038 int n_values[ n_axes ];
1039 c_values = malloc( n_axes *
sizeof (
double * ) );
1041 for ( i = 0; i < n_axes; i++ )
1043 c_values[i] = (
double *) Field( values, i );
1044 n_values[i] = Wosize_val( Field( values, i ) ) / Double_wosize;
1048 PLFLT width, height;
1051 c_opt, c_position, Double_val( x ), Double_val( y ),
1052 Double_val( x_length ), Double_val( y_length ),
1053 Int_val( bg_color ), Int_val( bb_color ), Int_val( bb_style ),
1054 Double_val( low_cap_color ), Double_val( high_cap_color ),
1055 Int_val( cont_color ), Double_val( cont_width ),
1056 n_labels, c_label_opts, c_label,
1057 n_axes, c_axis_opts,
1058 (
double *) ticks, c_sub_ticks,
1059 n_values, (
const PLFLT *
const *) c_values );
1062 Store_field( result, 0, caml_copy_double( width ) );
1063 Store_field( result, 1, caml_copy_double( height ) );
1065 CAMLreturn( result );
1077void ml_pltr0(
double x,
double y,
double* tx,
double* ty )
1079 pltr0( x, y, tx, ty, NULL );
1084 CAMLparam4( xg,
yg, x, y );
1085 CAMLlocal1( tx_ty );
1086 tx_ty = caml_alloc( 2, 0 );
1090 grid.
xg = (
double *) xg;
1091 grid.
yg = (
double *)
yg;
1092 grid.
nx = Wosize_val( xg ) / Double_wosize;
1093 grid.
ny = Wosize_val(
yg ) / Double_wosize;
1094 pltr1( Double_val( x ), Double_val( y ), &tx, &ty, (
PLPointer ) & grid );
1097 Store_field( tx_ty, 0, caml_copy_double( tx ) );
1098 Store_field( tx_ty, 1, caml_copy_double( ty ) );
1099 CAMLreturn( tx_ty );
1104 CAMLparam4( xg,
yg, x, y );
1105 CAMLlocal1( tx_ty );
1106 tx_ty = caml_alloc( 2, 0 );
1120 length1 = Wosize_val( xg );
1122 length2 = Wosize_val( Field( xg, 0 ) ) / Double_wosize;
1123 c_xg = malloc( length1 *
sizeof (
double* ) );
1124 for ( i = 0; i < length1; i++ )
1126 c_xg[i] = (
double *) Field( xg, i );
1128 c_yg = malloc( length1 *
sizeof (
double* ) );
1129 for ( i = 0; i < length1; i++ )
1131 c_yg[i] = (
double *) Field(
yg, i );
1138 pltr2( Double_val( x ), Double_val( y ), &tx, &ty, (
PLPointer ) & grid );
1145 Store_field( tx_ty, 0, caml_copy_double( tx ) );
1146 Store_field( tx_ty, 1, caml_copy_double( ty ) );
1147 CAMLreturn( tx_ty );
#define CAML_PLPLOT_TRANSFORM_FUNC_NAME
value ml_plstripc_byte(value *argv, int argn)
value ml_plstransform(value unit)
int translate_legend_option(int legend_option)
void ml_plshade(const PLFLT **a, PLINT nx, PLINT ny, PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLBOOL rectangular)
PLINT(* ML_VARIANT_FUNC)(PLINT)
#define CAML_PLPLOT_EXIT_FUNC_NAME
#define CAML_PLPLOT_PLOTTER_FUNC_NAME
void ml_plshades(const PLFLT **a, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT *clevel, PLINT nlevel, PLFLT fill_width, PLINT cont_color, PLFLT cont_width, PLBOOL rectangular)
void plplot_check_nonzero_result(int result)
void ml_plotter(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
void ml_labelfunc(PLINT axis, PLFLT n, char *label, PLINT length, PLPointer d)
void ml_abort(const char *message)
void ml_plvect(const PLFLT **u, const PLFLT **v, PLINT nx, PLINT ny, PLFLT scale)
value ml_plparseopts(value argv, value parse_method)
int ml_exit(const char *message)
value ml_plslabelfunc(value unit)
void ml_plmapfill(PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
void ml_plpoly3(PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT ndraw, PLBOOL *draw, PLBOOL ifcc)
#define INIT_STRING_ARRAY(o)
#define CAML_PLPLOT_DEFINED_FUNC_NAME
value ml_pltr2(value xg, value yg, value x, value y)
#define CAML_PLPLOT_MAPFORM_FUNC_NAME
void ml_transform(PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data)
#define CAML_PLPLOT_ABORT_FUNC_NAME
#define CAML_PLPLOT_LABEL_FUNC_NAME
void(* ML_PLOTTER_FUNC)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
PLINT ml_defined(PLFLT x, PLFLT y)
PLINT(* ML_DEFINED_FUNC)(PLFLT, PLFLT)
value ml_plsabort(value unit)
value ml_pllegend(value opt, value position, value x, value y, value plot_width, value bg_color, value bb_color, value bb_style, value nrow, value ncolumn, value opt_array, value text_offset, value text_scale, value text_spacing, value text_justification, value text_colors, value text, value box_colors, value box_patterns, value box_scales, value box_line_widths, value line_colors, value line_styles, value line_widths, value symbol_colors, value symbol_scales, value symbol_numbers, value symbols)
void ml_plcont(const PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel)
value ml_plstripc(value xspec, value yspec, value xmin, value xmax, value xjump, value ymin, value ymax, value xlpos, value ylpos, value y_ascl, value acc, value colbox, value collab, value colline, value styline, value legline, value labx, value laby, value labtop)
value ml_plsexit(value unit)
ML_MAPFORM_FUNC get_ml_mapform_func()
value ml_plcolorbar(value opt, value position, value x, value y, value x_length, value y_length, value bg_color, value bb_color, value bb_style, value low_cap_color, value high_cap_color, value cont_color, value cont_width, value label_opts, value label, value axis_opts, value ticks, value sub_ticks, value values)
void(* ML_MAPFORM_FUNC)(PLINT, PLFLT *, PLFLT *)
int translate_position_option(int position_option)
void ml_pltr0(double x, double y, double *tx, double *ty)
void ml_plmeridians(PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
void ml_plimagefr(const PLFLT **idata, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT valuemin, PLFLT valuemax)
value ml_pltr1(value xg, value yg, value x, value y)
int translate_colorbar_option(int colorbar_option)
value ml_pllegend_byte(value *argv, int argn)
int plg_current_col0(void)
#define MAX_EXCEPTION_MESSAGE_LENGTH
void ml_plmapline(PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
void ml_mapform(PLINT n, PLFLT *x, PLFLT *y)
#define INIT_NC_STRING_ARRAY(o)
int translate_parse_option(int parse_option)
#define INIT_INT_ARRAY(o)
void ml_plmaptex(PLCHAR_VECTOR name, PLFLT dx, PLFLT dy, PLFLT just, PLCHAR_VECTOR text, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT plotentry)
void ml_plmap(PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy)
value ml_plgriddata_bytecode(value *argv, int argn)
PLFLT plg_current_col1(void)
void ml_plmapstring(PLCHAR_VECTOR name, PLCHAR_VECTOR string, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
ML_DEFINED_FUNC get_ml_defined_func()
int lor_ml_list(value list, ML_VARIANT_FUNC variant_f)
value ml_plgriddata(value x, value y, value z, value xg, value yg, value type, value data)
value ml_plcolorbar_byte(value *argv, int argn)
void(* ML_LABEL_FUNC)(PLINT, PLFLT, char *, PLINT, PLPointer)
ML_PLOTTER_FUNC get_ml_plotter_func()
void pltr2(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
void c_plcont(PLFLT_MATRIX f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT_VECTOR clevel, PLINT nlevel, PLTRANSFORM_callback pltr, PLPointer pltr_data)
void pltr1(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
void pltr0(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer PL_UNUSED(pltr_data))
void plsexit(int(*handler)(PLCHAR_VECTOR))
static PLFLT value(double n1, double n2, double hue)
void plsabort(void(*handler)(PLCHAR_VECTOR))
void c_plgriddata(PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT_VECTOR z, PLINT npts, PLFLT_VECTOR xg, PLINT nptsx, PLFLT_VECTOR yg, PLINT nptsy, PLFLT **zg, PLINT type, PLFLT data)
void c_plimagefr(PLFLT_MATRIX idata, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT valuemin, PLFLT valuemax, PLTRANSFORM_callback pltr, PLPointer pltr_data)
void plFree2dGrid(PLFLT **f, PLINT nx, PLINT PL_UNUSED(ny))
void plAlloc2dGrid(PLFLT ***f, PLINT nx, PLINT ny)
PLDLLIMPEXP void c_plmeridians(PLMAPFORM_callback mapform, PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
#define PL_POSITION_BOTTOM
#define PL_COLORBAR_BACKGROUND
#define PL_COLORBAR_CAP_NONE
PLDLLIMPEXP void c_plmapfill(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
#define PL_COLORBAR_ORIENT_BOTTOM
#define PL_COLORBAR_LABEL_TOP
#define PL_COLORBAR_ORIENT_TOP
#define PL_POSITION_SUBPAGE
#define PL_COLORBAR_CAP_HIGH
PLDLLIMPEXP void c_plmapline(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
const char * PLCHAR_VECTOR
#define PL_LEGEND_BACKGROUND
#define PL_POSITION_OUTSIDE
#define PL_COLORBAR_IMAGE
#define PL_LEGEND_COLOR_BOX
#define PL_COLORBAR_SHADE_LABEL
#define PL_LEGEND_ROW_MAJOR
#define PL_LEGEND_BOUNDING_BOX
PLDLLIMPEXP void c_plmaptex(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT dx, PLFLT dy, PLFLT just, PLCHAR_VECTOR text, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT plotentry)
#define PL_COLORBAR_LABEL_RIGHT
#define PL_PARSE_OVERRIDE
const PLINT * PLINT_VECTOR
#define PL_PARSE_NODELETE
#define PL_POSITION_VIEWPORT
#define PL_COLORBAR_GRADIENT
PLDLLIMPEXP void c_plmapstring(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLCHAR_VECTOR string, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
#define PL_COLORBAR_LABEL_BOTTOM
#define PL_POSITION_INSIDE
#define PL_POSITION_RIGHT
#define PL_COLORBAR_CAP_LOW
#define PL_COLORBAR_ORIENT_RIGHT
#define PL_COLORBAR_LABEL_LEFT
#define PL_COLORBAR_BOUNDING_BOX
PLDLLIMPEXP void c_plmap(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy)
#define PL_LEGEND_TEXT_LEFT
#define PL_COLORBAR_ORIENT_LEFT
#define PL_COLORBAR_SHADE
#define PL_PARSE_NOPROGRAM
plgriddata(x, y, z, xg, yg, type, data)\n\ \n\ \n\ This function is used in example 21.\n\ \n\ \n\ \n\ SYNOPSIS:\n\ \n\ plgriddata(x, y, z, npts, xg, nptsx, yg, nptsy, zg, type, data)\n\ \n\ ARGUMENTS:\n\ \n\ x(PLFLT_VECTOR, input) : The input x vector.\n\ \n\ y(PLFLT_VECTOR, input) : The input y vector.\n\ \n\ z(PLFLT_VECTOR, input) : The input z vector. Each triple x[i],\n\ y[i], z[i] represents one data sample coordinate.\n\ \n\ npts(PLINT, input) : The number of data samples in the x, y and z\n\ vectors.\n\ \n\ xg(PLFLT_VECTOR, input) : A vector that specifies the grid spacing\n\ in the x direction. Usually xg has nptsx equally spaced values\n\ from the minimum to the maximum values of the x input vector.\n\ \n\ nptsx(PLINT, input) : The number of points in the xg vector.\n\ \n\ yg(PLFLT_VECTOR, input) : A vector that specifies the grid spacing\n\ in the y direction. Similar to the xg parameter.\n\ \n\ nptsy(PLINT, input) : The number of points in the yg vector.\n\ \n\ zg(PLFLT_NC_MATRIX, output) : The matrix of interpolated results\n\ where data lies in the grid specified by xg and yg. Therefore the\n\ zg matrix must be dimensioned\n\ nptsx by\n\ nptsy.\n\ \n\ type(PLINT, input) : The type of grid interpolation algorithm to\n\ use, which can be:GRID_CSA:Bivariate Cubic Spline approximation\n\ GRID_DTLI:Delaunay Triangulation Linear Interpolation\n\ GRID_NNI:Natural Neighbors Interpolation\n\ GRID_NNIDW:Nearest Neighbors Inverse Distance Weighted\n\ GRID_NNLI:Nearest Neighbors Linear Interpolation\n\ GRID_NNAIDW: Nearest Neighbors Around Inverse Distance\n\ Weighted\n\ For details of the algorithms read the source file plgridd.c.\n\ \n\ data(PLFLT, input) : Some gridding algorithms require extra data,\n\ which can be specified through this argument. Currently, for\n\ algorithm:GRID_NNIDW, data specifies the number of neighbors to\n\ use, the lower the value, the noisier(more local) the\n\ approximation is.\n\ GRID_NNLI, data specifies what a thin triangle is, in the\n\ range[1. .. 2.]. High values enable the usage of very thin\n\ triangles for interpolation, possibly resulting in error in\n\ the approximation.\n\ GRID_NNI, only weights greater than data will be accepted. If\n\ 0, all weights will be accepted.\n\ " zg
static const char shade or gradient plots n n or n gradient plots(See pllegend for similar functionality for creating\n\ legends with discrete elements). The arguments of plcolorbar provide\n\ control over the location and size of the color bar as well as the\n\ location and characteristics of the elements(most of which are\n\ optional) within that color bar. The resulting color bar is clipped\n\ at the boundaries of the current subpage.(N.B. the adopted coordinate\n\ system used for some of the parameters is defined in the documentation\n\ of the position parameter.)\n\ \n\ Redacted form reads the desired grid location from the input vectors n xg[nptsx] and yg[nptsy]
void c_plshades(PLFLT_MATRIX a, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT_VECTOR clevel, PLINT nlevel, PLFLT fill_width, PLINT cont_color, PLFLT cont_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
void c_plshade(PLFLT_MATRIX a, PLINT nx, PLINT ny, PLDEFINED_callback defined, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLFLT sh_width, PLINT min_color, PLFLT min_width, PLINT max_color, PLFLT max_width, PLFILL_callback fill, PLINT rectangular, PLTRANSFORM_callback pltr, PLPointer pltr_data)
void c_plsvect(PLFLT_VECTOR arrowx, PLFLT_VECTOR arrowy, PLINT npts, PLBOOL fill)
void c_plvect(PLFLT_MATRIX u, PLFLT_MATRIX v, PLINT nx, PLINT ny, PLFLT scale, PLTRANSFORM_callback pltr, PLPointer pltr_data)
void mapform(PLINT n, PLFLT *x, PLFLT *y)