I've gone to court a couple of times over traffic tickets. In one case, because the fine was so high, I spent money to attend a one-day "driver education" course recommended by the state in question (Virginia). In each case I pleaded guilty but asked for a reduced charge. In one case (Baltimore) they dismissed the ticket and the other they threw out the points and reduced the fine a lot (again, the speeding ticket in Virginia). It still cost me, but the reduced charge kept the thing off my insurance record.
Basically, it was entirely at the judge's discretion because I didn't have a leg to stand on other than that I was taking the matters seriously. Apparently showing up and being respectful can accomplish a lot just by itself.