MathGroup Archive 2002

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

Search the Archive

RE: RE: Colors

Here's a solution that emphasizes the original function a bit more than
the reflection.  It illustrates the nice way various graphics primitives
can be used without confusion, using David Park's DrawGraphics package:

ReY5[f_, {x_, x1_, x2_}] := Module[{g},
      {Red, Thickness[0.005], g = Draw[f, {x, x1, x2}],
       Blue, Thickness[0.004], g /. DrawingTransform[-#1 &, #2 &]},
      Axes -> True,
      Background -> Bisque
ReY5[Sin[t], {t, -2, 3}]
ReY5[{Sin[t], Cos[t]}, {t, -2, 3}]

Bobby Treat

-----Original Message-----
From: David Park [mailto:djmp at] 
To: mathgroup at
Subject: [mg35038] [mg34998] RE: [mg34986] Colors


This is a question I am going to use to promote the DrawGraphics package at
my web site. DrawGraphics deals directly at the level of primitive graphics
and allows their direct manipulation so it is easier. (The package also
automatically loads the Graphics`Colors` package so we can use color

This draws three curves for positive t in black and the reflected curves in
Red. DrawingTransform just implements the rule you used, but also works
properly with the various graphic primitives such as Text.


    {g = Draw[{Sin[t], t^3, Cos[t]}, {t, 0, 4}],
      Red, g /. DrawingTransform[-#1 &, #2 &]},
    Axes -> True];

David Park
djmp at

> From: Juan Erfá [mailto:erfa11 at]
To: mathgroup at
> Hi,I have the function ReY to reflect a curve about the Y axe:
> In[4]:= ReY[f_, {x_, x1_, x2_}] := Module[{p, q},
>     p = Plot[f, {x, x1, x2}, DisplayFunction -> Identity];
>     q = p /. {u_, v_} -> {-u, v};
>     Show[p, q, DisplayFunction -> $DisplayFunction]]
> For ReY[Sin[t],{t,0,4}], I get both functions in black.
> I would like to use Hue[] to paint the curves in different
> colors, but after
> tryng to put Hue[] everywhere I get nothing.
> Another question is: What I have to do to allow ReY to work with
> more than
> one function, I mean: ReY[{Sin[t], t^3, Cos[t], ...},{t, 0,4}].
> Finally: How I can paint the axes in other color then black?.
> Regards.Juan

  • Prev by Date: RE: Friendly Challenge 2: sort by column
  • Next by Date: RE: Re: RE: Experimental`FileBrowse
  • Previous by thread: RE: Colors
  • Next by thread: Colors