ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 30 Aug 2014 09:05:10 +0200How to draw a 2D vector?https://ask.sagemath.org/question/23999/how-to-draw-a-2d-vector/ I'm sorry, I'm new to this and I really need to draw 2D vectors. But, I wasn't sure how to go about it...I only have limited Python knowledge and from the looks of it, this runs on Python.
I have vector **a**'s trajectory and vector **b**'s trajectory as well... What commands do I put in?
I also need to do vector addition...I'd be really grateful if someone could help me out. Thank you. :) Sat, 30 Aug 2014 06:59:58 +0200https://ask.sagemath.org/question/23999/how-to-draw-a-2d-vector/Answer by FrédéricC for <p>I'm sorry, I'm new to this and I really need to draw 2D vectors. But, I wasn't sure how to go about it...I only have limited Python knowledge and from the looks of it, this runs on Python.
I have vector <strong>a</strong>'s trajectory and vector <strong>b</strong>'s trajectory as well... What commands do I put in?
I also need to do vector addition...I'd be really grateful if someone could help me out. Thank you. :) </p>
https://ask.sagemath.org/question/23999/how-to-draw-a-2d-vector/?answer=24002#post-id-24002Maybe something like that ?
sage: a = vector([1, 2])
sage: b = vector([4, 3])
sage: plot(a, color='red')
sage: plot(a, color='red') + plot(b, color='blue') + plot(a + b, color='black')
Sat, 30 Aug 2014 09:05:10 +0200https://ask.sagemath.org/question/23999/how-to-draw-a-2d-vector/?answer=24002#post-id-24002