本文介绍了如何在 mathematica 中使用 PolarPlot 绘制线“y=x"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为 PolarPlot 应该输入 r=... 类型的命令.

Because PolarPlot should type r=... type of command.

但是 y=x 会导致 r 消失.

But y=x will cause r to disappear.

如何用 PolarPlot 画那条线?

推荐答案

我建议你使用一个新函数来处理这样的事情.

I suggest you use a new function for things like this.

PolarParametricPlot[
  {rT : {_, _} ..} | rT : {_, _},
  uv : {_, _, _} ..,
  opts : OptionsPattern[]
] :=
  ParametricPlot[
    Evaluate[# {Cos@#2, Sin@#2} & @@@ {rT}],
    uv,
    opts
  ]

用法:

PolarParametricPlot[{t, 45 Degree}, {t, -10, 10}]

这篇关于如何在 mathematica 中使用 PolarPlot 绘制线“y=x"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 20:39
查看更多