ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 13 Feb 2019 06:04:50 -06002D Points, best paractive to store Pointshttp://ask.sagemath.org/question/45444/2d-points-best-paractive-to-store-points/
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?
Wed, 13 Feb 2019 04:33:40 -0600http://ask.sagemath.org/question/45444/2d-points-best-paractive-to-store-points/Answer by rburing for <pre><code>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]
</code></pre>
<p>Why is this not working:</p>
<pre><code>sage: P = Point([1,2],[2,3])
</code></pre>
<p>Why do I need this alpha Parameter?</p>
http://ask.sagemath.org/question/45444/2d-points-best-paractive-to-store-points/?answer=45447#post-id-45447The 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))Wed, 13 Feb 2019 06:04:50 -0600http://ask.sagemath.org/question/45444/2d-points-best-paractive-to-store-points/?answer=45447#post-id-45447