22 #include <caml/alloc.h>    23 #include <caml/callback.h>    24 #include <caml/fail.h>    25 #include <caml/memory.h>    26 #include <caml/misc.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 );
   122     if ( mapform == NULL )
   128     for ( i = 0; i < n; i++ )
   131             caml_callback2( *mapform,
   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 )
   269     if ( mapform == NULL )
   272     if ( mapform == NULL || Val_int( 0 ) == *mapform )
   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 );
   672     return ml_plgriddata( argv[0], argv[1], argv[2], argv[3], argv[4],
   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 ) );
   826     return ml_plstripc( argv[0], argv[1], argv[2], argv[3], argv[4],
   827         argv[5], argv[6], argv[7], argv[8], argv[9],
   828         argv[10], argv[11], argv[12], argv[13], argv[14],
   829         argv[15], argv[16], argv[17], argv[18] );
   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 );
   981     return ml_pllegend( argv[0], argv[1], argv[2], argv[3], argv[4],
   982         argv[5], argv[6], argv[7], argv[8], argv[9],
   983         argv[10], argv[11], argv[12], argv[13], argv[14],
   984         argv[15], argv[16], argv[17], argv[18], argv[19],
   985         argv[20], argv[21], argv[22], argv[23], argv[24],
   986         argv[25], argv[26], argv[27] );
   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 );
  1070     return ml_plcolorbar( argv[0], argv[1], argv[2], argv[3], argv[4],
  1071         argv[5], argv[6], argv[7], argv[8], argv[9],
  1072         argv[10], argv[11], argv[12], argv[13], argv[14],
  1073         argv[15], argv[16], argv[17], argv[18] );
  1077 void 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 );
 void ml_pltr0(double x, double y, double *tx, double *ty)
value ml_plcolorbar_byte(value *argv, int argn)
#define PL_PARSE_NOPROGRAM
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)
void ml_mapform(PLINT n, PLFLT *x, PLFLT *y)
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)
#define PL_COLORBAR_LABEL_TOP
PLINT ml_defined(PLFLT x, PLFLT y)
void c_plsvect(PLFLT_VECTOR arrowx, PLFLT_VECTOR arrowy, PLINT npts, PLBOOL fill)
PLDLLIMPEXP void c_plmap(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy)
#define CAML_PLPLOT_TRANSFORM_FUNC_NAME
#define CAML_PLPLOT_LABEL_FUNC_NAME
void mapform(PLINT n, PLFLT *x, PLFLT *y)
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)
#define CAML_PLPLOT_DEFINED_FUNC_NAME
value ml_plstransform(value unit)
void ml_plvect(const PLFLT **u, const PLFLT **v, PLINT nx, PLINT ny, PLFLT scale)
#define PL_POSITION_BOTTOM
#define PL_LEGEND_BACKGROUND
PLDLLIMPEXP void c_plmeridians(PLMAPFORM_callback mapform, PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
int lor_ml_list(value list, ML_VARIANT_FUNC variant_f)
const char * PLCHAR_VECTOR
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)
value ml_pllegend_byte(value *argv, int argn)
#define PL_COLORBAR_ORIENT_TOP
ML_MAPFORM_FUNC get_ml_mapform_func()
#define PL_COLORBAR_BACKGROUND
#define PL_PARSE_NODELETE
void(* ML_LABEL_FUNC)(PLINT, PLFLT, char *, PLINT, PLPointer)
#define PL_COLORBAR_SHADE
#define CAML_PLPLOT_MAPFORM_FUNC_NAME
void plsabort(void(*handler)(PLCHAR_VECTOR))
#define PL_LEGEND_BOUNDING_BOX
ML_PLOTTER_FUNC get_ml_plotter_func()
value ml_plsexit(value unit)
PLFLT plg_current_col1(void)
value ml_plgriddata(value x, value y, value z, value xg, value yg, value type, value data)
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)
value ml_pltr2(value xg, value yg, value x, value y)
#define MAX_EXCEPTION_MESSAGE_LENGTH
#define PL_POSITION_OUTSIDE
ML_DEFINED_FUNC get_ml_defined_func()
#define PL_POSITION_RIGHT
void(* ML_MAPFORM_FUNC)(PLINT, PLFLT *, PLFLT *)
int ml_exit(const char *message)
#define PL_COLORBAR_LABEL_LEFT
#define PL_LEGEND_ROW_MAJOR
void(* ML_PLOTTER_FUNC)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
#define INIT_INT_ARRAY(o)
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 ml_plmeridians(PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
#define PL_COLORBAR_SHADE_LABEL
value ml_plgriddata_bytecode(value *argv, int argn)
#define PL_COLORBAR_ORIENT_BOTTOM
#define PL_POSITION_VIEWPORT
#define INIT_NC_STRING_ARRAY(o)
#define PL_COLORBAR_GRADIENT
void plFree2dGrid(PLFLT **f, PLINT nx, PLINT PL_UNUSED(ny))
void ml_plcont(const PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel)
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 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)
#define PL_POSITION_SUBPAGE
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_CAP_NONE
value ml_pltr1(value xg, value yg, value x, value y)
PLINT(* ML_DEFINED_FUNC)(PLFLT, PLFLT)
#define INIT_STRING_ARRAY(o)
#define PL_COLORBAR_ORIENT_LEFT
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)
#define CAML_PLPLOT_PLOTTER_FUNC_NAME
const PLINT * PLINT_VECTOR
void plsexit(int(*handler)(PLCHAR_VECTOR))
static PLFLT value(double n1, double n2, double hue)
#define PL_POSITION_INSIDE
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)
PLDLLIMPEXP void c_plmapfill(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
PLINT(* ML_VARIANT_FUNC)(PLINT)
int translate_legend_option(int legend_option)
#define PL_COLORBAR_CAP_HIGH
#define CAML_PLPLOT_EXIT_FUNC_NAME
#define PL_COLORBAR_ORIENT_RIGHT
value ml_plparseopts(value argv, value parse_method)
#define PL_LEGEND_TEXT_LEFT
void plplot_check_nonzero_result(int result)
void plAlloc2dGrid(PLFLT ***f, PLINT nx, PLINT ny)
int plg_current_col0(void)
#define PL_COLORBAR_CAP_LOW
void ml_transform(PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data)
void ml_plmap(PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy)
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_plpoly3(PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT ndraw, PLBOOL *draw, PLBOOL ifcc)
void c_plvect(PLFLT_MATRIX u, PLFLT_MATRIX v, PLINT nx, PLINT ny, PLFLT scale, PLTRANSFORM_callback pltr, PLPointer pltr_data)
void ml_abort(const char *message)
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)
int translate_parse_option(int parse_option)
value ml_plstripc_byte(value *argv, int argn)
PLDLLIMPEXP void c_plmapline(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
#define PL_LEGEND_COLOR_BOX
#define PL_COLORBAR_LABEL_BOTTOM
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)
void ml_plmapfill(PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
#define PL_PARSE_OVERRIDE
void ml_labelfunc(PLINT axis, PLFLT n, char *label, PLINT length, PLPointer d)
#define CAML_PLPLOT_ABORT_FUNC_NAME
int translate_colorbar_option(int colorbar_option)
#define PL_COLORBAR_BOUNDING_BOX
#define PL_COLORBAR_IMAGE
void ml_plmapstring(PLCHAR_VECTOR name, PLCHAR_VECTOR string, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
void ml_plmapline(PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
#define PL_COLORBAR_LABEL_RIGHT
value ml_plslabelfunc(value unit)
void ml_plotter(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
int translate_position_option(int position_option)
value ml_plsabort(value unit)