The function FilterOptions is used to select valid options when passing options from one function to another.
A utility function for passing options.
As an application of FilterOptions, consider writing a new function PlotIntegrate that calls the functions Plot and Integrate and plots the integral of a function. Although the function PlotIntegrate does not use options directly, it passes options along to Plot and Integrate. Options that are valid for Integrate, however, are not valid for Plot, and options that are valid for Plot are not valid for Integrate. The function FilterOptions is used to select a valid set of options for each function.
This loads the package.
Here is a simple program that uses the FilterOptions function. Valid options are selected using FilterOptions before passing the option sequence to Plot or Integrate.
In this example, the Frame -> True and GridLines -> Automatic options are passed to Plot but not to Integrate. An error would occur if these options were passed to both functions.