# How to specify the text size of a vertex index in a 3D mesh using Labeled

My code takes a list of {x, y, z} vertices and displays a convex hull with each vertex labeled by its index in the list. Here is a minimal working example of the problem,

pts = RandomReal[{-1, 1}, {4, 3}];
chull = ConvexHullMesh[pts];
HighlightMesh[chull, Labeled[0, "Index"]]


However, the size of the vertex labels is tiny and I have been unable to find any method to make the text larger. Labeling the axes etc. and changing the text there is straightforward. Does anyone have an idea how to do specify the size of the vertex text. Same issue if I want the edges labeled or the faces of the triangles. I am showing a simple icosahedron.

• You should include some sample data so we can try out your code. That said, have you tried using the LabelStyle option e.g. Labeled[0,"Index",LabelStyle->Directive[FontSize->20]]? Mar 2, 2016 at 15:00
• @N.J.Evans, I can't seem to find any way of changing the fontsize. Any application of LabelStyle like you suggested makes the labels vanish. And using FullForm I don't see any occurrences of Graphics3D[Text[...]] to use a replacement rule on. Mar 2, 2016 at 15:06

This was difficult to find, but I think this is how you do it, using MeshCellLabel and MeshCellMarker

ConvexHullMesh[pts,
MeshCellLabel -> {0 -> "Marker"},
MeshCellMarker ->
Table[{0, n} -> Style[n, 25], {n, 1, 4}]]


Or you can use HighlightMesh if you've already created the ConvexHullMesh as below. You can apply any Style elements,

HighlightMesh[chull, Labeled[0, "Marker"],
MeshCellMarker ->
Table[{0, n} ->
Style[n, 25, Hue[n/4],
FontFamily -> "Comic Sans MS"], {n, 1, 4}]]


I don't see how to use Labeled to label different cell specs, but you can use MeshCellLabel in this way,

ConvexHullMesh[pts,
MeshCellLabel -> {0 -> "Marker", 1 -> "Marker", 2 -> "Marker"},
MeshCellMarker -> Join[
Table[{0, n} ->
Style[n, 25, Red,
FontFamily -> "Comic Sans MS"], {n, 1, 4}],
Table[{1, n} ->
Style[n, 35, Blue,
FontFamily -> "Courier"], {n, 1, 6}],
Table[{2, n} -> Style[n, 35, Purple,
FontFamily -> "Times New Roman"], {n, 1, 4}]
]]