Conversation started Jan 19, 2019 at 16:52.
Jan 19, 2019 16:52
Hi everyone, I want to draw a well, which actually the function pot[x_]:=Which[x<0,Infinity,0<=x<=a,-v,x>a,0] .. using Plot I am getting a picture which doesn't have the end points connected, I think using `Plot' I can't get the picture I want.
I want it like a well.. i.e; an extra vertical line connecting {a,-v} and {a,0}
In short how can I plot multiple lines in a single figure with Graphics[Line{...}]
 
1 hour later…
Jan 19, 2019 18:25
@taritgoswami Try this: `a = 1;
v = 1;
pot[x_] := Which[x < 0, Infinity, 0 <= x <= a, -v, x > a, 0];
Plot[pot[x], {x, -1, 3}, Exclusions -> False]`
Or Plot[pot[x], {x, -1, 3}, Exclusions -> False, PlotRange -> {-2, 10}]
 
Conversation ended Jan 19, 2019 at 18:27.