Annastasia has it spot on, although i'd like to add that with platys you need preferably 3females+ to every male in mixed gender groups, but with male swords, unlike male platys, its not good to mix them together even if you have lots of females as they will pretty much always fight- with a lone male swordtails though you should still give him at least 3females(the minimum for any male livebearer is 2, although i think 3 is a better minimum as the more females you have, the less likely any single female will be over-harrassed by the male/s) .