- See Also
-
Related Guides
- Options Management
- Low-Level Notebook Programming
- Session Customization
- Programmatic Notebook & Interface Customization
- Sharing & Embedding Content
- Creating Form Interfaces & Apps
- Creating Instant APIs
- Low-Level System Optimization
- Package Development
- Wolfram System Setup
- Palettes
- Persistent Storage
- Toolbars
- Cloud Permissions Control
- Wolfram Data Repository
- Wolfram Resource System
- Structured Data in the Cloud
- Workflows
- Tech Notes
-
- See Also
-
Related Guides
- Options Management
- Low-Level Notebook Programming
- Session Customization
- Programmatic Notebook & Interface Customization
- Sharing & Embedding Content
- Creating Form Interfaces & Apps
- Creating Instant APIs
- Low-Level System Optimization
- Package Development
- Wolfram System Setup
- Palettes
- Persistent Storage
- Toolbars
- Cloud Permissions Control
- Wolfram Data Repository
- Wolfram Resource System
- Structured Data in the Cloud
- Workflows
- Tech Notes
SetOptions[s,name1value1,name2value2,…]
sets the specified default options for a symbol s.
SetOptions[stream,…] or SetOptions["name",…]
sets options associated with a particular stream.
SetOptions[object,…]
sets options associated with an external object such as a NotebookObject or CloudObject.
SetOptions
SetOptions[s,name1value1,name2value2,…]
sets the specified default options for a symbol s.
SetOptions[stream,…] or SetOptions["name",…]
sets options associated with a particular stream.
SetOptions[object,…]
sets options associated with an external object such as a NotebookObject or CloudObject.
Details
- SetOptions is equivalent to an assignment that redefines certain elements of the list Options[s] of default options.
- SetOptions can be used on Protected symbols that do not also have the Locked attribute.
- SetOptions returns the new form of Options[s].
- You can use SetOptions on InputStream and OutputStream objects. If there is only one stream with a particular name, you can give the name as a string as the argument of Options.
- SetOptions can be used on a list of streams, such as the value of $Output.
- If object refers to a front end object such as $FrontEnd, NotebookObject, or CellObject, the kernel will send a request to the front end that will immediately make the change specified.
Examples
open all close allBasic Examples (1)
Scope (4)
Reset the default precision for HilbertMatrix:
SetOptions[HilbertMatrix, WorkingPrecision -> MachinePrecision]Now HilbertMatrix uses machine numbers by default:
HilbertMatrix[2]A specific option setting overrides the new default:
HilbertMatrix[2, WorkingPrecision -> 20]SetOptions[HilbertMatrix, WorkingPrecision -> ∞];Start writing to a temporary file:
stream = OpenWrite[]Set the page width to 10 characters:
SetOptions[stream, PageWidth -> 10]Write Range[10] to the file and close the stream:
Write[stream, Range[10]];
Close[stream]Line breaks occur at the 10th column:
FilePrint[%]Create a reference to the input cell:
cell = EvaluationCell[]Change the background of the cell to red:
SetOptions[cell, Background -> Red]Restore the setting of the cell, which will cause it to inherit from the notebook:
SetOptions[cell, Background -> Inherited]Change the Permissions of a CloudObject:
obj = CloudDeploy[Manipulate[Plot[Sin[x(1 + a x)], {x, 0, 6}], {a, 0, 2}], "manipulate-options"]SetOptions[obj, Permissions -> {"Authenticated" -> {"Read", "Interact"}}]Properties & Relations (2)
SetOptions can be used to modify protected symbols:
SetOptions[Plot, PlotLabel -> "label"];Options[Plot, PlotLabel]The symbol still has attribute Protected:
Attributes[Plot]SetOptions[Plot, PlotLabel -> None];SetOptions resets the Permissions value entirely (except for the owner's permissions):
obj = CloudDeploy[42, "obj-permissions"]SetOptions[obj, Permissions -> {"Authenticated" -> "Read"}]SetOptions[obj, Permissions -> {All -> "Read"}]Options[obj, Permissions]SetPermissions only resets the capabilities of the given user groups:
SetPermissions[obj, {"Authenticated" -> "Read"}]Options[obj, Permissions]Possible Issues (2)
SetOptions can only be used to change the default value of an option, not to add a new one:
Options[f] = {a -> 1}SetOptions[f, b -> 2]Use AppendTo, PrependTo and similar functions to add additional options to a function:
AppendTo[Options[f], b -> 2]For notebook options with rules, it can be awkward to make a targeted change to a specific rule:
SetOptions[$FrontEnd, EvaluatorNames -> Append[DeleteCases[EvaluatorNames /. Options[$FrontEnd, EvaluatorNames], _["NewKernel1", _]], "NewKernel1" -> {"AutoStartOnLaunch" -> False}]]CurrentValue provides a better way of adding or changing specific rules:
CurrentValue[$FrontEnd, {EvaluatorNames, "NewKernel1"}] = {"AutoStartOnLaunch" -> False}See Also
Tech Notes
Related Guides
-
▪
- Options Management ▪
- Low-Level Notebook Programming ▪
- Session Customization ▪
- Programmatic Notebook & Interface Customization ▪
- Sharing & Embedding Content ▪
- Creating Form Interfaces & Apps ▪
- Creating Instant APIs ▪
- Low-Level System Optimization ▪
- Package Development ▪
- Wolfram System Setup ▪
- Palettes ▪
- Persistent Storage ▪
- Toolbars ▪
- Cloud Permissions Control ▪
- Wolfram Data Repository ▪
- Wolfram Resource System ▪
- Structured Data in the Cloud
Related Workflows
History
Introduced in 1988 (1.0) | Updated in 1996 (3.0) ▪ 2012 (9.0)
Text
Wolfram Research (1988), SetOptions, Wolfram Language function, https://reference.wolfram.com/language/ref/SetOptions.html (updated 2012).
CMS
Wolfram Language. 1988. "SetOptions." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/SetOptions.html.
APA
Wolfram Language. (1988). SetOptions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetOptions.html
BibTeX
@misc{reference.wolfram_2026_setoptions, author="Wolfram Research", title="{SetOptions}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/SetOptions.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_setoptions, organization={Wolfram Research}, title={SetOptions}, year={2012}, url={https://reference.wolfram.com/language/ref/SetOptions.html}, note=[Accessed: 13-June-2026]}