[Xy-pic] curve coloring

Christopher K. Storm Jr Christopher.K.Storm.Jr at Dartmouth.EDU
Tue Jun 13 20:45:27 CEST 2006


I have what I hope is an easy question which is proving quite vexing.  I'm trying to color a curve.

My document headers that pertain to xypic and color are

\usepackage[dvips, all, color]{xy}

I'm using TexShop on MacOSX and am set to typeset to TeX and GhostScript.

Here is the code I have:

(0,20)*{\bullet}="v1"+(-2, 2)*{v_1};
(0,0)*{\bullet}="v2"+(-2, 2)*{v_2};
(0,-20)*{\bullet}="v3"+(-2, 2)*{v_3};
(30,0)*{\bullet}="v4"+(3, 0)*{v_4};
(-7, 0)*{} = "A";
(7, 0)*{} = "B";
(-10, 15)*{e_1};
{\ar@{-} "v1"; "v4"};
{\ar@{-} "v2"; "v4"};
{\ar@{-} "v3"; "v4"};
"A"; "B" **\crv{ (-8, 40) & (8, 40) };
"A"; "B" **\crv{ (-8, -40) & (8, -40) };
\endxy} = "x"; 
(75, 0)*++{\xy
(0,20)*{\bullet}="v1"+(1, 3)*{v_1};
(10,0)*{\bullet}="v2"+(1, 3)*{v_2};
(0,-20)*{\bullet}="v3"+(1, -3)*{v_3};
(30,0)*{\bullet}="v4"+(2, 2)*{v_4};
{\ar@{-}@[red] "v1"; "v2"};
{\ar@{-}@[red] "v1"; "v3"};
{\ar@{-} "v1"; "v4"};
{\ar@{-}@[red] "v2"; "v3"};
{\ar@{-} "v2"; "v4"};
{\ar@{-} "v3"; "v4"};
\endxy}= "y"; 
{\ar@{->} "x"; "y"};

The red for the arrows comes out quite nicely.  Is it possible to make the curves in the first half also turn red?  If not, are there any suggestions for work arounds?

Thank you and best,
Chris Storm

More information about the xy-pic mailing list