Bousquet-Melou and Eriksson showed that the number of partitions of n into distinct parts whose alternating sum is k is equal to the number of partitions of n into k odd parts, which is a refinement of a well-known result by Euler. We give a different graphical interpretation of the bijection by Sylvester on partitions into distinct parts and partitions into odd parts, and show that the bijection implies the above statement.