Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Coloring multiple graphs differently

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24426] Re: [mg24369] Coloring multiple graphs differently
  • From: BobHanlon at aol.com
  • Date: Tue, 18 Jul 2000 00:58:23 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 7/12/2000 11:45:49 PM, dgolber at aol.com writes:

>I have several graphs:
>
>gr1 = Show[
>                      Plot[...],
>                      ListPlot[...]
>                 ]
>
>gr2 = Show[
>                      Plot[...],
>                      ListPlot[...]
>                 ]
>
>To compare these graphs, I display them together:
>
>   Show[gr1,gr2]
>
>I want, in this combined display, to have gr1 and gr2 different colors.
>How do I do this?  Can I do this?
>
>So far, the definitions of gr1 and gr2 individually do not manipulate colors
>at all.  I would like to do the color control only in the line
>
>Show[gr1, gr2]
>
>and not in the individual definitions of gr1 and gr2.
>
>In general, I think the Mathematica documentation in this area is very
>deficient.  Suppose I ask, for a given graphics function, "what are all the
>options of this function and what are all the possible values of this 
function,
>and what do they do?"  Seems like reasonable request, but there is no attempt
>to answer this in any of the documentation I have seen, either on-line
>or the
>4-inch thick book.
>

gr1 = Plot[Sin[x], {x, 0, 4Pi}, DisplayFunction -> Identity];

gr2 = Plot[Cos[x], {x, 0, 4Pi}, DisplayFunction -> Identity];

Show[{gr1 /. Graphics[{x__}, y___] -> Graphics[{RGBColor[1, 0, 0], x}, y], 
      gr2  /. Graphics[{x__}, y___] -> Graphics[{RGBColor[0, 0, 1], x}, y]}, 
    DisplayFunction -> $DisplayFunction];


Bob Hanlon


  • Prev by Date: Re: Problems with Legendre expansion
  • Next by Date: Re: Integrate[(1 - Exp[-kel*t]), {t, 0, Infinity]?=-1/kel
  • Previous by thread: Coloring multiple graphs differently
  • Next by thread: Re: Coloring multiple graphs differently