Drawing muscles on a cartoon leg is as simple as making the calves and thighs much larger ovals than the knees, then adding some extra lines to show ripples in the muscles. There is no real science to this. The artist's vision determines the subject matter and character design of the cartoon.
The human leg muscles are a complex structure below the surface of the skin, but the overall outward appearance is nothing more than simple elongated ovals with some additional ripples and contours within the outline as deemed necessary by the artist. For instance, the calf muscles might be more detailed than the rest of the leg to show the strength and tone of this muscle, or the artist may choose to focus more on the thigh muscle and show the strength of the upper leg. After the initial outline is made, a lot of creative license goes into deciding which muscle to emphasize the most. Take into consideration the type of character being drawn and the position in which that character is being depicted in the cartoon. An example of this is a woman wearing high heels, in which the typical muscle emphasized is the calf. However, if the subject is a man, such as superhero, both the calf and thigh muscles are usually shown as very toned. Think about a realistic version of the cartoon, and use the same muscle that would be shown off. Take advantage of it being a cartoon, and feel free to go a little overboard on the actual size and tone of the muscle.