dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #12339
Plotting functions in c++/python
If you try plotting a use-defined Function in c++, you'll end up with
a runtime error as the Function vector does is not initialised. So you
have to interpolate the Function before plotting it in c++. However,
this is not the case in python, you can create a user-defined function
and immediately plot it. I don't think the python plotting approach
tries to interpolate the Function internally.
Also, when I tried this with image data, I got different results in
c++ and python:
c++: Interpolating and plotting a user-defined Function creates a
'pixelated' rough version of the input image. The FunctionSpace was
(Lagrange, triangle, 1).
python: Directly plotting a user-defined Function shows the original image.