Jonah went out of the city and sat to the east of the city and made a booth for himself there. He sat under it in the shade, till he should see what would become of the city.
Now the Lord God appointed a plant and made it come up over Jonah, that it might be a shade over his head, to save him from his discomfort. So Jonah was exceedingly glad because of the plant.
But when dawn came up the next day, God appointed a worm that attacked the plant, so that it withered.
When the sun rose, God appointed a scorching east wind, and the sun beat down on the head of Jonah so that he was faint. And he asked that he might die and said, “It is better for me to die than to live.”
But God said to Jonah, “Do you do well to be angry for the plant?” And he said, “Yes, I do well to be angry, angry enough to die.”
And the Lord said, “You pity the plant, for which you did not labor, nor did you make it grow, which came into being in a night and perished in a night.
And should not I pity Nineveh, that great city, in which there are more than 120,000 persons who do not know their right hand from their left, and also much cattle?”
Jonah 4: 5 - 11 ESV
But when Jonah made himself a booth and sat down opposite the city of Nineveh, waiting to see what would befall it, the prophet played a part of different significance. He was a type of the carnal people of Israel, for he was sad over the preservation of the Ninevites! He was frustrated over the redemption and salvation of the Gentiles! This is why Christ came to call "not the just but sinners to repentance."
But the shadow of the vine over his head was the promise of the Old Testament. Its law manifested, as the apostle says, "a shadow of things to come." God was offering shade from the heat of temporal evils in the land of promise.
But the worm came in the morning. It gnawed at the vine and withered it. For when the gospel had been published by Christ's mouth, all those things withered and faded away. The shade of the vine symbolized temporal prosperity for the Israelites. And now those people have lost the kingdom of Jerusalem and their priesthood and sacrifice.
All of this was a foreshadowing of the future. They were scattered abroad in captivity and afflicted with a great flood of suffering, just as Jonah-so it is written-suffered grievously from the heat of the sun. Yet the salvation of penitent nations is preferred to Jonah's suffering and the shade that he loved.
St. Augustine