Create XY data for current field output in the viewport

When we contour plot some field output, often we want to create XY-plot at one or multiple elements (for element output) or nodes (for nodal output) for the currently shown output in the viewport. The attached plug-in will do it for you.

Be careful, to select nodes for nodal output (such as displacement, temperature) and elements for element output (such as stresses). 

I have attached the source code. Suggestions and comments are most welcome.