Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
0

2D Points, best paractive to store Points

asked 6 years ago

thetha gravatar image
sage: from sage.plot.point import Point
sage: P = Point([1,2],[2,3],{'alpha':.5})
sage: P
Point set defined by 2 point(s)
sage: P.options()['alpha']
0.500000000000000
sage: P.xdata
[1, 2]

Why is this not working:

sage: P = Point([1,2],[2,3])

Why do I need this alpha Parameter?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 6 years ago

rburing gravatar image

The documentation of Point states:

Note this should normally be used indirectly via "point" and friends

Indeed, you can do

point([(1,2),(2,3)])

which returns a Graphics object. Is that what you want?

If you want to do anything else with the points then I would just store them as tuples, e.g.

pts = [(1,2), (2,3)]
pts_plot = points(pts)

With the (stored) plot you can also do other things, e.g.

pts_plot + plot(1+x, (x,1,2))
Preview: (hide)
link

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 307 times

Last updated: Feb 13 '19