I used mdframed but I am unable to reproduce the example environment (?) from this primer. The main problem is with figures (graphics, plots), of course. Any help?

I used mdframed but I am unable to reproduce the example environment (?) from this primer. The main problem is with figures (graphics, plots), of course. Any help?

mdframed does not allow floats within the mdframed environment*. The reason for this is obvious, since the float should be allowed to move around in the document, and fixing it within a block-like environment prohibits this movement. In fact, LaTeX will complain with an error
! LaTeX Error: Float(s) lost.
Instead, create a "fake" float by using (say) the center environment with a caption created by \captionof{<fenv>}[<ToC entry>]{<caption>} (provided by the capt-of and caption packages). As an extra step to group the image and its caption, perhaps wrap them inside a minipage.
* This might change in the future, based on Marco's comment.
centeror aminipageand\captionoffrom thecapt-ofpackage if your plots/images/tables require captions. – Gonzalo Medina Jul 10 '13 at 23:23