Ask Your Question

2D Points, best paractive to store Points

asked 2019-02-13 11:33:40 +0100

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']
sage: P.xdata
[1, 2]

Why is this not working:

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

Why do I need this alpha Parameter?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-13 13:04:50 +0100

rburing gravatar image

The documentation of Point states:

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

Indeed, you can do


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))
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

1 follower


Asked: 2019-02-13 11:33:40 +0100

Seen: 213 times

Last updated: Feb 13 '19