Phi-theta plot for spherical solution

Hi All,

I can solve an equation on a unit spherical surface, no problems. What I would like to do is to plot this solution, with the mesh, mapped to the phi-theta plane (so in the [0,2pi]x[0,pi]-square). I have tried to export the solution to paraview, but I don’t know what do to from there. Is this possible to somehow do from within fenics? Anyone have any suggestions?

Thanks in advance!

Use Paraview’s calculator filter and write the appropriate script for your transform.

Thank you for your answer.While I get that to work, the edges of the plot becomes terribly ugly. Is it possible to somehow extract the data of the solution in fenics and perform the projection in fenics so that I can plot it in for instance matlab?