level 1
期限耿耿
楼主
最近在画图,很简单,用Plot命令来画。但是在细节上需要添加一些文字,设置下文字大小,数字输出格式,文字的位置,加边框之类的。 虽然在别的网站上得到解答,但是感觉都没看懂命令。 主要是MMA 有、。->@&等的符号。 如下面所示
c\[Eta]0111ax[V_, X_] := 1/2 E^(-(1/2) Re[V X^2]) V^3 Abs[X/V]^2;
Q = Table[
Plot[c\[Eta]0111ax[4, X], {X, 0, t}, PlotRange -> {{0, 2}, {0, 1}},
Frame -> True,
PlotLegends ->
Placed[{TextString@
Row@{"X=", t, "\n", "\[Eta]=",
NumberForm[(100 c\[Eta]0111ax[4, t]), 4], "%"}},
Scaled[{0.8, 0.9}]], Filling -> Axis], {t, 0.01, 2, 0.01}];
再赋一个别的人命令,这个真的是完全没看懂。
To realize the constant-speed drawing, you'll need to re-parameterize the equation to use the arc-length parameter:ds=∥∥∥dr(θ)dθ∥∥∥dθds=‖dr(θ)dθ‖dθr = Cos[2 θ] {Cos[θ], Sin[θ]}reParaEq = θ'[s] == 1/FullSimplify[Sqrt[#.#] &@D[r, θ] /. θ -> θ[s]]θFunc = DSolveValue[{reParaEq, θ[0] == 0}, θ, s][s](* And the max value of the arc-length: *){sMax} = s /. Solve[θFunc == 2 π, s]
wholePlot = ParametricPlot[Evaluate[r /. θ -> θFunc], {s, 0, sMax}, PlotPoints -> 200, MaxRecursion -> 0 ]frames = wholePlot /. ({Line[pts_] :> Line[pts[[;; #]]]} & /@ Range[200]);
有人可以帮忙解答一下吗/
这个是上述代码的来源
http://mathematica.stackexchange.com/questions/66992/exporting-of-animated-gif-from-polar-plot
2017年03月16日 01点03分
1
c\[Eta]0111ax[V_, X_] := 1/2 E^(-(1/2) Re[V X^2]) V^3 Abs[X/V]^2;
Q = Table[
Plot[c\[Eta]0111ax[4, X], {X, 0, t}, PlotRange -> {{0, 2}, {0, 1}},
Frame -> True,
PlotLegends ->
Placed[{TextString@
Row@{"X=", t, "\n", "\[Eta]=",
NumberForm[(100 c\[Eta]0111ax[4, t]), 4], "%"}},
Scaled[{0.8, 0.9}]], Filling -> Axis], {t, 0.01, 2, 0.01}];
再赋一个别的人命令,这个真的是完全没看懂。
To realize the constant-speed drawing, you'll need to re-parameterize the equation to use the arc-length parameter:ds=∥∥∥dr(θ)dθ∥∥∥dθds=‖dr(θ)dθ‖dθr = Cos[2 θ] {Cos[θ], Sin[θ]}reParaEq = θ'[s] == 1/FullSimplify[Sqrt[#.#] &@D[r, θ] /. θ -> θ[s]]θFunc = DSolveValue[{reParaEq, θ[0] == 0}, θ, s][s](* And the max value of the arc-length: *){sMax} = s /. Solve[θFunc == 2 π, s]
wholePlot = ParametricPlot[Evaluate[r /. θ -> θFunc], {s, 0, sMax}, PlotPoints -> 200, MaxRecursion -> 0 ]frames = wholePlot /. ({Line[pts_] :> Line[pts[[;; #]]]} & /@ Range[200]);
有人可以帮忙解答一下吗/
这个是上述代码的来源
http://mathematica.stackexchange.com/questions/66992/exporting-of-animated-gif-from-polar-plot