Inducing thermal gradients in fluid systems with initial, well-defined density gradients results in the formation of distinct layered patterns, such as those observed in the ocean due to double-diffusive convection. In contrast, layered composite fluids are sometimes observed in confined systems of rather chaotic initial states, for example, lattes formed by pouring espresso into a glass of warm milk. Here, we report controlled experiments injecting a fluid into a miscible phase and show that, above a critical injection velocity, layering emerges over a time scale of minutes. We identify critical conditions to produce the layering, and relate the results quantitatively to double-diffusive convection. Based on this understanding, we show how to employ this single-step process to produce layered structures in soft materials, where the local elastic properties vary step-wise along the length of the material.