MathGroup Archive 2008

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

Search the Archive

Re: Re: how format vertex, edge labels in ShowGraph (Mathematica

  • To: mathgroup at
  • Subject: [mg86175] Re: [mg86150] Re: how format vertex, edge labels in ShowGraph (Mathematica
  • From: Murray Eisenberg <murray at>
  • Date: Tue, 4 Mar 2008 02:10:41 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <> <>
  • Reply-to: murray at

Additional way to format labels on graphs displayed with ShowGraph -- 
use option BaseStyle in ShowGraph.  For example:

   ShowGraph[Cycle[3], VertexNumber -> True,
      EdgeLabel -> Characters["abc"],
      BaseStyle -> {FontSize -> 18,
      FontWeight -> "Bold",
      FontFamily -> "Helvetica"}]

Strangely, though, BaseStyle does not seem allow setting font color 
here.  Neither an additional option FontColor->Red nor just the 
directive Red within BaseStyle does anything here.  Any idea why?

Murray Eisenberg wrote:
> I just figured it out.  I knew I somehow had to use Style.  But by 
> beginning with EdgeLabel instead of VertexNumber, I was misled into 
> thinking it would not work.  Here's a simple example:
>    ShowGraph[Cycle[3],
>      VertexLabel -> (Style[#, FontSize -> 20,
>        FontColor -> Green] &) /@ {"1", "2", "3"},
>      EdgeLabel -> (Style[#, FontSize -> 20, FontColor -> Red,
>        FontSlant -> "Italic"] &) /@ {"a", "b", "c"}]
> The documentation about the graph functions in Combinatorica (and the 
> rest of the package?) is really terse to the point of being nearly 
> nonexistent.  And it's unclear that the Pemmaraju & Skiena book 
> "Computational Discrete Mathematics: Combinatorics and Graph Theorey 
> with Mathemtica", written for use with the "new" version of the 
> Mathematica 5.2 standard add-on package DiscreteMath`Combinatorica` is 
> much more adequate or completely compatible with the Mathematica 6 
> implementation of the package.
> Murray Eisenberg wrote:
>> In the Mathematica 6 version of the package Combinatorica, how does one 
>> change the format of vertex or edge labels -- for example, to use a 
>> larger font for them?
>> The font size is MUCH too small for these labels, at least for rather 
>> simple graphs, by contrast with the lengths of the edges and overall 
>> size of the display.

Murray Eisenberg                     murray at
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

  • Prev by Date: Re: Hyperlink Toolbar no Back Arrow
  • Next by Date: RE: Creating Palettes
  • Previous by thread: Re: how format vertex, edge labels in ShowGraph (Mathematica 6)
  • Next by thread: Drawing Tools in 6.0.2