RE: Setting Options Back to Default Values? (and other graphics queries)
- To: mathgroup at smc.vnet.net
- Subject: [mg37998] RE: [mg37984] Setting Options Back to Default Values? (and other graphics queries)
- From: "David Park" <djmp at earthlink.net>
- Date: Mon, 25 Nov 2002 01:56:29 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
1) Save and restore the default options. pts = Table[Sin[x], {x, 0, 2Pi, 2Pi/30}]; ListPlot[pts]; saveListPlotOptions = Options[ListPlot]; SetOptions[ListPlot, PlotJoined -> True, Frame -> True, FrameLabel -> {x, y}, ImageSize -> 400]; ListPlot[pts]; SetOptions[ListPlot, Sequence @@ saveListPlotOptions]; ListPlot[pts]; 2) Within Mathematica and a single plot you can use the TextStyle option. ListPlot[pts, PlotLabel -> "A Sine Wave", TextStyle -> {FontFamily -> "Helvetica", FontSize -> 12, FontWeight -> "Bold"}]; For a whole notebook, initialize with $TextStyle -> {FontFamily -> "Helvetica", FontSize -> 12, FontWeight -> "Bold"} ListPlot[pts, PlotLabel -> "A Sine Wave"]; 3)Use the AxesFront option from the FilledPlot package. Needs["Graphics`FilledPlot`"] Needs["Graphics`Colors`"] Show[Graphics[ {LightCadmiumYellow, Disk[{0, 0}, 1]}, AspectRatio -> Automatic, Axes -> True, AxesFront -> True]]; I have always maintained that AxesFront should be a general Graphics option and not buried in the FilledPlot package. If you use my DrawGraphics package the FilledPlot package is automatically loaded whenever you use AxesFront. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: AES Newspost [mailto:siegman at stanford.edu] To: mathgroup at smc.vnet.net 1) Suppose you've been mucking around, changing defaults for various commands (e.g., ListPlot), and don't remember what the default options were. Is there a way to set all the options for a given command back to their default (startup) values? (Other than shutting down and restarting.) 2) I still find the whole PrivateFontOptions and "OperatorSubstitution" -> False options for use in graphics output confusing (and poorly documented). Suppose I want all the Ticks, Axes, Frame and Plot Labels, Text created in Prologs and Epilogs, and generally any alphameric type appearing anywhere in any graphics created by Plot, ListPlot, ParametricPlot, DisplayTogether, etc, all to be Helvetica Font Family, FontSize 12, FontWeight Bold, and no Operator Substitution, globally in a given notebook. What incantations of FormatType -> OutputForm or PrivateFontOptions or "OperatorSubstitution" -> False do I put in the initialization section of the notebook, in what form? 3) Trial and error seems to show that in the generation of a graphic, graphic elements (lines, points, etc) are laid down in the order in which they're invoked, e.g., Lines or Text in a Prolog are overwritten by subsequent curves or points, whereas stuff in an Epilog overwrites already generated graphic elements. (I assume layers are at work here.) The axes and tick labels, however, always seem to be laid down first, so that everything else overwrites them, which is opposite to how I'd like to do it. (If a blue curve passes through a black tick label, seems more sensible to have the tick label on top.) Is there a way to write the axes, or at least the tick labels, last? ----- "Power tends to corrupt. Absolute power corrupts absolutely." Lord Acton (1834-1902) (slightly modified) "Dependence on advertising tends to corrupt. Total dependence on advertising corrupts totally." -- Modern equivalent.