Credits Overview Plotting Styles Commands Terminals

import

The import command associates a user-defined function name with a function exported by an external shared object. This constitutes a plugin mechanism that extends the set of functions available in gnuplot.

Syntax:

      import func(x[,y,z,...]) from "sharedobj[:symbol]"

Examples:

      # make the function myfun, exported by "mylib.so" or "mylib.dll"
      # available for plotting or numerical calculation in gnuplot
      import myfun(x) from "mylib"
      import myfun(x) from "mylib:myfun"    # same as above
      # make the function theirfun, defined in "theirlib.so" or "theirlib.dll"
      # available under a different name
      import myfun(x,y,z) from "theirlib:theirfun"

The program extends the name given for the shared object by either ".so" or ".dll" depending on the operating system, and searches for it first as a full path name and then as a path relative to the current directory. The operating system itself may also search any directories in LD_LIBRARY_PATH or DYLD_LIBRARY_PATH. See plugins.