My problem requires the output of many state variables - these are mainly concentrations of chemical species in a reactive fluid flow problem.
Ideally, every Function instance for each of these state variables should be output to a single xdmf file.
I have tried the following:
file = XDMFFile(mesh.mpi_comm(), 'result.xdmf')
while t < T:
    for species in species_list:
        file << (n[species], t)
    t += dt
where n[species] returns the Function instance for a species named species (e.g., H2O, CO2).
When loading result.xdmf in Paraview, only the time series for the last chemical species is available - a spreadsheet view of this dataset shows nan for all others.
Having one file for every species requires a lot more effort to setup the visualization in Paraview. Also, a single spreadsheet view of all these data is not easily achievable, which I often need to create plots in gnuplot. 
What am I doing wrong?