New plotting methods for VertexOnlyMesh#5039
Conversation
connorjward
left a comment
There was a problem hiding this comment.
Nice!
I'd add something small to the manual here.
|
This will be really useful, thanks! My one suggestion is that you call it |
This makes sense, thank you! I've now modified it to |
connorjward
left a comment
There was a problem hiding this comment.
I'm basically happy now I think. Really nice.
Co-authored-by: Connor Ward <c.ward20@imperial.ac.uk>
achanbour
left a comment
There was a problem hiding this comment.
Added serial run checks in all plotting methods.
|
This is great, thanks! Will it allow plotting points values when the parent mesh is 1D? |
Co-authored-by: Leo Collins <leocollins511@gmail.com>
Co-authored-by: Leo Collins <leocollins511@gmail.com>
Co-authored-by: Leo Collins <leocollins511@gmail.com>
Co-authored-by: Leo Collins <leocollins511@gmail.com>
Co-authored-by: Leo Collins <leocollins511@gmail.com>
Matplotlib's scatter assumes at least 2D so the code currently doesn't support 1D and raises an Exception. firedrake/firedrake/pyplot/mpl.py Lines 131 to 138 in 3d41501 |
Of course, I'd forgotten there were separate calls for the 1D and 2D plotting |
Co-authored-by: David A. Ham <david.ham@imperial.ac.uk>
I have extended Firedrake's plotting routines to support the
VertexOnlyMesh. In summary:pointplotmethod that callsmatplotlib.scatterfor visualising the points of aVertexOnlyMesh,quivermethod to plot vector fields on aVertexOnlyMesh.I've also added unit tests to make sure these changes work as expected. Unless anyone has anything to add or comment, I will edit Firedrake's documentation to include a demo of these new functionalities.