<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - comments on Post, multiple plots on the same figure</title>
    <link>http://www.mapleprimes.com/posts/42418-Multiple-Plots-On-The-Same-Figure</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 08:13:28 GMT</lastBuildDate>
    <pubDate>Thu, 11 Jun 2026 08:13:28 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest comments added to the Post, multiple plots on the same figure</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - comments on Post, multiple plots on the same figure</title>
      <link>http://www.mapleprimes.com/posts/42418-Multiple-Plots-On-The-Same-Figure</link>
    </image>
    <item>
      <title>Lists</title>
      <link>http://www.mapleprimes.com/posts/42418-Multiple-Plots-On-The-Same-Figure?ref=Feed:MaplePrimes:multiple plots on the same figure:Comments#comment79359</link>
      <itunes:summary>&lt;p &gt;plots[display] works best when you give it a list. Lists in Maple are created using [square] brackets. &lt;/p&gt;
&lt;p &gt;&lt;/p&gt;
&lt;p &gt;First, lets create s series of functions to plot&lt;/p&gt;
&lt;p &gt;&lt;strong &gt;&lt;font color="#ff0000" face="Monospaced"&gt;&lt;img src="http://maplenet.maplesoft.com/maplenet/primes/aa8517c08b8925febfb3642cbb01e291.gif" alt='Maple Equation' align='absMiddle' /&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p &gt;&lt;/p&gt;
&lt;p &gt;&lt;/p&gt;
&lt;p &gt;&lt;center &gt;&lt;img src="http://maplenet.maplesoft.com/maplenet/primes/bba5366b4ac7794cb85f5b477c0a4291.gif" alt='Maple Equation' align='absMiddle' /&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p &gt;&lt;/p&gt;
&lt;p &gt;Then create the plots, we use the seq command to go from 1 to the number of objects in the fns list.&lt;/p&gt;
&lt;p &gt;&lt;strong &gt;&lt;font color="#ff0000" face="Monospaced"&gt;&lt;img src="http://maplenet.maplesoft.com/maplenet/primes/fa8d02442618cad28eca91e7cb06cfc1.gif" alt='Maple Equation' align='absMiddle' /&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p &gt;&lt;/p&gt;
&lt;p &gt;Finally, display the plots&lt;/p&gt;
&lt;p &gt;&lt;strong &gt;&lt;font color="#ff0000" face="Monospaced"&gt;&lt;img src="http://maplenet.maplesoft.com/maplenet/primes/aa0f46f4689a0e0b632394b528406060.gif" alt='Maple Equation' align='absMiddle' /&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p &gt;&lt;/p&gt;
&lt;p &gt;&lt;/p&gt;
&lt;p &gt;&lt;center &gt;&lt;img src="http://maplenet.maplesoft.com/maplenet/primes/66afcfac935fbd6af64181fe78951095.gif" alt='Maple Plot' /&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p &gt;&lt;img src="http://maplenet.maplesoft.com/maplenet/primes/5b189de7b1a2b275e4be1f37cd37169e.gif" alt='Maple Equation' align='absMiddle' /&gt;&lt;/p&gt;
&lt;p&gt;This post was generated using the MaplePrimes &lt;a href="http://www.mapleprimes.com/filemanager"&gt;File Manager&lt;br&gt;&lt;/a&gt; 
			&lt;a href="http://www.mapleprimes.com/files/1_plotList.mw"&gt;Download the original worksheet&lt;/a&gt; 
			| &lt;a href="http://maplenet.maplesoft.com/maplenet/worksheet/mapleprimes/1_plotList.mw"&gt;View worksheet on MapleNet&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;____&lt;br/&gt;
William Spaetzel&lt;br/&gt;
Marketing Engineer, Maplesoft&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, multiple plots on the same figure</description>
      <guid>79359</guid>
      <pubDate>Tue, 17 Oct 2006 21:37:18 Z</pubDate>
      <itunes:author>Will</itunes:author>
      <author>Will</author>
    </item>
    <item>
      <title>map</title>
      <link>http://www.mapleprimes.com/posts/42418-Multiple-Plots-On-The-Same-Figure?ref=Feed:MaplePrimes:multiple plots on the same figure:Comments#comment86303</link>
      <itunes:summary>Also, it is convenient to use &lt;code&gt; map&lt;/code&gt; for producing a list from a list, &lt;pre&gt;plotList:=map(plot,fns,x=-3..3):&lt;/pre&gt;By the way, in the described situation the plot can be created without &lt;code&gt; display&lt;/code&gt;, just as &lt;pre&gt;plot(fns,x=-3..3);&lt;/pre&gt;that has an additional advantage of using different colors for different curves.</itunes:summary>
      <description>The latest comments added to the Post, multiple plots on the same figure</description>
      <guid>86303</guid>
      <pubDate>Tue, 17 Oct 2006 22:32:05 Z</pubDate>
      <itunes:author>alec</itunes:author>
      <author>alec</author>
    </item>
    <item>
      <title>more displays of tables</title>
      <link>http://www.mapleprimes.com/posts/42418-Multiple-Plots-On-The-Same-Figure?ref=Feed:MaplePrimes:multiple plots on the same figure:Comments#comment79357</link>
      <itunes:summary>Dan,

Here are some more ideas for you to consider. While Will's comments created the plots within the display command, my comments deal with the situation where you have created the plots separately, and want to combine them into a single display.

First, create plots with two different naming conventions.

&lt;pre&gt;
restart;
with( plots ):

for i from 1 to 10 do
  p||i := implicitplot( (x-i)^2+y^2=1, x=i-1..i+1, y=-1..1 );
  P[i] := implicitplot( x^2+(y-i)^2=1, x=-1..1, y=i-1..i+1 );
end do:
i; # note: i has a value (11) at the end of this loop
&lt;/pre&gt;

To work with the plots with concatenated names, we can use either $ or seq. With $ it is necessary to be aware that the loop variable in the for .. do .. end do loop retains its final value (11) at the end of the loop.

&lt;pre&gt;
display( [p||i$i=1..10] );  # error because i has a value from before
display( [p||j$j=1..10] );  # works

display( [seq(p||i,i=1..10)] ); # uses a local variable named i
display( [seq(p||i,i=1..10)], scaling=constrained );
display( [seq(p||i,i=1..10)], scaling=constrained, insequence=true ); # animation
&lt;/pre&gt;

The last example shows one way to create animations.

The table of plots can be used in the same way.

&lt;pre&gt;
display( [ P[j] $ j=1..10 ] );
display( [ seq(P[j],j=1..10) ] );
&lt;/pre&gt;

As Will suggests in his post, it is possible to plot a table without explicit reference to the dimension of the table. It's possible to go even further than Will did with his example.

&lt;pre&gt;
display( [ seq(P[i], i=sort(map(op,[indices(P)]))) ], scaling=constrained, insequence=true );

DisplayTable := ( T::table ) -&gt;
  plots[display]( [ seq(T[j], j=sort(map(op,[indices(P)]))) ], args[2..-1] );

DisplayTable( P, scaling=constrained, insequence=true, thickness=2 );
&lt;/pre&gt;

I hope you found this useful,

Doug
&lt;pre&gt;
---------------------------------------------------------------------
Douglas B. Meade
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/
&lt;\pre&gt;</itunes:summary>
      <description>The latest comments added to the Post, multiple plots on the same figure</description>
      <guid>79357</guid>
      <pubDate>Tue, 17 Oct 2006 22:41:43 Z</pubDate>
      <itunes:author>Doug Meade</itunes:author>
      <author>Doug Meade</author>
    </item>
    <item>
      <title>correction to DisplayTable</title>
      <link>http://www.mapleprimes.com/posts/42418-Multiple-Plots-On-The-Same-Figure?ref=Feed:MaplePrimes:multiple plots on the same figure:Comments#comment79356</link>
      <itunes:summary>The procedure in my previous post has one typo. It the P that appears in the indices command should be T. Here is the correct version:

&lt;pre&gt;
DisplayTable := ( T::table ) -&gt;
  plots[display]( [ seq(T[j], j=sort(map(op,[indices(T)]))) ], args[2..-1] );
&lt;/pre&gt;

Note that this procedure can be used even if the table is indexed by non-numeric indices. For example,

&lt;pre&gt;
Q[red] := implicitplot( x^2+y^2=1, x=-1..1, y=-1..1, color=red ):
Q[blue] := implicitplot( x^2+y^2=1, x=-1..1, y=-1..1, color=blue ):
Q[green] := implicitplot( x^2+y^2=1, x=-1..1, y=-1..1, color=green ):
Q[pink] := implicitplot( x^2+y^2=1, x=-1..1, y=-1..1, color=pink ):
Q[cyan] := implicitplot( x^2+y^2=1, x=-1..1, y=-1..1, color=cyan ):
Q[magenta] := implicitplot( x^2+y^2=1, x=-1..1, y=-1..1, color=magenta ):
Q[turquoise] := implicitplot( x^2+y^2=1, x=-1..1, y=-1..1, color=turquoise ):

DisplayTable( Q, insequence=true );
&lt;/pre&gt;

If you want to use a different ordering that the one produced by sort, you will have to modify DisplayTable.

&lt;pre&gt;
---------------------------------------------------------------------
Douglas B. Meade
Math, USC, Columbia, SC 29208  E-mail: mailto:meade@math.sc.edu       
Phone:  (803) 777-6183         URL:    http://www.math.sc.edu/~meade/
&lt;\pre&gt;</itunes:summary>
      <description>The latest comments added to the Post, multiple plots on the same figure</description>
      <guid>79356</guid>
      <pubDate>Wed, 18 Oct 2006 00:21:02 Z</pubDate>
      <itunes:author>Doug Meade</itunes:author>
      <author>Doug Meade</author>
    </item>
    <item>
      <title>much much thanks to all the commnets</title>
      <link>http://www.mapleprimes.com/posts/42418-Multiple-Plots-On-The-Same-Figure?ref=Feed:MaplePrimes:multiple plots on the same figure:Comments#comment79355</link>
      <itunes:summary>Thanks very much for all your very helpful comments, Doug, Alec and Will.  Your methods make plotting all these figures much easier. 

Have a good day,

-Dan</itunes:summary>
      <description>The latest comments added to the Post, multiple plots on the same figure</description>
      <guid>79355</guid>
      <pubDate>Wed, 18 Oct 2006 00:44:30 Z</pubDate>
      <itunes:author>tintin</itunes:author>
      <author>tintin</author>
    </item>
    <item>
      <title>Multi Plot problem</title>
      <link>http://www.mapleprimes.com/posts/42418-Multiple-Plots-On-The-Same-Figure?ref=Feed:MaplePrimes:multiple plots on the same figure:Comments#comment81736</link>
      <itunes:summary>&lt;p&gt;Hy Guy,&lt;/p&gt;
&lt;p&gt;I also would like to aks your help because I am working on a project where I have a matrix which is changes depending on the i=1..4 and j=0..90 by 5. I would like to visualize the [1,1] element of this matrix depending on the &amp;quot;i&amp;quot; and &amp;quot;j&amp;quot;.&lt;/p&gt;
&lt;p&gt;I tried to put together the code using your comments but I never seen the plot.&amp;nbsp; I assume I do something wrong.&lt;/p&gt;
&lt;p&gt;Would it be possible one of you to check the code?&lt;/p&gt;
&lt;p&gt;The first element of the matrix is defined by A[i,j][1,1]&lt;/p&gt;
&lt;p&gt;Here is my code:&lt;/p&gt;
&lt;p&gt;graph:=[seq(A[i,j][1,1], i=0..90,5)];&lt;/p&gt;
&lt;p&gt;plotList:=[seq(plot(graph[n], x=1..90),n=1..4)];&lt;/p&gt;
&lt;p&gt;plots[display](plotList);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks a lot,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Laszlo&lt;/p&gt;
&lt;p&gt;&lt;img src="file:///C:/DOCUME~1/lhorvat/LOCALS~1/Temp/moz-screenshot.jpg" alt="" /&gt;&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, multiple plots on the same figure</description>
      <guid>81736</guid>
      <pubDate>Tue, 02 Mar 2010 07:48:14 Z</pubDate>
      <itunes:author>morpheus2002</itunes:author>
      <author>morpheus2002</author>
    </item>
  </channel>
</rss>