I was just trying to confuse the issue. When you squeeze the gas, the molecules do actually speed up (instead what I said earlier) since you are pushing them with a piston in one direction. The shape of the graph stays the same, but since work is being done on all the molecules (eventually, through collisions), their energy must increase. So, the curve gets stretched to the right. There are now more high energy particles, and tiny thermal vibrations (phonons) move into the material of the container, and transfer energy from the gas.
It's very interesting that elastic bands also heat up and cool off as you stretch them and let them relax.