Re: Plotting A verticle line?
- To: mathgroup at smc.vnet.net
- Subject: [mg21609] Re: [mg21593] Plotting A verticle line?
- From: BobHanlon at aol.com
- Date: Sun, 16 Jan 2000 22:43:54 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
A simple way is just to draw a line.
Sa[x_ /; x == 0] := 1;
Sa[x_] := Sin[x]/x;
Plot[Sa[x], {x, -2Pi, 2Pi}, PlotStyle -> RGBColor[0, 0, 1],
Ticks -> {Table[{xt, xt}, {xt, -2Pi, 2Pi, Pi/2}], Automatic}];
Sampling this function in steps of Pi/4
Plot[Sa[x], {x, -2Pi, 2Pi}, PlotStyle -> RGBColor[0, 0, 1],
Ticks -> {Table[{xt, xt}, {xt, -2Pi, 2Pi, Pi/2}], Automatic},
Epilog -> {RGBColor[1, 0, 0],
Table[Line[{{xl, 0}, {xl, Sa[xl]}}], {xl, -2Pi, 2Pi, Pi/4}]}];
Bob Hanlon
In a message dated 1/16/2000 5:16:20 AM, skipper at worldnet.att.net writes:
>Well, after reading some of the posts in this group, this is probably
>going to seem like trivial question, but it's really bugging me:
>How do you get Mathematica to plot a straight verticle line?
>
- Follow-Ups:
- a question about complex variable
- From: ZHU Xiaopeng <xpzhu@red.semi.ac.cn>
- a question about complex variable