Some species like it a little hotter when they want to get it on. I don't think its all species, and some species will just do it any time. It really depends on the fish.
If you are just breeding swordtails they will mate at literally any temperature. They could be in water that was cold enough to kill them and they would still do it at least once right before they died! (kidding of course) A normal temperature is fine for breeding swordtails but their fry develop faster once they have been born if they are kept at a slightly higher temperature. Just a degree or two higher. And its usually a pretty good idea for the fry to have their own tank so they don't become a snack for daddy and mum.
I know nothing of swordtails but some fish mate during a certain season of the year. It could be when they have an abundancy of food available which then you could induce mating by feeding more of a variety of foods and some do it when the weather gets warmer, which means turning the thermostat on the heater up a few degrees might help.
Make sure you don't already have the temp at the highest comfort level for them and still turn the thermostat up tho.