How to integrate a solution in one of its coordinates?

Hi everyone, if I have a solution of a heat equation (can be the f04_heat_gaussian.py as example), say

u(x,y,t).

My question is: -Is it possible to use FEniCS to integrate u (x, y, t) over x or y ? How would this be implemented?

I understand that with the assemble it is possible to integrate the entire domain. However, is there another integration command? that would allow me to integrate in just one coordinate?

What I want is to plot functions like

f(y,t)= \int_s u(x,y,t) dx\;\; or \;\;g(x,t)= \int_s u(x,y,t) dy,

where s is some interval of integration.

As an application of this approach, this problem would be interesting for the calculation of the marginal probabilities of Fokker-Planck equations.

Thanks in advance.

Have you tried integrating over a subdomain as done here?
If the mesh is very uniform and the function space P1 for example you could also try to manually sum over the values of the vertices which can be obtained by using
u.compute_vertex_values()
Hope that helps for a start.