Skip to content

Commit

Permalink
tweaking tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski committed Aug 23, 2022
1 parent af9e753 commit 9b95bb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyhepmc/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9b95bb9

Please sign in to comment.