Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- g = Graph[Union@Flatten[
- Thread[DirectedEdge @@ ##] & /@
- Select[{#, IsotopeData[#, "DaughterNuclides"]} & /@
- IsotopeData[], #[[2]] != {} &]]];
- g1 = Union[Flatten[VertexComponent[g, #] & /@ #], #] &@{Entity[
- "Isotope", "Tin112"], Entity["Isotope", "Tin114"],
- Entity["Isotope", "Tin115"], Entity["Isotope", "Tin116"],
- Entity["Isotope", "Tin117"], Entity["Isotope", "Tin118"],
- Entity["Isotope", "Tin119"], Entity["Isotope", "Tin120"],
- Entity["Isotope", "Tin122"], Entity["Isotope", "Tin124"]};
- vf[{xc_, yc_}, name_, {w_, h_}] :=Block[{},{Black,
- Background ->
- If[StringCases[IsotopeData[name, "StandardName"],
- "Tin"] == {"Tin"}, LightRed, LightBlue],
- Inset[IsotopeData[name, "FullSymbol"], {xc, yc}]}];
- g2 = Subgraph[g, g1, VertexShapeFunction -> vf, GraphLayout -> "LayeredDigraphEmbedding", PlotTheme -> "Monochrome", AspectRatio -> 2]
Add Comment
Please, Sign In to add comment