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.Tue, 27 Aug 2013 14:15:14 +0200Plotting Sequence of Pointshttps://ask.sagemath.org/question/10475/plotting-sequence-of-points/How do I plot the sequence {1/n} for n = 1 to 100 in Sage? I browsed plot?, but didn't see it as an option, or I didn't know what it was called. Tue, 27 Aug 2013 13:43:54 +0200https://ask.sagemath.org/question/10475/plotting-sequence-of-points/Answer by kcrisman for <p>How do I plot the sequence {1/n} for n = 1 to 100 in Sage? I browsed plot?, but didn't see it as an option, or I didn't know what it was called. </p>
https://ask.sagemath.org/question/10475/plotting-sequence-of-points/?answer=15380#post-id-15380Try this:
points([(n,1/n) for n in range(1,101)])
You can use `list_plot` as well.Tue, 27 Aug 2013 14:01:10 +0200https://ask.sagemath.org/question/10475/plotting-sequence-of-points/?answer=15380#post-id-15380Comment by david8381 for <p>Try this:</p>
<pre><code>points([(n,1/n) for n in range(1,101)])
</code></pre>
<p>You can use <code>list_plot</code> as well.</p>
https://ask.sagemath.org/question/10475/plotting-sequence-of-points/?comment=17123#post-id-17123Thank you - that works.Tue, 27 Aug 2013 14:15:14 +0200https://ask.sagemath.org/question/10475/plotting-sequence-of-points/?comment=17123#post-id-17123