JFK was certainly an example of that. Likewise, with Ronald Reagan, Churchill and so many others.
However, upon thinking about this, I would have to add to "death" - the passage of sufficient time to allow the person to be compared with his or her successors and for the historians to do their work.
I think without the passage of time, "Death," alone would not bestow the mantle of greatness. The two must go together. Otherwise, JFK would have been seen to be "great" late in the afternoon of November 22, 1963