#8164: automatic rainbow coloring of multiple plot lines
---------------------------+------------------------------------------------
   Reporter:  jason        |          Owner:  was       
       Type:  enhancement  |         Status:  new       
   Priority:  major        |      Milestone:  sage-4.7.2
  Component:  graphics     |       Keywords:            
Work_issues:               |       Upstream:  N/A       
   Reviewer:               |         Author:            
     Merged:               |   Dependencies:            
---------------------------+------------------------------------------------

Comment(by kcrisman):

 From [http://groups.google.com/group/sage-
 support/browse_thread/thread/797289bc476b089a this sage-support thread]:
 {{{

 > >> Try something like:
 >
 > >> colors=rainbow(len([0,1,..3]))
 > >> sum(plot(derivative((f(x), a) , (x,0,2*pi), color =
 > >> colors[i],label="Plot %d"%i) for i,a in enumerate([0,1,..3]))
 >
 > >> Make each curve an individual plot, and then sum them together.
 >
 > > Though for years I've wanted to do
 >
 > > plot([f,g,h],(x,0,1),color=['red','blue','green'])
 >
 > > Don't know how hard it would be to send color to list and check if it
 > > had the right length...  probably not?
 >
 > Almost surely it's not hard.  My guess is that it would involve maybe
 > one or two lines of code change, right at the start where it detects if
 > you have multiple functions and calls plot for each function.
 >
 > That's around line 3216 of plot/plot.py, right after this comment:
 >
 >      #check to see if funcs is a list of functions that will
 >      #be all plotted together.
 >
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8164#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en.

Reply via email to