Hi James,
Hello,

On Sun, Apr 6, 2008 at 1:33 PM, James Hart <[EMAIL PROTECTED]> wrote:
>
>  How should I be formatting this tuple if I want it to plot each graph
>  in a different color but in the same plot graph?
>  It works when it's all the same color i.e.

The idiom that Sage uses is to construct all of the individual graphs
separately and then combine them together with "+".  Here is some code
that will produce the plot you want:

sage: a = (sin(x)^2, cos(x)^2, sin(x)^2+cos(x)^2)
sage: color = ('red', 'blue', 'purple')
sage: min_x = 0
sage: max_x = 2*pi
sage: y = sum([plot(a[i], min_x, max_x, rgbcolor=color[i]) for i in range(3)])
sage: y.show()

>  Also: How do I comment out a line of code in the command line?
>  i.e. in PHP or java it is
>
>    // Line of code here is commented

To comment out a line in Python, you use "#".

--Mike

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to