Precise location of sensor nodes is essential to the success of sensor network applications. Several localization methods based on mobile anchor nodes with directional antennas have been proposed. However, none of the methods was implemented by analyzing the directional antenna's radiation patterns with cluster analysis approaches. This paper presents a localization scheme based on the cluster analysis technique. The position of the sensor node can be determined using the scheme with the location information obtained by mobile anchor nodes equipped with directional antennas. The localization scheme has been implemented on an IRIS mote platform successfully. The experimental results show that the localization scheme achieves better accuracy than clustering algorithm K-means, statistical Mean and Median, and Received Signal Strength Indicator (RSSI) approaches.