The cluster
H–R diagram log–log; hotter left
L/LL/L_\odotTeff  (K)T_\mathrm{eff}\;(\mathrm{K})

Census — how many stars of each mass?

stars
O-type (≥16 MM_\odot)
heaviest
MM_\odot
median mass
MM_\odot
total mass
MM_\odot
The IMF
ξ(m)=dN/dM\xi(m)=\mathrm{d}N/\mathrm{d}Mmass  (M)\mathrm{mass}\;(M_\odot)

Drag the high-mass slope and the whole character of the cluster shifts: flatten it and a few brilliant blue stars appear in the upper-left of the H–R diagram; steepen it and they vanish into a crowd of faint red dwarfs. Cool red stars are always the many; the rare hot stars are always the few — and yet the few are the whole story, because luminosity climbs so steeply with mass that a handful of O stars outshine, and out-push, everything else combined.

Change N and watch the massive tail flicker. That is not a rendering glitch — it is sampling noise. A small cluster genuinely might not draw a single massive star, which is exactly why the high-mass end of the mass function is so hard to measure and so easy to get wrong. Nothing here is choreographed: the stars are re-sampled from the mass function in your browser, and the diagram is derived, not drawn.

Open the Environment lens and the slope stops being a free knob: a cluster's metallicity and mass set it, through the Marks & Jeřábková prescription — metal-poorer, more massive clusters come out top-heavier — and here the cluster mass also fixes how many stars there are at all.