7
votes
3answers
170 views

MetaPost: How to fill cycle path with slanted lines?

Suppose I have build a cycle path with bulidcycle: path pa[]; pa.0:=(-6u,0){dir 90} .. (0,8u){dir 0}; pa.01:=pa.0 reflectedabout(origin, (0,1)); pa.1:=(-6u,0){dir -90} .. (0,-3u){dir 0}; pa.11:=pa.1 ...
3
votes
1answer
57 views

Increase image resolution using MetaUML and metapost

I'm using MetaUML to create text-driven UML diagrams. When I generate a figure, with: $ mpost example.mp $ convert ps:example.1 png:example.png a very low-resolution image is generated. If I scale ...
6
votes
2answers
138 views

Using negative coordinates in EPS file with XeLaTeX

I've run into inconsistent behavior with XeLaTeX and EPS files with negative coordinates. The wrapping block for the figure is calculated correctly; however, the content of the figure is misplaced ...
3
votes
1answer
95 views

Using Metapost inline in LaTeX (no ConTeXt)

When I was more active in LaTeX and Metapost (~10 years ago) I could not find a way to directly use Metapost in LaTeX. There were few tutorials on how to use it within ConTeXt, but for using it with ...
0
votes
0answers
71 views

click button and next picture will be shown

I would like to create presentation and export to GIF, for example. I have three files: obr1.mp, obr2.mp, and obr3.mp (which is my pictures drawn). I want have .tex file, where I could press space ...
5
votes
2answers
200 views

graph of function with metapost

I have to create graph of function 3x^4 − 11x^3 + 12x^2 − 4x + 1 ; interval <0,1;1> . I have just func.mp input gjktc.mp; u:=1mm; path p[]; beginfig(1); draw (0,0)--(10u,10u); draw ...
6
votes
1answer
182 views

Full colored Triangle and Circle in Metapost

The question may be trivial, but I need your help, to draw a full colored triangle and circle (where the triangle will be inside the circle). Here is my file pic_1.mp: input gjktc.mp; u:=1mm; ...
6
votes
1answer
163 views

MetaPost: Non-uniform periodic tessellations

Overview Looking to create backgrounds that have regular polygons aligned to a grid. Problem The space between the polygons varies, even though the radius for the polygons has been calculated in ...
9
votes
1answer
237 views

What programmable drawing tool(s) can solve how to fill a region with a path

I've recently become interested in computer numerical control (CNC), and have been considering using METAPOST in a CNC work-flow (using pstoedit to convert .pdf (or .mp) files to G-Code). The extant ...
2
votes
1answer
242 views

Metapost External Figure

I have a metapost file image.mp containing the following lines: beginfig(0); draw p0; externalfigure "/Users/dsg/tex/images/image.png" xyscaled r0 shifted r1; endfig; When I run mptopdf scene.mp ...
3
votes
1answer
108 views

Problem with package gmp (or with xkeyval?)

I use the "gmp" package which allows to insert MetaPost coding (placed inside an mpost or mpost* environment) in a LaTeX source file. In few words, it does approximately the same job as other packages ...
69
votes
3answers
3k views

Fundamental differences : PSTricks, TikZ/PGF and others

OK, since this is a pretty vague and subjective question. I need to set up some borders around the discussion that I intend to benefit from. But before anything, I certainly do NOT want to excite the ...
3
votes
1answer
436 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 ...
4
votes
0answers
544 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 ...
3
votes
1answer
361 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 ...
5
votes
2answers
607 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 ...
2
votes
1answer
460 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 ...
10
votes
1answer
1k 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 ...
36
votes
8answers
5k 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 ...
4
votes
2answers
2k 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)); ...