0
$\begingroup$

I tried to change vertex label font size by the following code

g = TreeGraph[{11 -> 23, 11 -> 24, 23 -> 40, 23 -> 39, 24 -> 30, 
   24 -> 50, 40 -> 55, 40 -> 45}, 
  VertexLabelStyle -> {FontSize -> 14}, 
  VertexShapeFunction -> ({EdgeForm[White], 
      RGBColor[113/255, 190/255, 236/255], Disk[#1, 0.2], White, 
      Text[#2, #1]} &)]

which turns out not working. I checked the documentation here, but was not able to find a solution. Anyone knows what is the correct way to change font size in TreeGraph? Thank you!

$\endgroup$
1
  • $\begingroup$ VertexStyle -> Directive[FontSize ->14] or VertexStyle -> 14? $\endgroup$ – kglr Nov 16 '15 at 18:30
1
$\begingroup$
    TreeGraph[
      {11 -> 23, 11 -> 24, 23 -> 40, 23 -> 39, 
       24 -> 30, 24 -> 50, 40 -> 55, 40 -> 45},
 VertexShapeFunction -> ({EdgeForm[White], 
     RGBColor[113/255, 190/255, 236/255], Disk[#1, 0.2], White, 
     Text[Style[#2, 22, Red], #1]} &)]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.