wolfram-mathematica - 数学 : AbsoluteOptions not working properly

标签 wolfram-mathematica

根据文档 AbsoluteOptions[expr,name] “给出选项名称的绝对设置”。

"AbsoluteOptions 给出了当给定的设置是自动或全部时 Mathematica 内部使用的选项的实际设置。

这是他们展示的一个例子:

<< AbsoluteOptions[Plot[Sin[x], {x, 0, 2 Pi}, 
     PlotRange -> Automatic], PlotRange]
>> {PlotRange -> {{0., 6.28319}, {-1., 1.}}}

这里我用<<表示输入,用>>表示输出。

这似乎工作正常。但是,当我尝试获取 AspectRatio 时一个情节它只是给我自动。尝试这个,
AbsoluteOptions[
 ListPlot3D[{{1, 1, 1, 1}, {1, 2, 1, 2}, {1, 1, 3, 1}, {1, 2, 1, 4}}, 
  AspectRatio -> Automatic],
  AspectRatio
 ]

与他们显示的示例格式类似,但我得到的输出很简单
{AspectRatio->Automatic}

这是否意味着参数 expr只能是 Graphics对象而不是 Graphics3D ?这没有意义,因为如果我尝试获取 PlotRange ,它可以正常工作。的 Graphics3D目的。这是一个错误还是我的 mathematica 坏了?另一件事可能是文档不是很具体。哪一个?
这是文档的链接:

http://reference.wolfram.com/mathematica/ref/AbsoluteOptions.html

我正在使用 Mathematica 7.0.1.0。

最佳答案

您可以申请 ImageDimensions直接到 Graphics3D得到它的 ImageSize .

看来AbsoluteOptions只是自 Mathematica 4 起未修改(参见相应 documentation page 的底部)。此函数非常有问题(例如,对于 PlotRange 生成的二维图形,通常为 Show 提供错误的值),有时就像您在问题中指出的那样根本不起作用。与 FullOptions 比较和 FullGraphics 这些似乎自第 2 版以来就没有修改过...有时 FullOptionsAbsoluteOptions 时给出正确的值给出错误或根本不起作用。

关于wolfram-mathematica - 数学 : AbsoluteOptions not working properly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6296996/

相关文章:

wolfram-mathematica - 在Mathematica中使用BinCounts或直方图进行FindFit

wolfram-mathematica - 在 PackedArray 上,寻找使用它们的建议

error-handling - 在 Mathematica 中捕获错误(不是异常)

c++ - Mathematica/CUDA 减少执行时间

wolfram-mathematica - 如何最大化 Mathematica 中将可变长度列表作为输入的函数?

cuda - 在 Thrust 中读取已分配的内存/向量

wolfram-mathematica - 数学 : Unwanted vertical line in histogram

recursion - OCaml 中的内存?

regex - Mathematica中的错误: regular expression applied to very long string

wolfram-mathematica - 如何在 Mathematica 中定义抽象奇函数?关于衍生品