Tag Info

New answers tagged

9

Fortunately there is a solution but it appears to be undocumented and takes a bit of guess work. The magic is: FilledCurveBoxOptions -> {Method -> {"SplinePoints" -> (* integer value *)}} This may be set globally or for a Notebook: SetOptions[InputNotebook[], FilledCurveBoxOptions -> {Method -> {"SplinePoints" -> 30}}] (Use $FrontEnd ...


6

Without a more complete example of your function all I can offer are bare guidelines to (hopefully) point you in the right direction. The first level is merely syntactical; you would use OptionsPattern, OptionValue etc., in a high level function simply for convenience, but pass all arguments as machine types to an inner compiled function. A second level is ...


4

Scaled and ImageScaled coordinates are extremely useful to study the behaviors of the options for Graphics. I'll try to contribute what I can. What follows, mostly applies to Plot and similar functions. Often Graphics created explicitly with the Graphics head, such as those in Mr.Wizard's answer may behave differently, as compared to Plot. First example: ...


10

Padding Without padding of any kind the over-all aspect ratio and element (primitive) aspect ratio are the same and as specified: g0 = Graphics[{Opacity[0.5, Red], Rectangle[{0, 0}, {3, 2}]}, AspectRatio -> 2/3, Background -> GrayLevel[0.8], PlotRangePadding -> 0] (There is a one pixel discrepancy along the right edge where the background ...


4

It seems to me that there is little point in making the image size so small that the image cannot possibly have a close to accurate aspect ratio. If I also get rid of the superfluous parts outside of the plot range by setting PlotRangePadding, ImagePadding, and ImageMargins all to zero, I can use simple ImageDimensions to check aspect ratio. Doing all this ...


6

Experimentation based on the documentation you quoted led to two valid Method options: MatrixExp[{{1.2, 5.6}, {3, 4}}, Method -> "Pade"] {{346.557, 661.735}, {354.501, 677.425}} MatrixExp[{{1.2, 5.6}, {3, 4}}, {1, 2}, Method -> "Krylov"] {1670.03, 1709.35} If "Krylov" is used for the single parameter syntax it complains: MatrixExp[{{1.2, ...


5

Let's start with slightly modified version of mergeRules, that takes into account fact that options can have symbolic or string names and name -> val is treated the same as "name" -> val: ClearAll[symbolToName, deleteOptionDuplicates] symbolToName[sym_Symbol] := SymbolName[sym] symbolToName[arg_] := arg deleteOptionDuplicates[opts:OptionsPattern[]] ...


7

Thanks for asking this question; I might not have discovered this customizable area without it. The auto-completion option values are automatically loaded on Front End start from: FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd", "SystemResources", "FunctionalFrequency", "OptionValues"}] This directory contains a series of Package (.m) ...


8

I have no idea if the old syntax was removed for a reason, but normal behaviour can be returned with the following workaround: Unprotect[Visualization`Utilities`FrameTicksQ]; Visualization`Utilities`FrameTicksQ[{ _?Visualization`Utilities`OptionsDump`tickListQ, _?Visualization`Utilities`OptionsDump`tickListQ, ...


9

Following your clarification this seems to be OK, though I would agree that a cleaner solution would be nice: Options[f] = {foo -> bar, ImageSize -> 333}; f[args__, opts : OptionsPattern[{f, Button, Tooltip}]] := Append[ FilterRules[{opts, Options @ f}, Options @ #] & /@ {Button, Tooltip}, OptionValue[foo] ] // Column Test: f[1, 2, ...


3

Update: Another work-around: Use DiscretePlot3D You can use the datasets xyzData and predictedZ to define two functions, say foo1 and foo2 ClearAll[foo1, foo2]; (foo1[#, #2] = #3) & @@@ xyzData; (foo2[#, #2] = #3) & @@@ predictedZ; dp3d = DiscretePlot3D[{foo1[x, y], foo2[x, y]}, {x, xyzData[[All, 1]]}, {y, xyzData[[All, 2]]}, ImageSize -> ...



Top 50 recent answers are included