The only issue I have with these lines of code is the inability to change the plot names on the legend. right now it shows up as Plot 1, Plot 2, Plot 3, Plot 4. I would like the legend list to show Jerk, Acceleration, Velocity, and Distance. I have messed with the coding, but it looks like the %d has to be in the " " for the program to work.
On Oct 27, 4:09 pm, Jason Grout <jason-s...@creativetrax.com> wrote: > On 10/27/11 6:51 PM, Eric Kangas wrote: > > > Hi, > > > I am working on a standard plot function for multiple plots. I would > > like to have each plot in a different color to distinguish each > > function, and also able to show a legend with the color, and function. > > > Here is what I have right now: > > > plot([derivative((f(x), a) for a in [0,1,..3]], (x,0,2*pi), color = ()) > > 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. > > Jason -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org