MetaPost uses a language based on that of Metafont to produce precise technical illustrations. Its output is either scalable PostScript or SVG or bitmaps PNG, rather than the bitmaps Metafont creates. This tag is compatible with {diagrams}.

learn more… | top users | synonyms

6
votes
1answer
401 views

Creating a grid which fills available text area on a page in ConTeXt?

I have some pages containing only a small paragraph at the top and a large empty area where readers can add notes or draw, e.g.: _______________ | | | This is some | | text in a pa- | ...
15
votes
4answers
2k views

A good METAPOST alternative for plotting 3d surfaces

I find METAPOST to be a wonderful software to create 2d charts and figures. Can you name me a few good alternatives to METAPOST for drawing 3d surfaces? The crucial feature I'm looking for is the ...
2
votes
1answer
822 views

How to draw an optical lattice

I want to make in TikZ or MetaPost an image of a two dimensional lattice with oscillations like these: (Source: http://www.uibk.ac.at/th-physik/qo/research/opticallattices.html) or this one: ...
65
votes
6answers
3k views

Curve through a sequence of points with Metapost and TikZ

This question led to a new package: hobby I found Metapost best for drawing complex smooth curves (i.e., Bezier, splines), since you do not have to directly specify Bezier control points. ...
6
votes
1answer
293 views

How can I use german umlauts in MetaUML

I have the following files: metaumlfile.mp: input metauml; beginfig(1); Class.Benutzer("Benutzer") () ("+üben(): void"); drawObjects(Benutzer); endfig; end ...
3
votes
1answer
513 views

Draw rounded cube

How can I draw a rounded cube using Asymptote, Metapost or anything that produces high quality graphics? A rounded cube is for example the boundary of the minkovski sum C+S where C=[-1,1]^3 and S is ...
5
votes
1answer
3k views

feynmf with pdflatex [duplicate]

Possible Duplicate: How to use kile with feynmf or feynmp? I would like to use feynmf, or better feynmp, with pdflatex. My first idea was to replace all the files file.[0-9]* which are ...
7
votes
1answer
813 views

How to generate EAN barcodes with TikZ or MetaPost?

I'm looking for way to generate EAN barcodes with LuaLaTeX. I'm aware of this question; the solution to that needs pstricks, which won't work easily with LuaLaTeX (I don't want to install GhostScript ...
3
votes
1answer
560 views

Where is mp.exe in MikTeX 2.9?

I am a a retired software engineer and a newbie on this site. Please execuse me for the naiveness in my question. I am using Windows, XP and Vista. Other OS's are not affordable to me for now. I used ...
5
votes
2answers
3k views

metapost and pdflatex

I'm trying to use figures created with metapost in a TeX document compiled with pdflatex, but I have some troubles. I did as advised here, but it fails! My code is this : ...
1
vote
1answer
482 views

Metapost compiler freezes when I add labels

I installed texlive-metapost in Linux Mint (similar to Ubuntu), and each time I compile a MetaPost figure which contains a label, the compiler finishes the job, but the picture is not saved as ps, ...
2
votes
1answer
282 views

Metapost - Color portions of a curve with different colors

I searched a bit and didn't find something that relates to this. Suppose I created a closed curve in Metapost with the command p:=z_1..z_2..z_3..cycle. Is it possible to color pieces of this curve ...
4
votes
0answers
607 views

Creating a colored bar chart using MetaPost or pgfplots [closed]

Right now I have this: input graph input sarith beginfig(1) draw begingraph(3cm,2cm) gdata("data1.d", v, path p; augment p (v1,0); augment p (v1,v2); augment p (v1 Sadd ...
104
votes
9answers
10k views

Simulating hand-drawn lines

I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar package). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear ...
3
votes
1answer
247 views

Using Latexmk with mpost [duplicate]

Is it possible to tell latexmk to execute mpost paper.mp after each compilation run if paper.mp has changed? I tried to create a custom latexmkrc rule: add_cus_dep('mp', '1', 0, 'mpost'); sub mpost ...
7
votes
3answers
371 views

Which plotting tool is more likely to stay stable in the basics: MetaPost, PStricks or pgfplots?

I have been looking at the three (major ?) tools---MetaPost, PStricks or pgfplots for plotting data together with LaTeX. My experience is this: MetaPost code can demand lots of lines for simple ...
3
votes
1answer
488 views

graphing problems in metapost

I have some data as follows (first and second columns) in the file mydata.d that I want to graph: 8 98826 year 2008 9 104925 year 2009 10 140153 year 2010 11 178414 year 2011 As we have ...
13
votes
1answer
3k views

pgf/tikz vs metapost

Can the experts here comment on the pros and cons of these two languages? I have been using metapost for a long time and I was wondering if I should learn pgf/tikz also. How does both languages ...
4
votes
3answers
686 views

Metapost label based on variable value

I want to label a scale based on a variable value and I wrote a metapost code like this. $ := 1; for i = -.3cm step .6cm until 3.6cm: label.bot(str$,(i,-3.7cm)); $ := incr($); endfor; It ...
0
votes
1answer
469 views

metapost macro for drawing filled circle not working

The following macro draws a black circle only on the first invocation. The remaining three circles are unfilled. Where am I going wrong? def big(expr z) = begingroup save a; path a; a = fullcircle ...
9
votes
2answers
680 views

OpenType fonts for Metapost Labels

Is it possible to use OpenType fonts in MetaPost labels? I use MiKTeX 2.9. I hoped something like mpost --tex=dvilualatex <myfile>.mp might work, but no luck. Suggestions? I tried this, but ...
1
vote
1answer
426 views

Tutorial for emp package

I really like the idea of the emp package - you write your MetaPost sources directly in LaTeX source. However, I can't make this package work. I read the official readme, but to no avail. Some of my ...
2
votes
2answers
460 views

Change background color in metapost

I have a metapost diagram using colour that when displayed in normal latex (with a white background) works well. Now, I want to add the same diagram to a presentation done in Beamer (Warsaw theme) ...
0
votes
1answer
733 views

Metapost use venn package

I use TexShop, and I have successfully compiled an example which uses metapost code directly in LaTeX code ( by running pdflatex, then metapost, then finally pdflatex again). this code uses mpfic ...
6
votes
2answers
820 views

How to use mplib directly from lua?

I am trying to plot some graphics calling mplib from lualatex. The 'standard' way is the use of luamplib package and mplibcode environment. I was wandering, is there a way to call mplib from lua ...
3
votes
1answer
342 views

mirror figure in metapost

With a valid figure, I would like to always produce the mirror figure. To clarify my thought, I'm looking for some tricks to do something like: beginfig(1); ... endfig; beginfig(2); ...
27
votes
3answers
4k views

Create a symbol font from SVG symbols

Is it possible to create an own scalable font from a set of symbols (~700), all in SVG format. All of them are symbols (like Zapf Dingbats), so there would be no need for special settings like ...
9
votes
2answers
614 views

automatic resizing of edges with long labels

I would like to know if there is a way to automatically resize edges when they have long labels. For example, the following code \documentclass[10pt]{article} \usepackage{tikz} ...
9
votes
1answer
677 views

Calculate font metrics for glyphs inside MetaPost figures

I'm looking for a way to calculate the ascent and descent of a character glyph after it has been scaled and then drawn into a MetaPost figure. With TikZ, I can do this fairly easily by performing ...
5
votes
1answer
369 views

How to use MetaPost with TeXlipse?

I would like to to use TeXlipse, MetaPost and MetaUML to generate requirements specifications. The problem I have is that I haven't found an easy way to incorporate MetaPost in TeXlipse build. There ...
2
votes
1answer
488 views

MetaUML — generate image as output

I'm planning to use MetaUML to automatically generate UML diagrams (as images) and display them. I found that there is an utility, mptopdf, that helps generating the output as a PDF file: mptopdf ...
8
votes
1answer
214 views

Should I have changed MetaObj or is there a better way?

I want to use MetaObj to arrange some diagrams. I have some nice, color MetaPost drawings of components for my diagrams. I create the picture objects like this: input metaobj; def picphone = ...
5
votes
5answers
1k views

Commutative diagrams using MetaPost or Asymptote

Xy-pic, TikZ and PSTricks seem to be the graphics packages commonly used to draw commutative diagrams. Having heard about the power of MetaPost and Asymptote, I would like to experiment with them. ...
8
votes
4answers
600 views

Error in PS generated by MetaUML

If I use following example (or any other): input metauml; beginfig(1); Class.A("Point") ("+x: int", "+y: int") (); Class.B("Circle") ("radius: int") ("+getRadius(): ...
10
votes
1answer
2k views

Embedding MetaPost in LaTeX document

I have problem using the emp package in TeXlive 2010. When I try to use it with empcmds it prints contents to output. If I use emp it parser fails after first character. Also - how should I import ...
40
votes
8answers
7k views

Is anybody using TeX for business reporting?

Would TeX (LaTeX, ConTeXt, etc) be a good solution for PDF business reports that require dynamically generated graphs and tables? I need to create financial reports that must look top-notch in their ...
6
votes
3answers
3k views

MetaPost pictures in PDFLaTeX

To include MetaPost pictures in a latex file compiled by pdflatex I usually do something like \usepackage[pdftex]{graphicx} ... \includegraphics{filename-without-mps} but this requires all metapost ...
12
votes
3answers
2k views

Graphing sine function in MetaPost

I'm trying to reconstruct this picture in MetaPost: So far came up with this: draw (-1cm,0)--(3cm,0); draw (0,1cm)--(0,-1cm); draw fullcircle scaled 1.8cm; label(btex $y$ etex,(0,1.2cm)); ...