In this paper, we present Gray codes for the sets of noncrossing partitions associated with the classical Weyl groups, and for the set of nonnesting partitions of type [Formula: see text]. An algorithm for the generation of type [Formula: see text] nonnesting partitions is developed in which a Gray code is given for those partitions having a zero-block, while the remaining are arranged in lexicographic order.