"But Jonah was greatly displeased and became angry." NIV translation
Jonah did not like the fact that God showed mercy to the people of Nineveh after they repented. We may be quick to criticize Jonah for his outward display of this attitude but many of us hide the same type of attitude in our hearts and God knows what is in our hearts. The simple fact of the matter is that Jesus died for all men and NONE of us deserve God's mercy.
"He prayed to the Lord, 'O Lord, is this not what I said when I was still at home? That is why I was so quick to flee to Tarshish. I knew that you are a gracious and compassionate God, slow to anger and abounding in love, a God who relents from sending calamity. Now O Lord, take away my life, for it is better for me to die than to live.'" NIV translation
He was mad to the point of praying for death. This is much the same as a child holding their breath in an attempt to get their way. It is as if he was saying "see God I told you that they would be saved". Jonah knew God well enough to know that He would show them love but his hatred for the people clouded his judgment.
"But the Lord replied, 'Have you any right to be angry?'" NIV translation
I love how God just gets to the point and many times He does so with a question. God's answer to Jonah's childish attitude is to provide him with something to think about. Jonah may have got caught up in being a prophet and God needed him to think about his position and how he got there. The same may be true of some of us as we have been given a gift but sometimes we forget the One that makes it possible.
"Jonah went out and sat down at a place east of the city. There he made himself a shelter, sat in its shade and waited to see what would happen to the city." NIV translation
So, Jonah doesn't argue with God but simply goes out of the city and sits down to pout like a little child. He didn't believe that the Ninevites had truly repented because he simply did not like them and didn't want it to be true change. So, he was watching and waiting to see them go back to their old ways.