|
|
|||
|
|
OptionsPattern |
| OptionsPattern[] is a pattern object that represents a collection of options given as rules, where the values of the options can be accessed using OptionValue. |
| OptionsPattern[f] takes default option values from Options[f]. |
| OptionsPattern[{opt1->val1, opt2->val2, ...}] uses an explicit list of default option values. |
Define default option values for the function f:
Define f, allowing options to be given:
Use f with an explicit option setting:
Use f with options taken to have their default values:
Define default option values for this assignment without explicitly setting up Options[f]:
Take default option values from Plot:
Use the defaults from Plot:
Override one of the defaults from Plot:
|
| © 2013 Wolfram Research, Inc. |