Mathematica Asked by Rohit Namjoshi on December 21, 2020
Bug introduced in 11.3 or earlier, Fixed in 12.2.0
NearestNeighborGraph
generates incorrectly formatted output on rasterized input. Reported to Wolfram support CASE:4093797
$Version
(* "11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018)" *)
NearestNeighborGraph[
Rasterize[Style[#, 20], "Image"] & /@ Alphabet[],
2,
VertexLabels -> "Name"
]
The labels are too large.
Is there a workaround?
Assuming you are asking for a workaround, you can generate the output you expect with:
v = Style[#,20]& /@ Alphabet[];
rv = Rasterize/@v;
NearestNeighborGraph[
rv,
2,
VertexLabels->Thread@Rule[rv,v]
]
Correct answer by Carl Woll on December 21, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP