  We have presented a new anisotropic solution of Einstein's field equations
for compact star models. The Einstein's field equations are solved by using the
class one condition \cite{1}. After that we constructed the physically valid
expression of anisotropy factor by the help of metric potentials and there
after we obtained the physical parameters like energy density, radial and
transverse pressure. These models parameters are well behaved inside the
compact star and satisfy all the required physical conditions. Also we observed
a very interesting result that all the physical parameters are depend on the
anisotropy factor. The present compact star models are quite compatible with
the observational astrophysical compact stellar objects like Her X-1, RXJ
1856-37, SAX J1808.4-3658(SS1), SAX J1808.4-3658(SS2)
