PLplot  5.13.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
plplot_impl.c File Reference
#include <caml/alloc.h>
#include <caml/callback.h>
#include <caml/fail.h>
#include <caml/memory.h>
#include <caml/misc.h>
#include <caml/mlvalues.h>
#include <caml/bigarray.h>
#include <plplotP.h>
#include <plplot.h>
#include <stdio.h>

Go to the source code of this file.

Macros

#define MAX_EXCEPTION_MESSAGE_LENGTH   1000
 
#define CAML_PLPLOT_PLOTTER_FUNC_NAME   "caml_plplot_plotter"
 
#define CAML_PLPLOT_MAPFORM_FUNC_NAME   "caml_plplot_mapform"
 
#define CAML_PLPLOT_DEFINED_FUNC_NAME   "caml_plplot_defined"
 
#define CAML_PLPLOT_LABEL_FUNC_NAME   "caml_plplot_customlabel"
 
#define CAML_PLPLOT_ABORT_FUNC_NAME   "caml_plplot_abort"
 
#define CAML_PLPLOT_EXIT_FUNC_NAME   "caml_plplot_exit"
 
#define CAML_PLPLOT_TRANSFORM_FUNC_NAME   "caml_plplot_transform"
 
#define INIT_STRING_ARRAY(o)
 
#define INIT_NC_STRING_ARRAY(o)
 
#define INIT_INT_ARRAY(o)
 
#define INIT_INT_ARRAYS(o)
 

Typedefs

typedef void(* ML_PLOTTER_FUNC )(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
 
typedef PLINT(* ML_DEFINED_FUNC )(PLFLT, PLFLT)
 
typedef void(* ML_MAPFORM_FUNC )(PLINT, PLFLT *, PLFLT *)
 
typedef void(* ML_LABEL_FUNC )(PLINT, PLFLT, char *, PLINT, PLPointer)
 
typedef PLINT(* ML_VARIANT_FUNC )(PLINT)
 

Functions

void ml_plotter (PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
 
PLINT ml_defined (PLFLT x, PLFLT y)
 
void ml_mapform (PLINT n, PLFLT *x, PLFLT *y)
 
void ml_labelfunc (PLINT axis, PLFLT n, char *label, PLINT length, PLPointer d)
 
void ml_abort (const char *message)
 
int ml_exit (const char *message)
 
void ml_transform (PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data)
 
ML_PLOTTER_FUNC get_ml_plotter_func ()
 
ML_DEFINED_FUNC get_ml_defined_func ()
 
ML_MAPFORM_FUNC get_ml_mapform_func ()
 
value ml_plslabelfunc (value unit)
 
value ml_plsabort (value unit)
 
value ml_plsexit (value unit)
 
value ml_plstransform (value unit)
 
void ml_plcont (const PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT *clevel, PLINT nlevel)
 
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_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 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_plvect (const PLFLT **u, const PLFLT **v, PLINT nx, PLINT ny, PLFLT scale)
 
void ml_plsvect_reset ()
 
void ml_plmap (const char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
 
void ml_plmeridians (PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
 
value ml_plgriddata (value x, value y, value z, value xg, value yg, value type, value data)
 
value ml_plgriddata_bytecode (value *argv, int argn)
 
void ml_plpoly3 (PLINT n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT ndraw, PLBOOL *draw, PLBOOL ifcc)
 
void plplot_check_nonzero_result (int result)
 
int translate_parse_option (int parse_option)
 
int lor_ml_list (value list, ML_VARIANT_FUNC variant_f)
 
value ml_plparseopts (value argv, value parse_method)
 
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_plstripc_byte (value *argv, int argn)
 
int translate_legend_option (int legend_option)
 
int translate_colorbar_option (int colorbar_option)
 
int translate_position_option (int position_option)
 
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)
 
value ml_pllegend_byte (value *argv, int argn)
 
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)
 
value ml_plcolorbar_byte (value *argv, int argn)
 
void ml_pltr0 (double x, double y, double *tx, double *ty)
 
value ml_pltr1 (value xg, value yg, value x, value y)
 
value ml_pltr2 (value xg, value yg, value x, value y)
 
int plg_current_col0 (void)
 
PLFLT plg_current_col1 (void)
 
PLFLT plgwidth (void)
 
PLFLT plgchrht (void)
 

Macro Definition Documentation

#define CAML_PLPLOT_ABORT_FUNC_NAME   "caml_plplot_abort"

Definition at line 41 of file plplot_impl.c.

#define CAML_PLPLOT_DEFINED_FUNC_NAME   "caml_plplot_defined"

Definition at line 39 of file plplot_impl.c.

#define CAML_PLPLOT_EXIT_FUNC_NAME   "caml_plplot_exit"

Definition at line 42 of file plplot_impl.c.

#define CAML_PLPLOT_LABEL_FUNC_NAME   "caml_plplot_customlabel"

Definition at line 40 of file plplot_impl.c.

#define CAML_PLPLOT_MAPFORM_FUNC_NAME   "caml_plplot_mapform"

Definition at line 38 of file plplot_impl.c.

#define CAML_PLPLOT_PLOTTER_FUNC_NAME   "caml_plplot_plotter"

Definition at line 37 of file plplot_impl.c.

#define CAML_PLPLOT_TRANSFORM_FUNC_NAME   "caml_plplot_transform"

Definition at line 43 of file plplot_impl.c.

#define INIT_INT_ARRAY (   o)
Value:
int o ## _length; \
o ## _length = Wosize_val( o ); \
int c_ ## o[o ## _length]; \
for ( i = 0; i < ( o ## _length ); i++ ) { ( c_ ## o )[i] = Int_val( Field( ( o ), i ) ); }

Definition at line 666 of file plplot_impl.c.

#define INIT_INT_ARRAYS (   o)
Value:
int o ## _length, o ## _inner; \
o ## _length = Wosize_val( o ); \
int *c_ ## o[o ## _length]; \
for ( i = 0; i < ( o ## _length ); i++ ) { \
INIT_INT_ARRAY( o ## _subarray ); \
( c_ ## o )[i] = c_ ## o ## _subarray; \
}
#define INIT_INT_ARRAY(o)
Definition: plplot_impl.c:666

Definition at line 673 of file plplot_impl.c.

#define INIT_NC_STRING_ARRAY (   o)
Value:
int o ## _length; \
o ## _length = Wosize_val( o ); \
char *c_ ## o[o ## _length]; \
for ( i = 0; i < o ## _length; i++ ) { c_ ## o[i] = String_val( Field( o, i ) ); }

Definition at line 659 of file plplot_impl.c.

#define INIT_STRING_ARRAY (   o)
Value:
int o ## _length; \
o ## _length = Wosize_val( o ); \
const char *c_ ## o[o ## _length]; \
for ( i = 0; i < o ## _length; i++ ) { c_ ## o[i] = String_val( Field( o, i ) ); }

Definition at line 652 of file plplot_impl.c.

#define MAX_EXCEPTION_MESSAGE_LENGTH   1000

Definition at line 36 of file plplot_impl.c.

Typedef Documentation

typedef PLINT( * ML_DEFINED_FUNC)(PLFLT, PLFLT)

Definition at line 46 of file plplot_impl.c.

typedef void( * ML_LABEL_FUNC)(PLINT, PLFLT, char *, PLINT, PLPointer)

Definition at line 48 of file plplot_impl.c.

typedef void( * ML_MAPFORM_FUNC)(PLINT, PLFLT *, PLFLT *)

Definition at line 47 of file plplot_impl.c.

typedef void( * ML_PLOTTER_FUNC)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)

Definition at line 45 of file plplot_impl.c.

typedef PLINT( * ML_VARIANT_FUNC)(PLINT)

Definition at line 49 of file plplot_impl.c.

Function Documentation

ML_DEFINED_FUNC get_ml_defined_func ( )

Definition at line 248 of file plplot_impl.c.

ML_MAPFORM_FUNC get_ml_mapform_func ( )

Definition at line 265 of file plplot_impl.c.

ML_PLOTTER_FUNC get_ml_plotter_func ( )

Definition at line 231 of file plplot_impl.c.

int lor_ml_list ( value  list,
ML_VARIANT_FUNC  variant_f 
)

Definition at line 682 of file plplot_impl.c.

void ml_abort ( const char *  message)

Definition at line 168 of file plplot_impl.c.

PLINT ml_defined ( PLFLT  x,
PLFLT  y 
)

Definition at line 89 of file plplot_impl.c.

int ml_exit ( const char *  message)

Definition at line 187 of file plplot_impl.c.

void ml_labelfunc ( PLINT  axis,
PLFLT  n,
char *  label,
PLINT  length,
PLPointer  d 
)

Definition at line 146 of file plplot_impl.c.

void ml_mapform ( PLINT  n,
PLFLT x,
PLFLT y 
)

Definition at line 114 of file plplot_impl.c.

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 
)

Definition at line 917 of file plplot_impl.c.

value ml_plcolorbar_byte ( value argv,
int  argn 
)

Definition at line 996 of file plplot_impl.c.

void ml_plcont ( const PLFLT **  f,
PLINT  nx,
PLINT  ny,
PLINT  kx,
PLINT  lx,
PLINT  ky,
PLINT  ly,
PLFLT clevel,
PLINT  nlevel 
)

Definition at line 379 of file plplot_impl.c.

value ml_plgriddata ( value  x,
value  y,
value  z,
value  xg,
value  yg,
value  type,
value  data 
)

Definition at line 542 of file plplot_impl.c.

value ml_plgriddata_bytecode ( value argv,
int  argn 
)

Definition at line 601 of file plplot_impl.c.

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 
)

Definition at line 474 of file plplot_impl.c.

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 
)

Definition at line 826 of file plplot_impl.c.

value ml_pllegend_byte ( value argv,
int  argn 
)

Definition at line 907 of file plplot_impl.c.

void ml_plmap ( const char *  type,
PLFLT  minlong,
PLFLT  maxlong,
PLFLT  minlat,
PLFLT  maxlat 
)

Definition at line 513 of file plplot_impl.c.

void ml_plmeridians ( PLFLT  dlong,
PLFLT  dlat,
PLFLT  minlong,
PLFLT  maxlong,
PLFLT  minlat,
PLFLT  maxlat 
)

Definition at line 526 of file plplot_impl.c.

void ml_plotter ( PLFLT  x,
PLFLT  y,
PLFLT tx,
PLFLT ty,
PLPointer  pltr_data 
)

Definition at line 60 of file plplot_impl.c.

value ml_plparseopts ( value  argv,
value  parse_method 
)

Definition at line 699 of file plplot_impl.c.

void ml_plpoly3 ( PLINT  n,
PLFLT x,
PLFLT y,
PLFLT z,
PLINT  ndraw,
PLBOOL draw,
PLBOOL  ifcc 
)

Definition at line 613 of file plplot_impl.c.

value ml_plsabort ( value  unit)

Definition at line 306 of file plplot_impl.c.

value ml_plsexit ( value  unit)

Definition at line 325 of file plplot_impl.c.

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 
)

Definition at line 410 of file plplot_impl.c.

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 
)

Definition at line 450 of file plplot_impl.c.

value ml_plslabelfunc ( value  unit)

Definition at line 284 of file plplot_impl.c.

value ml_plstransform ( value  unit)

Definition at line 346 of file plplot_impl.c.

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 
)

Definition at line 721 of file plplot_impl.c.

value ml_plstripc_byte ( value argv,
int  argn 
)

Definition at line 755 of file plplot_impl.c.

void ml_plsvect_reset ( )

Definition at line 503 of file plplot_impl.c.

void ml_pltr0 ( double  x,
double  y,
double *  tx,
double *  ty 
)

Definition at line 1005 of file plplot_impl.c.

value ml_pltr1 ( value  xg,
value  yg,
value  x,
value  y 
)

Definition at line 1010 of file plplot_impl.c.

value ml_pltr2 ( value  xg,
value  yg,
value  x,
value  y 
)

Definition at line 1030 of file plplot_impl.c.

void ml_plvect ( const PLFLT **  u,
const PLFLT **  v,
PLINT  nx,
PLINT  ny,
PLFLT  scale 
)

Definition at line 493 of file plplot_impl.c.

void ml_transform ( PLFLT  x,
PLFLT  y,
PLFLT xt,
PLFLT yt,
PLPointer  data 
)

Definition at line 208 of file plplot_impl.c.

int plg_current_col0 ( void  )

Definition at line 1085 of file plplot_impl.c.

PLFLT plg_current_col1 ( void  )

Definition at line 1091 of file plplot_impl.c.

PLFLT plgchrht ( void  )

Definition at line 1106 of file plplot_impl.c.

PLFLT plgwidth ( void  )

Definition at line 1098 of file plplot_impl.c.

void plplot_check_nonzero_result ( int  result)

Definition at line 619 of file plplot_impl.c.

int translate_colorbar_option ( int  colorbar_option)

Definition at line 781 of file plplot_impl.c.

int translate_legend_option ( int  legend_option)

Definition at line 763 of file plplot_impl.c.

int translate_parse_option ( int  parse_option)

Definition at line 632 of file plplot_impl.c.

int translate_position_option ( int  position_option)

Definition at line 808 of file plplot_impl.c.