Plot[f,{x,xmin,xmax}], ListPlot[f,{x,xmin,xmax}]
LogLinearPlot[f,{x,xmin,xmax}], ListLogLinearPlot[f,{x,xmin,xmax}]
LogPlot[f,{x,xmin,xmax}], ListLogPlot[f,{x,xmin,xmax}]
是图形函数的一个选项,用以指定是否应该画出坐标轴.
Plot[f,{x,xmin,xmax}, PlotLegneds -> {True,None}]
True
: 画出所有坐标轴None
: 不画坐标轴{True,None}
: 不画出 x 轴, 画出 y 轴Plot[Sinc[x], {x, 0, 10}, AxesLabel -> Sinc[x]]
: y轴标签Plot[Sinc[x], {x, 0, 10}, AxesLabel -> {x,Sinc[x]}]
: x轴标签 + y轴标签Plot[Sin[x], {x, 0, 10}, Ticks -> { {0, Pi, 2 Pi, 3 Pi}, {-1, 1} }]
Automatic
:自动放置刻度None
: 不绘制刻度{xticks,yticks}
: 对每个坐标轴分别指定刻度Plot[f,{x,xmin,xmax}, PlotLegneds -> Automatic]
Automatic
: 用可编辑的占位符作为图例"Expressions"
: 用所绘曲线的表达式作为图例{"sin(x)", "cos(x)"}
: 指定作为图例的文字Placed[{"sin(x)", "cos(x)"}, Above]
: 把图例置于绘图的上面Plot[f,{x,xmin,xmax}, PlotLabels -> "Expressions"]
Automatic
:"Expressions"
: 用所绘曲线的表达式作为标签{"sin(x)", "cos(x)"}
: 指定数据使用的标签Placed[{Automatic, Above]
: 把数据置于绘图的上面Plot[BesselJ[1, x], {x, 0, 10}, PlotLabel -> BesselJ[1, x]]
: 对标签用任何 Wolfram 语言的符号Plot[BesselJ[1, x], {x, 0, 10}, PlotLabel -> BesselJ[1, x]]
: 对标签用任何 Wolfram 语言的符号Plot[f,{x,xmin,xmax}, GridLines -> {xGrid,yGrid}]
利用 Tabel
数组,嵌套的数组利用 Flatten
打平
xGrid = Flatten[Table[j*Table[10^i, {i, 1, 6}], {j, 1, 9}]];
yGrid = Table[i, {i, -20, 70, 6}];
Plot[f,{x,xmin,xmax}, Frame -> True]
True
: 在整个对象周围绘制边框线False
或 None
: 不绘制边框线All
: 在 Grid 的每一个项周围绘制边框线等Plot[f,{x,xmin,xmax}, FrameTicks -> True]
True
: 自动在底部和左边放置刻度None
: 不绘制刻度All
: 自动在每边放置刻度{ {left,right},{bottom,top} }
: 分别指定每边的刻度选项,这的虚线可以数组 {0,1,2}
,也可以是True/None
Plot[{Sin[x],Cos[x],2*Cos[x]}, {x, 0, 10}, Filling-> Axis]
None
: 没有填充 ( 缺省)Axis
: 填充至轴Bottom
: 填充至图形底部Top
: 填充至图形顶部v
: 填充至值 v{m}
: 填充至第 m个对象,即前面的第几个函数{i1->p1, i2-> p2, ...}
: 从对象 ik 到 pk 填充, 例如对于7,Sin[x]
填充到第2个对象即 Cos[x]
;Cos[x]
填充到数值 0.1
;2*Cos[x]
填充到顶部 Top
;
Plot[{Sin[x],Cos[x],2*Cos[x]}, {x, 0, 10}, Filling-> {1->{2},2->0.1,3->Top}]
Plot[{Sin[x],Cos[x],2*Cos[x]}, {x, 0, 10}, ImageSize-> Medium]
Automatic
: 通过位置或其它维数确定(默认)Tiny, Small, Medium, Large
: 预定义绝对大小{w,h}
: 显式的宽度和高度Plot[{Sin[x],Cos[x],2*Cos[x]}, {x, 0, 10}, AspectRatio-> Medium]
Automatic
: 根据实际坐标值确定比值Full
: 拉伸图形填充封闭区域a
: 明确的高宽比,比如 1
或者 0.5
Plot[{Sin[x], {x, 0, 10}, PlotStyle-> Red]
搜索帮助文档 GraphicsDirectives 更多的 PlotStyle 的结果,同时可以使用 Directive[g1,g2...]
的方式指定多个图形指令。常用的有如下
Blue,Red,Orange...
: 颜色Thick, Thin
: 线宽Dashed, Dotted, DotDashed, Dashing
: 虚线