import matplotlib.pyplot as plt
import numpy as np
plt.rcParams['text.usetex'] = True
plt.rcParams['font.family'] = 'serif'
plt.rcParams['font.size'] = 11
# Data compiled from scientific sources, now converted to eV.
# Some values for radioactive elements may be theoretical or estimated.
# X-axis: Atomic Number
atomic_number = np.arange(1, 95)
# Y-axis: First Ionization Potential in eV
# Conversion factor: 1 eV is approx. 96.485 kJ/mol.
# The original data in kJ/mol was:
ionization_potential_kjmol = [
1312.0, 2372.3, 520.2, 899.5, 800.6, 1086.5, 1402.3, 1313.9, 1681.0, 2080.7,
495.8, 737.7, 577.5, 786.5, 1011.8, 999.6, 1251.2, 1520.6, 418.8, 589.8,
633.1, 658.8, 650.9, 652.9, 717.3, 762.5, 760.4, 737.1, 745.5, 906.4,
578.8, 762.0, 947.0, 941.0, 1139.9, 1350.8, 403.0, 549.5, 600.0, 640.1,
652.1, 684.3, 702.0, 710.2, 719.7, 804.4, 731.0, 867.8, 558.3, 708.6,
834.0, 869.3, 1008.4, 1170.4, 375.7, 502.9, 538.1, 534.4, 527.0, 529.6,
535.9, 543.9, 546.7, 592.5, 564.6, 571.9, 580.7, 588.7, 596.7, 603.4,
523.5, 642.0, 761.0, 770.0, 760.0, 840.0, 880.0, 870.0, 890.1, 1007.0,
589.3, 715.5, 703.2, 812.0, 930.0, 1037.0, 400.0, 509.3, 499.0, 587.0,
568.0, 584.0, 597.0, 585.0
]
# Convert the data to eV
ionization_potential_ev = [val / 96.485 for val in ionization_potential_kjmol]
# Element symbols for annotations
element_symbols = [
'H', 'He', 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne',
'Na', 'Mg', 'Al', 'Si', 'P', 'S', 'Cl', 'Ar', 'K', 'Ca',
'Sc', 'Ti', 'V', 'Cr', 'Mn', 'Fe', 'Co', 'Ni', 'Cu', 'Zn',
'Ga', 'Ge', 'As', 'Se', 'Br', 'Kr', 'Rb', 'Sr', 'Y', 'Zr',
'Nb', 'Mo', 'Tc', 'Ru', 'Rh', 'Pd', 'Ag', 'Cd', 'In', 'Sn',
'Sb', 'Te', 'I', 'Xe', 'Cs', 'Ba', 'La', 'Ce', 'Pr', 'Nd',
'Pm', 'Sm', 'Eu', 'Gd', 'Tb', 'Dy', 'Ho', 'Er', 'Tm', 'Yb',
'Lu', 'Hf', 'Ta', 'W', 'Re', 'Os', 'Ir', 'Pt', 'Au', 'Hg',
'Tl', 'Pb', 'Bi', 'Po', 'At', 'Rn', 'Fr', 'Ra', 'Ac', 'Th',
'Pa', 'U', 'Np', 'Pu'
]
# Create the plot
plt.figure(figsize=(8, 5))
plt.plot(atomic_number, ionization_potential_ev, marker='o', linestyle='-', color='b', markersize=5)
# Add annotations for a smaller, representative set of elements for clarity
important_elements_t = {
'He': 2, 'Ne': 10, 'Ar': 18, 'Kr': 36, 'Xe': 54, 'Rn': 86, # Noble gases
'Gd': 64, 'Hg': 80, # Transition metal features
'U': 92, 'Pu': 94 # Inner transition metals
}
important_elements_b = {
'H': 1, # Noble gases
'Li': 3, 'Na': 11, 'K': 19, 'Rb': 37, 'Cs': 55, 'Fr': 87, # Alkali metals
'Cr': 24, 'Cu': 29, 'Au': 79, # Transition metal features
'La': 57, 'Lu': 71 # Inner transition metals
}
for symbol, z in important_elements_t.items():
index = z - 1
plt.annotate(
symbol,
(atomic_number[index], ionization_potential_ev[index]),
textcoords="offset points",
xytext=(0, 10),
ha='center',
fontsize=15,
fontweight='bold',
color='red'
)
for symbol, z in important_elements_b.items():
index = z - 1
plt.annotate(
symbol,
(atomic_number[index], ionization_potential_ev[index]),
textcoords="offset points",
xytext=(0, -18),
ha='center',
fontsize=15,
fontweight='bold',
color='red'
)
# Add title and labels
plt.xlabel('Atomic Number', fontsize=14)
plt.ylabel('First Ionization Potential (eV)', fontsize=14)
# Add grid for better readability
plt.grid(True, linestyle='--', alpha=0.6)
# Improve layout
#plt.legend()
#plt.tight_layout()
plt.xlim(0, 95)
plt.ylim(0, 27)
# Show the plot
plt.show()