Bla*_*dow 9 plot wolfram-mathematica function
我还有一个关于Wolfram Mathematica的问题.有人知道如何在y轴上绘制图形吗?
我希望这个数字有所帮助.

ParametricPlot[{5 Sin[y], y}, {y, -2 \[Pi], 2 \[Pi]},
Frame -> True, AxesLabel -> {"x", "y"}]
Run Code Online (Sandbox Code Playgroud)

编辑
到目前为止给出的答案都不能与Plot的Filling选项一起使用.GraphicsComplex在这种情况下,Plot的输出包含一个(顺便提一下,打破了Mr.Wizard的替换).要获得填充功能(它不适用于没有填充的标准图),您可以使用以下内容:
Plot[Sin[x], {x, 0, 2 \[Pi]}, Filling -> Axis] /. List[x_, y_] -> List[y, x]
Run Code Online (Sandbox Code Playgroud)

Plot[{Sin[x], .5 Sin[2 x]}, {x, 0, 2 \[Pi]}, Filling -> {1 -> {2}}]
/. List[x_, y_] -> List[y, x]
Run Code Online (Sandbox Code Playgroud)

您可以在绘图后翻转轴Reverse:
g = Plot[Sin[x], {x, 0, 9}];
Show[g /. x_Line :> Reverse[x, 3], PlotRange -> Automatic]
Run Code Online (Sandbox Code Playgroud)

通过一个小的改动,这适用于使用的情节Filling:
g1 = Plot[{Sin[x], .5 Sin[2 x]}, {x, 0, 2 \[Pi]}];
g2 = Plot[{Sin[x], .5 Sin[2 x]}, {x, 0, 2 \[Pi]}, Filling -> {1 -> {2}}];
Show[# /. x_Line | x_GraphicsComplex :> x~Reverse~3,
PlotRange -> Automatic] & /@ {g1, g2}
Run Code Online (Sandbox Code Playgroud)

(这可能是更健壮的替换的RHS :>用MapAt[#~Reverse~2 &, x, 1])
这是我建议使用的表格.它包括翻转原文PlotRange而不是强制PlotRange -> All:
axisFlip = # /. {
x_Line | x_GraphicsComplex :>
MapAt[#~Reverse~2 &, x, 1],
x : (PlotRange -> _) :>
x~Reverse~2 } &;
Run Code Online (Sandbox Code Playgroud)
用作:axisFlip @ g1或axisFlip @ {g1, g2}
可以产生不同的效果Rotate:
Show[g /. x_Line :> Rotate[x, Pi/2, {0,0}], PlotRange -> Automatic]
Run Code Online (Sandbox Code Playgroud)

一种可能性是使用ParametricPlot这样的:
ParametricPlot[
{-y*Exp[-y^2], y}, {y, -0.3, 4},
PlotRange -> {{-2, 2}, All},
AxesLabel -> {"x", "y"},
AspectRatio -> 1/4
]
Run Code Online (Sandbox Code Playgroud)

纯娱乐:
ContourPlot是另一种选择.使用Thies功能:
ContourPlot[-y*Exp[-y^2/2] - x == 0,
{x, -2, 2}, {y, 0, 4},
Axes -> True, Frame -> None]
Run Code Online (Sandbox Code Playgroud)

RegionPlot是另一个
RegionPlot[-y*Exp[-y^2/2] > x,
{x, -2.1, 2.1}, {y, -.1, 4.1},
Axes -> True, Frame -> None, PlotStyle -> White,
PlotRange -> {{-2, 2}, {0, 4}}]
Run Code Online (Sandbox Code Playgroud)

最后,一个真正令人费解的方式使用ListCurvePathPlot和Solve:
Off[Solve::ifun, FindMaxValue::fmgz];
ListCurvePathPlot[
Join @@
Table[
{x, y} /. Solve[-y*Exp[-y^2/2] == x, y],
{x, FindMaxValue[-y*Exp[-y^2/2], y], 0, .01}],
PlotRange -> {{-2, 2}, {0, 4}}]
On[Solve::ifun, FindMaxValue::fmgz];
Run Code Online (Sandbox Code Playgroud)

无关
回答Sjoerd的None of the answers given thus far can work with Plot's Filling option.
回复:没必要
f={.5 Sin[2 y],Sin[y]};
RegionPlot[Min@f<=x<=Max@f,{x,-1,1},{y,-0.1,2.1 Pi},
Axes->True,Frame->None,
PlotRange->{{-2,2},{0,2 Pi}},
PlotPoints->500]
Run Code Online (Sandbox Code Playgroud)
