Presume that I can't flee the stranger, who's so nearby (e.g. airplane seatmate) that I can feel her coughs every 5 minutes.
I think simply asking them politely should be enough, something along the lines of :
Hi, so sorry to bother you, but could you cover your mouth with your hand when you cough ? I'd be really grateful if you did.
Usually, if the person doesn't lack any sense of courtesy, they should be happy to oblige.
If they don't though, and assuming it is possible you should try to move away from them. For you example (a plane) you could ask a hostess if it is at all possible to switch seats.
If it isn't then you might need to brace yourself for a long, and uncomfortable journey.