Give an example from To Kill a Mockingbird of Atticus's understanding of his neighbors' beliefs while defending his own principles against them?
There are some examples of this in Chapter 16. The Finches are eating breakfast after the confrontation at the courthouse the night before. Atticus remarks that he was surprised that Mr. Underwood spoke up in Tom’s defense because he usually didn’t like Negroes and would not have one near him. Aunt Alexandra chastises Atticus for making this comment in front of Calpurnia. Atticus replies that anything fit to say in their house is fit to say in front of Calpurnia, that she is like family, and she knows how much they love her and need her. Aunt Alexandra does not agree, however, and claims that whatever is said in their house is immediately repeated in the Negro quarters. Atticus tells her that perhaps if the whites did not give the Blacks so much to talk about, then they wouldn’t have to talk about them. In this way, Atticus explains how his views differ from others. The other whites in Maycomb would never have spoken so openly about Negroes in front of one.
Later in this same chapter, Scout asks Atticus why Mr. Cunningham was trying to hurt them. “I thought he was our friend,” she tells her father. Atticus replies that he is their friend, and he is basically a good man, but when a man is part of a crowd, that man takes on the mob mentality. He explains to the children that even though there was a mob there and that some of his friends were in the mob, he still did not agree with their prejudices, and he believed that they really would not have hurt him that much:
He might have hurt me a little," Atticus conceded, "but son, you'll understand folks a little better when you're older. A mob's always made up of people, no matter what. Mr. Cunningham was part of a mob last night, but he was still a man. Every mob in every little Southern town is always made up of people you know. Doesn't say much for them, does it?"
He tells the children that because of them, Mr. Cunningham was forced to walk in Atticus’ shoes for a little while. Atticus shows that he understands where his neighbors are coming from, prejudice, but that it is not OK and he will continue to stand up for his principles.
Another good example of Atticus showing understanding but defending his own principles would be with the Ewells. Atticus explains to Jem that although it's illegal, Bob Ewell is "allowed" to hunt out of season. He said that it's illegal and should not be tolerated; however, knowing that he spends what money he does get on alcohol, how could anyone deny his children the only meat that can be afforded to appear on their plates.
Because of Atticus' defending of Tom Robinson, the kids start having issues with various people, which generally resulted in fights. In the conversation he had with Scout, he tried to explain to her that things were going to get worse before they got better, and she needed to ignore the ignorance of the people trying to get her upset, for reacting was just feeding their actions. He tried to explaining to her why people feel and react they way they do to a white man defending a black man, but at the same time, making sure she understands that people should always do what's right, regardless of the background of the person they're helping or defending.
For Jem, the thorn in his side was Mrs. Dubose. Every time they'd walk past her house, she'd shout horrible things about Atticus. Atticus explained that she was just an old woman set in her ways, and that regardless of what she said, it wasn't worth getting upset over because everyone was entitled to their own opinions. At the same time, he argued that her words were just her opinion, and opinion doesn't make them fact or truth. Atticus taught the kids, however, to speak respectfully to everyone, regardless of their beliefs, even though he defended Mrs. Dubose's actions.
Good question. The above examples are excellent. How about the episode with Mrs. Henry Lafayette Dobose. While it's true she's is suffering the effects of morphine addiction, it's clear she has no love for Atticus as he's defending a black man. She is clearly a throwback to the Civil War era, and her prejudice runs deep. She excoriates Atticus to his face as well as to his kids', yet Atticus never treats her with anything but politeness and courtesy. He always tips his hat and greets her pleasantly. When Jem has wronged her, Atticus requires him to make amends.
This behavior is evidence of several of Atticus's beliefs and principles. Miss Maudie applauds Atticus as being the same in his house as he in on the street, and this is a perfect (and literal) example of that. Atticus has told Scout it's important to walk in other people's shoes for awhile, and he lives that out here. He does not change his position, but he does treat Mrs. Dubose with the respect everyone deserves. When his children have done something wrong--even if it is marginally justified--he expects them to make things right.
Another good example of Atticus' tolerance concerning his neighbors comes during the final chapter of Part One. Mrs. Dubose has long terrorized her neighbors with her angry outbursts, and she regularly frightens Jem and Scout when they pass by her house. Atticus realizes that her bad moods stem from her long addiction to morphine, and he always treats her with gentlemanly civility. Even after Jem reveals the insults that she has hurled against his father, Atticus continues to visit her and support her punishment that she has established for Jem.
Atticus also demands that his children "stop tormenting" Boo Radley, even though their efforts to make contact with him are primarily of a desire for his friendship. Atticus surely does not support the Radleys' decision to lock Boo away in their home instead of getting him needed medical (mental) care, but Atticus also believes in preserving others' privacy.