You have the right concept. However, it is not just for party favoritism. Gerrymandering is drawing the lines in order to favor a particular party or group. It was named after Gov. Gerry (I forget the state. I want to say New Jersey) during the early years of our country. The district looked vaguely like a salamander, hence the name. We have a gerrymandered district here in Florida although it is illegal. The representative for the gerrymandered district is Corrine Brown. The district runs 120 miles from the west side of Jacksonville, Fl to Orlando.