<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, How to make a multi coloured, 3d plot, from a list of points.</title>
    <link>http://www.mapleprimes.com/questions/39225-How-To-Make-A-Multi-Coloured-3d-Plot</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Thu, 11 Jun 2026 06:42:26 GMT</lastBuildDate>
    <pubDate>Thu, 11 Jun 2026 06:42:26 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, How to make a multi coloured, 3d plot, from a list of points.</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, How to make a multi coloured, 3d plot, from a list of points.</title>
      <link>http://www.mapleprimes.com/questions/39225-How-To-Make-A-Multi-Coloured-3d-Plot</link>
    </image>
    <item>
      <title>Points with colours</title>
      <link>http://www.mapleprimes.com/questions/39225-How-To-Make-A-Multi-Coloured-3d-Plot?ref=Feed:MaplePrimes:How to make a multi coloured, 3d plot, from a list of points.:Comments#answer71304</link>
      <itunes:summary>&lt;p&gt;Suppose your text file consists of lines of the form&lt;/p&gt;
&lt;p&gt;c, x, y, z&lt;/p&gt;
&lt;p&gt;where c is 1 to 5 (for the colour code) and [x,y,z] is the point to plot, using commas as separators.&lt;/p&gt;
&lt;pre&gt;
&amp;gt; M := ImportMatrix(&amp;quot;c:/mypath/myfile.txt&amp;quot;, source=csv);
&amp;nbsp;&amp;nbsp; colours:= [red, green, blue, cyan, black];
&lt;/pre&gt;
&lt;p&gt;The following will work in Standard, but not in Classic.&lt;/p&gt;
&lt;pre&gt;
&amp;gt; plots[pointplot3d](M[1..-1,2..4],
      color=convert(map(t-&amp;gt;colours[t], M[1..-1,1]),list));
&lt;/pre&gt;
&lt;p&gt;Alternatively, you might separate out the points of each colour, plot them separately, and combine the plots with display.&amp;nbsp; This will work in both Standard and Classic.&lt;/p&gt;
&lt;pre&gt;
&amp;gt;&amp;nbsp; with(plots):
&amp;nbsp;&amp;nbsp; display([seq](pointplot3d(M[
   select(t -&amp;gt; (M[t,1]=j),[$1..LinearAlgebra[RowDimension](M)])
         , 2..4], 
       colour=colours[j]), j=1..5));
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Suppose your text file consists of lines of the form&lt;/p&gt;
&lt;p&gt;c, x, y, z&lt;/p&gt;
&lt;p&gt;where c is 1 to 5 (for the colour code) and [x,y,z] is the point to plot, using commas as separators.&lt;/p&gt;
&lt;pre&gt;
&amp;gt; M := ImportMatrix(&amp;quot;c:/mypath/myfile.txt&amp;quot;, source=csv);
&amp;nbsp;&amp;nbsp; colours:= [red, green, blue, cyan, black];
&lt;/pre&gt;
&lt;p&gt;The following will work in Standard, but not in Classic.&lt;/p&gt;
&lt;pre&gt;
&amp;gt; plots[pointplot3d](M[1..-1,2..4],
      color=convert(map(t-&amp;gt;colours[t], M[1..-1,1]),list));
&lt;/pre&gt;
&lt;p&gt;Alternatively, you might separate out the points of each colour, plot them separately, and combine the plots with display.&amp;nbsp; This will work in both Standard and Classic.&lt;/p&gt;
&lt;pre&gt;
&amp;gt;&amp;nbsp; with(plots):
&amp;nbsp;&amp;nbsp; display([seq](pointplot3d(M[
   select(t -&amp;gt; (M[t,1]=j),[$1..LinearAlgebra[RowDimension](M)])
         , 2..4], 
       colour=colours[j]), j=1..5));
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>71304</guid>
      <pubDate>Wed, 04 Jun 2008 01:36:59 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
    <item>
      <title>Colours for pointplot3d</title>
      <link>http://www.mapleprimes.com/questions/39225-How-To-Make-A-Multi-Coloured-3d-Plot?ref=Feed:MaplePrimes:How to make a multi coloured, 3d plot, from a list of points.:Comments#answer71303</link>
      <itunes:summary>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;I'll try your last q first. You can use the Data Import assistant (Tools&amp;gt;Assistants&amp;gt;Import Data) to import your data from, for instance, an Excel or some delimited file. Maple will import the data as rtable which can be used to construct arrays, matrices, or vectors.&lt;/p&gt;
&lt;p&gt;From the help page for this command (?pointplot3d at the Maple prompt):&lt;/p&gt;
&lt;p&gt;&amp;quot;The option color=s specifies the color of the points. The allowable values for s are given in the plot/color help page. A list of n colors, where n is the number of points, may also be provided. &amp;quot;&lt;/p&gt;
&lt;p&gt;It is possible you could write a Maple procedure to output a list of colours matching the 3D points you've imported.&amp;nbsp; If you can set up your data so when it imports you have 3 columns for the 3D point values as well as a corresponding 4th column indicating what DE was used, your procedure could extract this info and return a list of colours in the same order as the points.&lt;/p&gt;
&lt;p&gt;i.e. pointplot3d({list of points}, color={list of colours}).&lt;/p&gt;
&lt;p&gt;- Stephanie&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;I'll try your last q first. You can use the Data Import assistant (Tools&amp;gt;Assistants&amp;gt;Import Data) to import your data from, for instance, an Excel or some delimited file. Maple will import the data as rtable which can be used to construct arrays, matrices, or vectors.&lt;/p&gt;
&lt;p&gt;From the help page for this command (?pointplot3d at the Maple prompt):&lt;/p&gt;
&lt;p&gt;&amp;quot;The option color=s specifies the color of the points. The allowable values for s are given in the plot/color help page. A list of n colors, where n is the number of points, may also be provided. &amp;quot;&lt;/p&gt;
&lt;p&gt;It is possible you could write a Maple procedure to output a list of colours matching the 3D points you've imported.&amp;nbsp; If you can set up your data so when it imports you have 3 columns for the 3D point values as well as a corresponding 4th column indicating what DE was used, your procedure could extract this info and return a list of colours in the same order as the points.&lt;/p&gt;
&lt;p&gt;i.e. pointplot3d({list of points}, color={list of colours}).&lt;/p&gt;
&lt;p&gt;- Stephanie&lt;/p&gt;</description>
      <guid>71303</guid>
      <pubDate>Wed, 04 Jun 2008 01:37:14 Z</pubDate>
      <itunes:author>srozek</itunes:author>
      <author>srozek</author>
    </item>
    <item>
      <title>error and new question..</title>
      <link>http://www.mapleprimes.com/questions/39225-How-To-Make-A-Multi-Coloured-3d-Plot?ref=Feed:MaplePrimes:How to make a multi coloured, 3d plot, from a list of points.:Comments#answer71297</link>
      <itunes:summary>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hey guys, thanks for your osts.&lt;/p&gt;
&lt;p&gt;Robert Israel, I tried the code that you gave me and got the following error:&lt;/p&gt;
&lt;p&gt;Error, (in ImportMatrix) argument 'source = csv' invalid: rhs should be of type {identical(Matlab), identical(MatrixMarket), identical(delimited)}&lt;/p&gt;
&lt;p&gt;I have also decided that instead of the Z dimention, I want to just capture that z information in the form of a direction vector at each 2d point sort of like a slope feild, any ideas on how I might do this? (i still want the vectors to be coloured based on the DE i used)&lt;font face="Courier New" color="#ff00ff"&gt;.&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hey guys, thanks for your osts.&lt;/p&gt;
&lt;p&gt;Robert Israel, I tried the code that you gave me and got the following error:&lt;/p&gt;
&lt;p&gt;Error, (in ImportMatrix) argument 'source = csv' invalid: rhs should be of type {identical(Matlab), identical(MatrixMarket), identical(delimited)}&lt;/p&gt;
&lt;p&gt;I have also decided that instead of the Z dimention, I want to just capture that z information in the form of a direction vector at each 2d point sort of like a slope feild, any ideas on how I might do this? (i still want the vectors to be coloured based on the DE i used)&lt;font face="Courier New" color="#ff00ff"&gt;.&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/p&gt;</description>
      <guid>71297</guid>
      <pubDate>Wed, 04 Jun 2008 15:46:21 Z</pubDate>
      <itunes:author>Think</itunes:author>
      <author>Think</author>
    </item>
    <item>
      <title>sorry to be needy</title>
      <link>http://www.mapleprimes.com/questions/39225-How-To-Make-A-Multi-Coloured-3d-Plot?ref=Feed:MaplePrimes:How to make a multi coloured, 3d plot, from a list of points.:Comments#answer71291</link>
      <itunes:summary>&lt;p&gt;Sorry to be needy, i just dont really understand your code well enough to make changes to it. I have set values for max and min in your code and typed it into maple:&lt;/p&gt;
&lt;p&gt;&amp;gt; M := ImportMatrix(&amp;quot;D:/Programs/TidalDP/ohmax.txt&amp;quot;, delimiter=&amp;quot;,&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ 2000 x 4 Matrix&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M := [ Data Type: anything&amp;nbsp; ]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Storage: rectangular ]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Order: Fortran_order ]&lt;br /&gt;
&lt;br /&gt;
&amp;gt; with(plots): &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n := LinearAlgebra[RowDimension](M);&lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; r := (1)(seq(M[i,2],i=1..n))/10; &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; display([seq](arrow([M[i,2],M[i,3]], &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; evalf([1, M[i,4]]*r/sqrt(1+M[i,4]^2)), &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color=colors[M[i,1]], shape=arrow), &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=1..n));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n := 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r := 1/10&lt;br /&gt;
&lt;br /&gt;
Error, (in plot/color) invalid color specification&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Sorry to be needy, i just dont really understand your code well enough to make changes to it. I have set values for max and min in your code and typed it into maple:&lt;/p&gt;
&lt;p&gt;&amp;gt; M := ImportMatrix(&amp;quot;D:/Programs/TidalDP/ohmax.txt&amp;quot;, delimiter=&amp;quot;,&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ 2000 x 4 Matrix&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M := [ Data Type: anything&amp;nbsp; ]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Storage: rectangular ]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ Order: Fortran_order ]&lt;br /&gt;
&lt;br /&gt;
&amp;gt; with(plots): &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n := LinearAlgebra[RowDimension](M);&lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; r := (1)(seq(M[i,2],i=1..n))/10; &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; display([seq](arrow([M[i,2],M[i,3]], &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; evalf([1, M[i,4]]*r/sqrt(1+M[i,4]^2)), &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color=colors[M[i,1]], shape=arrow), &lt;br /&gt;
&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=1..n));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n := 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r := 1/10&lt;br /&gt;
&lt;br /&gt;
Error, (in plot/color) invalid color specification&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;nbsp;&lt;/p&gt;</description>
      <guid>71291</guid>
      <pubDate>Thu, 05 Jun 2008 03:39:14 Z</pubDate>
      <itunes:author>Think</itunes:author>
      <author>Think</author>
    </item>
    <item>
      <title>I should mention im using</title>
      <link>http://www.mapleprimes.com/questions/39225-How-To-Make-A-Multi-Coloured-3d-Plot?ref=Feed:MaplePrimes:How to make a multi coloured, 3d plot, from a list of points.:Comments#answer71290</link>
      <itunes:summary>&lt;p&gt;I should mention im using maple 7, maybe i should upgrade lol&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;I should mention im using maple 7, maybe i should upgrade lol&lt;/p&gt;</description>
      <guid>71290</guid>
      <pubDate>Thu, 05 Jun 2008 03:44:28 Z</pubDate>
      <itunes:author>Think</itunes:author>
      <author>Think</author>
    </item>
    <item>
      <title>Define colours first</title>
      <link>http://www.mapleprimes.com/questions/39225-How-To-Make-A-Multi-Coloured-3d-Plot?ref=Feed:MaplePrimes:How to make a multi coloured, 3d plot, from a list of points.:Comments#answer71289</link>
      <itunes:summary>&lt;p&gt;Did you remember to define the list of colors? In Robert's example, he includes this command right after the ImportMatrix call:&amp;nbsp; &lt;br /&gt;
colours:= [red, green, blue, cyan, black];&lt;/p&gt;
&lt;p&gt;Paulina Chin&lt;br /&gt;
Maplesoft&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Did you remember to define the list of colors? In Robert's example, he includes this command right after the ImportMatrix call:&amp;nbsp; &lt;br /&gt;
colours:= [red, green, blue, cyan, black];&lt;/p&gt;
&lt;p&gt;Paulina Chin&lt;br /&gt;
Maplesoft&lt;/p&gt;</description>
      <guid>71289</guid>
      <pubDate>Thu, 05 Jun 2008 03:47:14 Z</pubDate>
      <itunes:author>pchin</itunes:author>
      <author>pchin</author>
    </item>
  </channel>
</rss>