Galaxy distributions within and around observed and simulated groups