Compare Antonio with Bassanio and Portia with Shylock in The Merchant Of Venice.
Antonio and Bassanio are very close friends but are different in character. Antonio accuses Shylock of usury (lending money with a high interest rate) whereas Shylock accuses Antonio of lending money with no interest. This dichotomy seems to establish Antonio as a generous businessman (or a bad one) and Shylock as a greedy businessman (or a smart one). Antonio is more complicated than this, as is Shylock.
At the beginning of the play, Antonio exhibits a melancholy that is never fully revealed. Some critics speculate that he is unhappy in his position as a moneylender given his generous nature. However, he must have some business sense (charging some interest) in order to even stay in business, so saying he is generous and Shylock is greedy is much too simplistic. Bassanio, in the end, turns out to be nearly as loyal a friend to Antonio as Antonio is to Bassanio. But Bassanio is more impulsive, more irresponsible. Like Shylock and Antonio, Bassanio is more complicated. He is impulsive and maybe even selfish in gambling with Antonio's money in pursuit of a woman (and her money). But in the end, he offers himself and his newfound money in order to save his friend Antonio.
Portia is praised by nearly everyone in the play. She seems genuinely in love with Bassanio. She manages to work around her predicament of having to marry the one who solves the riddle. And she manages to outsmart everyone by freeing Antonio. But while she preaches mercy (disguised) in order to persuade Shylock to free Antonio, she does not show Shylock any mercy. This is where the (at that time) antisemitism comes in: it posits Shylock as an outsider.
Shylock is complicated as well. He comes across as greedy and without mercy, even to the extent that he will take Antonio's life to secure his bond. But his angst is the result of not just the principle of the bond; it is also about revenge. He is the outsider. His attitude and high interest rates certainly don't make him popular, but he believes that he is mistreated simply for being Jewish. We see in Act 3, Scene 1 that he is not just a greedy businessman. He is a human being who feels like he's always being mistreated. He says that he has been disgraced:
I am a Jew: hath not a Jew eyes?
hath not a Jew organs, dimensions, senses, affections, passions?
fed with the same food, hurt with the same weapons? (III.i.51-53)
Shylock goes on to note that when a Jew wrongs a Christian, the Christian demands revenge, so it is his right to seek revenge as well. At the end of the speech, he says, "The villainy you teach me I will execute."
So, none of these characters are one-dimensional. Antonio and Bassanio are both loyal friends. Antonio is generous, brooding, and generally selfless. Bassanio is impulsive, somewhat selfish, but in the end (like Antonio) a worthy and loyal friend. Portia is intelligent and beautiful but does not show Shylock the same mercy she shows others. Shylock is greedy, intelligent, and painted as generally unlikable, but he is subjected to prejudices because he is Jewish. What makes this play interesting is that although Antonio, Bassanio, and Portia are the protagonists and Shylock is the antagonist, their characters are not that easily defined.