How to create a stress-strain diagram?

Dear,

How to create a stress-strain diagram for elastic analysis as in:
https://comet-fenics.readthedocs.io/en/latest/demo/elasticity/2D_elasticity.py.html#

And in 3D:
https://fenicsproject.org/pub/tutorial/html/._ftut1008.html#ftut:elast

@bleyerj Can you help me?

Sorry if I was not very clear.

I would like to know how to “pick up” a point or region of the displacement and also how to “pick up” in the same position of the model, the stress variation and make a plot as shown below.
images

Hi! I was looking for a solution for the same question you asked. Could you figure it out?