Cody is a good choice is you plan to visit the east
entrance area. It's beautiful. As a matter of fact, my favorite part of the Yellowstone is the east and north-east area, also the bear tooth mountain. There's a lot reasonably priced cabins (w/ private bath) and other lodging between the east entrance and Cody.