| Frühere | Chronologischer Index | Spätere | ||
| Vorherige | Thematischer Index | Nächste |
Moin moin Peter,die Funktion makeVertexLabels ist wg. des Nichtvorhandenseins von decaySymbols im zugestellten Notebook nicht definiert, RelationGraph[] funktioniert trotzdem; so einiges kann man aus dem Notebook werfen (* bin it *), es bleibt
Clear[makeDecayGraphSample]
makeDecayGraphSample[isotope_Entity] :=(* makeDecayGraphSample[isotope]= *)
RelationGraph[DaughterNuclidesQ, children[isotope],
VertexLabels -> {x_ :> IsotopeData[x, "Symbol"]},
el = makeEdgeLabels[isotope];
EdgeLabels -> ((#[[1]] ->
IsotopeData[StringReplace[#[[2, 1, 1]], {"-" -> "",
WordBoundary ~~ x_ :> ToUpperCase[x]}], "Symbol"] \[DirectedEdge]
IsotopeData[StringReplace[#[[2, 1, 2]], {"-" -> "",
WordBoundary ~~ x_ :> ToUpperCase[x]}], "Symbol"] -> Style[#[[2, 2, 2]],
If[#[[2, 2, 2]] == "\[Alpha]", Red, Blue, Green], Large]) & /@ el), PlotRangePadding -> 1.65, ImageSize -> 600, PlotTheme -> "Scientific", ImageSize -> 2 2048]zur Fertigung eines schmucken Bildchens (siehe bitte Beilage, da die Newsgroupsoftware Bilder im Fliesstext verwirft).
Grüsse udo. On 1/25/2026 5:41 PM, Peter Klamser via demug wrote:
Ein Teil des Codes wurde aus der folgenden Quelle übernommen: https://community.wolfram.com/groups/-/m/t/1733124\[AliasDelimiter] Warum kann ich die VertexEdges nicht vom Format (Beispiel) „Uran-235” in „U235” ändern? Dazu habe ich den Block convert$isotop$name[name$string] geschrieben, den ich gerne Die VertexLabels -> makeVertexLabels[isotope] in RelationGraph sind nutzlos. Wenn ich die VertexLabels lösche, ändert sich nichts. Ich möchte also die Ausgabe des Namens des Isotops ändern, ähnlich wie das in https://mathematica.stackexchange.com/questions/95625/overriding-a-built-in-function-with-custom-coded-procedures beschrieben wird: Unprotect[Entity["Isotope", Name_]["Name"]]; Entity["Isotope", Name_]["Name"] /; $override == True := Block[{$override = False}, convert$isotop$name@Entity["Isotope", Name]["Name"]]; Protect[Entity["Isotope", Name_]["Name"]]; Entity["Isotope", "U235"]["Name"] Dann bekomme ich nur die Meldung SetDelayed::write: Tag Entity in Entity[Isotope,Name_][Name]/;$override==True is Protected. Leider passiert da nixxxxxxxxxx. Vielen Dank und freundliche Grüße von Peter _______________________________________________ DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch http://www.mathematica.ch/mailman/listinfo/demug Archiv: http://www.mathematica.ch/archiv.html
decayTreePlotSymbols.nb
Description: application/vnd.wolfram.nb
u235-relationgraph.jpg
Description: JPEG image
_______________________________________________ DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch http://www.mathematica.ch/mailman/listinfo/demug Archiv: http://www.mathematica.ch/archiv.html
| Frühere | Chronologischer Index | Spätere | ||
| Vorherige | Thematischer Index | Nächste |
DMUG-Archiv, http://www.mathematica.ch/archiv.html