Q: Print in different colors
- To: mathgroup at smc.vnet.net
- Subject: [mg27930] Q: Print in different colors
- From: Robert Schuerhuber <robert.schuerhuber at gmx.at>
- Date: Sat, 24 Mar 2001 00:48:55 -0500 (EST)
- Organization: Vienna University of Technology
- Sender: owner-wri-mathgroup at wolfram.com
hello again! some time again i managed it with the help of this group to cycle the colors of a plot automatically, when i plot a list. i'm printing the information about the curves below the plot, and it would be very helpful if this information would be in the same color as the plot, because sometimes its very hard to say which curve belongs to which paramter. i'll give a simple example: c = {RGBColor[1, 0, 0], RGBColor[0, 1, 0], RGBColor[0,0,1]}; SetOptions[Plot, PlotStyle -> c]; Plot[{Sin[1 x],Sin[3 x],Sin[3 x]},{x,0,Pi}] k={1,2,3}; Print["k=",k]; so the three curves are plotted in red, green and blue, respectively, and i'd like the "k"-list printed in the next line also to appear in the same color, therefore "1" printed in red, "2" in green and "3" in blue. is there a way to do this, it would really save me a lot of time! regards, robert