Explaining patterns of diversity within ray-finned fish