  We consider a gravitating system consisting of a scalar field minimally
coupled to gravity with a self-interacting potential and a U(1) nonlinear
electromagnetic field. Solving analytically and numerically the coupled system
for both power-law and Born-Infeld type electrodynamics, we find charged hairy
black hole solutions. Then, we study the thermodynamics of these solutions and
we find that at a low temperature the topological charged black hole with
scalar hair is thermodynamically preferred, whereas the topological charged
black hole without scalar hair is thermodynamically preferred at a high
temperature for power-law electrodynamics. Interestingly enough, these phase
transitions occur at a fixed critical temperature and do not depend on the
exponent $p$ of the nonlinearity electrodynamics.
