This paper concerns a swing-up control problem for a 3-link gymnastic planar robot in a vertical plane, whose first joint is passive (unactuated) and the rest are active (actuated). The objectives of this paper are: 1) to design a controller under which the robot can be brought into any arbitrarily small neighborhood of the upright equilibrium point, where all three links of the robot remain in their upright positions; 2) to attain a global analysis of the motion of the robot under the controller. To tailor the energy based control approach to achieve the above objectives, first, this paper considers the links 2 and 3 as a virtually composite link and proposes a coordinate transformation of the angles of active joints. Second, this paper constructs a novel Lyapunov function based on the transformation, and devises an energy based swing-up controller. This paper presents a necessary and sufficient condition for nonexistence of any singular points in the controller for the robot starting from any initial state. Third, this paper carries out a global analysis of the motion of the robot under the controller, and establishes some conditions on control parameters for achieving the swing-up control objective. To validate the theoretical results obtained, this paper provides simulation results for a 3-link robot whose mechanical parameters are obtained from a human gymnast.