I would only like to point out that the repetitiveness of the questions is not the issue here. There are likely thousands of examples we could find of people asking to do basically the same task in different languages that no one bats an eye at. For instance, there are surely countless questions asking about how to accomplish basically the same task in every SQL variant imaginable.
Additionally, note that the spurt of XKCD graphing questions has stopped all on its own, which suggests that concerns about a wild proliferation of such questions is probably overblown. These things tend to die out on their own.
Let's try to focus our irritation on the quality of the question, not the fairness of which questions win the popularity lottery. As I noted in some comments, the fact that some may ask these questions in order to farm rep or badges may well be annoying, but that really should have no bearing on our judgement about the quality of the question.
In this case, I think the only really valid criticism one can level is that the OP in each case did not make any attempt themselves, and instead simply asked for ideas and code.
Personally, I agree that ideally more effort should be displayed when asking these sorts of things. But on the other hand I tend to be less anal about that when the question yields high quality answers in short order, and the resulting content is likely to be useful to significantly more people than just the OP. If I really feel the question displayed little effort, but produced some great answers, there's no need to close the question and risk losing content, I can simply down vote the question.