The ZEUS detector at HERA has been used to measure the production of isolated photons in two types of process: deep inelastic scattering (DIS) and diffractive photoproduction. The DIS results are presented as functions of two- and multi-particle final-state quantities, extending an earlier publication. Comparison is made with two NLO-based theoretical calculations. In diffraction, cross
sections are evaluated in terms of a number of variables,
differentiating between direct and resolved photon and pomeron processes. Evidence is found for the existence of a direct pomeron process in this reaction. The shapes of all the distributions are consistent with predictions from the RAPGAP Monte Carlo simulation.