From 9b95bb9d44a998e158a6e5aead20a08e6e54eea2 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Tue, 23 Aug 2022 18:30:20 +0200 Subject: [PATCH] tweaking tooltip --- src/pyhepmc/view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyhepmc/view.py b/src/pyhepmc/view.py index 05f8a0a..d4ff8ed 100644 --- a/src/pyhepmc/view.py +++ b/src/pyhepmc/view.py @@ -24,9 +24,9 @@ def to_dot(evt, style=None): charge = pdb.charge pname = pdb.name pname = _prettify.get(pdb.pdgid, pname) - tooltip = pdb.name + tooltip = f"{pdb.name} [{int(pdb.pdgid)}]" if pdb.quarks: - tooltip += f" ({pdb.quarks})" + tooltip += f"\n{pdb.quarks}" tooltip += f"\nQ = {pdb.charge:.3g}" if pdb.mass: tooltip += f"\nm = {pdb.mass:.4g} MeV/c2"