How to preview images generated by MetaPost?

If you're not opposed to compiling with lualatex, then you could make use of the luamplib package to bypass the preview step altogether and compile the images in-document:

\documentclass{article}
\usepackage{luamplib}
\begin{document}
Your usual document.
\begin{mplibcode}

%your metapost code here

\end{mplibcode}
The rest of your document.
\end{document}

If you have ConTeXt standalone installed, then you can just run:

context filename.mp

which will generate filename.pdf.


This solution won't let you open your MetaPost images with a double-click of the mouse, but probably will let you save a lot of time.

Since you have WinEdt 8 installed, download the add-on MetaPreview (choose the right version) and install it in WinEdt.

Note that the add-on provides a previewer for MetaPost output as well as one for MetaFont output. You can choose only the first one if you are not interested in MetaFont preview.

Once you've installed it, you will find a drop-down button in the toolbar which contains two buttons, as shown in the following image

enter image description here

To have these buttons enabled, you have to compile your .mp file first.

Once you've compiled your .mp file, with the first command ('MetaPost Preview All') you will be able to preview all the generated images, while with the other ('MetaPost Preview One') you will be prompted to choose the image you want to preview (useful when you're working on an image and want to preview only that one).

Just one remark: the add-on works regardless of the prologue but needs the generated output to be in the format .1, .2, etc., so delete the line

filenametemplate "%j-%3c.eps";

from your .mp files.


UPDATE

A new version of MetaPreview is available.

The limitation described above has been overcome. Now it can be used even when your .mp file contains

filenametemplate "%j-%c.mps";

or

outputtemplate := "%j-%c.mps";