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.Tue, 17 May 2011 11:39:10 -0500Plot a list of 3D datahttp://ask.sagemath.org/question/8104/plot-a-list-of-3d-data/Hello!
I have a task to plot a list of 3D data of the following form:
x y z
(1, 1, 1)
(1, 5, 7)
(8.8, 0, 3)
(7.5, 1.91, 11.8)
(0, 0, 0)
It looks like with "list_plot3d()" I can only get a surface, while I need just the dots with the appropriate coordinates (x, y, z). How can I do that?Tue, 17 May 2011 11:01:22 -0500http://ask.sagemath.org/question/8104/plot-a-list-of-3d-data/Answer by benjaminfjones for <p>Hello!
I have a task to plot a list of 3D data of the following form:</p>
<pre><code> x y z
(1, 1, 1)
(1, 5, 7)
(8.8, 0, 3)
(7.5, 1.91, 11.8)
(0, 0, 0)
</code></pre>
<p>It looks like with "list_plot3d()" I can only get a surface, while I need just the dots with the appropriate coordinates (x, y, z). How can I do that?</p>
http://ask.sagemath.org/question/8104/plot-a-list-of-3d-data/?answer=12297#post-id-12297Try the `point3d` function:
sage: L = [ (1, 1, 1), (1, 5, 7), (8.8, 0, 3), (7.5, 1.91, 11.8), (0, 0, 0) ]
sage: point3d(L)
See the documentation for `point3d` by typing `point3d?` at the command line. See the `text3d` function if you want to add text labels to your points.
Tue, 17 May 2011 11:16:48 -0500http://ask.sagemath.org/question/8104/plot-a-list-of-3d-data/?answer=12297#post-id-12297Comment by v_2e for <p>Try the <code>point3d</code> function:</p>
<pre><code>sage: L = [ (1, 1, 1), (1, 5, 7), (8.8, 0, 3), (7.5, 1.91, 11.8), (0, 0, 0) ]
sage: point3d(L)
</code></pre>
<p>See the documentation for <code>point3d</code> by typing <code>point3d?</code> at the command line. See the <code>text3d</code> function if you want to add text labels to your points.</p>
http://ask.sagemath.org/question/8104/plot-a-list-of-3d-data/?comment=21729#post-id-21729Thanks a lot! This is indeed what I wanted to do! To my mind, this function is definitely belongs to the "3D Graphics" section of the Tutorial. Maybe even to "List Plots" subsection, because such function is used very often.Tue, 17 May 2011 11:39:10 -0500http://ask.sagemath.org/question/8104/plot-a-list-of-3d-data/?comment=21729#post-id-21729