I want to look the local-disk-directory structrue use this code.
g = NestGraph[
Select[FileNames["*", #], DirectoryQ] &, $InstallationDirectory, 2,
GraphLayout -> {"LayeredEmbedding", "Orientation" -> Left,
"LeafDistance" -> .1}];
SetProperty[g,
VertexLabels -> Table[a -> FileNameTake[a], {a, VertexList[g]}]]
But I have some dissatisfaction with it.I want to put vertex name into vertex like this:
But I cannot use Placed[FileNameTake["Name"], Center]
.Any solution can do this?
VertexLabels -> Table[a -> Placed[FileNameTake[a], Center], {a, VertexList[g]}]]
$\endgroup$panelLabel[lbl_]:=Panel[lbl,FrameMargins->0,Background->Lighter[Yellow,0.7]];g=NestGraph[Select[FileNames["*",#],DirectoryQ]&,$InstallationDirectory,2];UndirectedGraph[g,GraphLayout->{"LayeredEmbedding","Orientation"->Left,"LeafDistance"->.1},VertexLabels->Table[a->Placed[FileNameTake[a],Center,panelLabel],{a,VertexList[g]}]]
$\endgroup$