Ask Your Question
0

How to draw more than one line in a coordinate?

asked 2011-08-03 04:09:30 +0200

When I use line in Sage. it will draw a line for me, with given points, and connect the point with straight line. but now I want to draw more than one line in a coordinate(to compare with each other). I try my best to do this ,but unfortunately, I failed.

line([(0,33.67),(1,34.83),(2,41.15),(3,32.78),(4,32.11),(5,29.98),(6,33.36),(7,29.25),(8,28.03),(9,24.29),(10,25.73),(11,23.95)],rgbcolor=(1/4,1/4,5/4))

this can draw a line in the coordinate ,but now i want more than one. how can i do it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-08-03 08:53:13 +0200

kcrisman gravatar image

I'm really not sure what you are asking. Are you just asking whether you can do these together?

line([(0,1),(1,2),(2,0),(3,0),(4,2)])
line([(0,2),(1,1),(2,3),(3,-1),(4,6)])

The best way (so that you have access to them individually still) is this.

L = line([(0,1),(1,2),(2,0),(3,0),(4,2)])
M = line([(0,2),(1,1),(2,3),(3,-1),(4,6)])
L+M # shows them both

But I'm not convinced this is what you want. Incidentally, enumerate is very helpful if you already have the data and just need to put it in this kind of 0,1,2,3,... order.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-08-03 04:09:30 +0200

Seen: 217 times

Last updated: Aug 03 '11