[Xy-pic] Colored vertex

Ross Moore ross at ics.mq.edu.au
Mon Aug 10 21:40:02 CEST 2009


Hello Tigran,

On 10/08/2009, at 8:32 PM, Tigran Sarukhanyan wrote:

> Hello everybody.
> I've tried to draw colored vertex using xygraph as folowing
>
> \[ \fbox{ \xygraph{
> !{<0cm,0cm>;<1cm,0cm>:<0cm,1cm>::}
> !{(0,0);a(0)**{}?(1.0)}*+[redl]{\bullet}="a1"
> !{(0,0);a(0)**{}?(1.0)}*+{\circ}="a1"
> !{(0,0);a(72)**{}?(1.0)}*+{\bullet}="a2"
> !{(0,0);a(144)**{}?(1.0)}*+{\bullet}="a3"
> !{(0,0);a(216)**{}?(1.0)}*+{\bullet}="a4"
> !{(0,0);a(288)**{}?(1.0)}*+{\bullet}="a5"
> !{(0,0);a(0)**{}?(1.8)}*+{\bullet}="b1"
> !{(0,0);a(72)**{}?(1.8)}*+{\bullet}="b2"
> !{(0,0);a(144)**{}?(1.8)}*+{\bullet}="b3"
> !{(0,0);a(216)**{}?(1.8)}*+{\bullet}="b4"
> !{(0,0);a(288)**{}?(1.8)}*+{\bullet}="b5"
> "a1"-"a3" "a3"-"a5" "a5"-"a2" "a2"-"a4" "a4"-"a1"
> "b1"-"b2" "b2"-"b3" "b3"-"b4" "b4"-"b5" "b5"-"b1"
> "a1"-"b1" "a2"-"b2" "a3"-"b3" "a4"-"b4" "a5"-"b5"
> } } \]
>
> But bullet's radius is larger than circ. It doesn't look nice. I'd  
> like to draw as it is shown in the picture.

Don't use \bullet , nor \circ .
Instead use the "small disk" directionals   @{*}  and @{o}
as follows:


\usepackage[dvips,ps,all,color,graph]{xy}
%\usepackage[pdftex,all,color,graph]{xy}


\begin{document}

\[ \fbox{ \xygraph{
!{<0cm,0cm>;<1cm,0cm>:<0cm,1cm>::}
%!{(0,0);a(0)**{}?(1.0)}*[red]@{*}="a1",
!{(0,0);a(0)**{}?(1.0)}*[red]@{*}*=<2.5pt>@{o}="a1"
!{(0,0);a(72)**{}?(1.0)}*[red]@{*}*=<2.5pt>@{o}="a2"
!{(0,0);a(144)**{}?(1.0)}*[red]@{*}*=<2.5pt>@{o}="a3"
!{(0,0);a(216)**{}?(1.0)}*[red]@{*}*=<2.5pt>@{o}="a4"
!{(0,0);a(288)**{}?(1.0)}*[red]@{*}*=<2.5pt>@{o}="a5"
!{(0,0);a(0)**{}?(1.8)}*[green]@{*}*=<2.5pt>@{o}="b1"
!{(0,0);a(72)**{}?(1.8)}*[green]@{*}*=<2.5pt>@{o}="b2"
!{(0,0);a(144)**{}?(1.8)}*[green]@{*}*=<2.5pt>@{o}="b3"
!{(0,0);a(216)**{}?(1.8)}*[green]@{*}*=<2.5pt>@{o}="b4"
!{(0,0);a(288)**{}?(1.8)}*[green]@{*}*=<2.5pt>@{o}="b5"
"a1"-"a3" "a3"-"a5" "a5"-"a2" "a2"-"a4" "a4"-"a1"
"b1"-"b2" "b2"-"b3" "b3"-"b4" "b4"-"b5" "b5"-"b1"
"a1"-"b1" "a2"-"b2" "a3"-"b3" "a4"-"b4" "a5"-"b5"
} } \]


\end{document}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: texshop_image.jpeg
Type: image/jpeg
Size: 33216 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20090811/c2e2e652/attachment-0001.jpeg>
-------------- next part --------------



It's best to use the PostScript backend for this.
It gives much better quality than using  pdftex .

>
> Thank you.
>
>

> <colored_circle.png>


Hope this helps,

	Ross


------------------------------------------------------------------------
Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------





More information about the xy-pic mailing list