[NTG-context] Center horizontally and vertically a table with a graphic in a paragraph environment

Fabrice Couvreur fabrice1.couvreur at gmail.com
Fri Jan 9 14:23:11 CET 2015

Is it possible to center horizontally and vertically the table with the
graphics ?
Best regards,




    drawoptions(withpen pencircle scaled 1pt);
    w := 10cm; h := 8cm;
    ahlength := .25cm;
    draw begingraph (w,h)
        numeric xmin, xmax, ymin, ymax;
        xmin := 0; xmax :=100; ymax :=8000 ;ymin:=0;
        for x=xmin step 10 until xmax:
            grid.bot(format("@g",x),x) withcolor \MPcolor{mycolor}
                withpen pencircle scaled .3pt;
        for y=ymin step 1000 until ymax:
            grid.lft(format("@g",y),y) withcolor \MPcolor{mycolor}
                withpen pencircle scaled .3pt;
        glabel.bot(textext("Nombre de chaises"),OUT);
        glabel.lft(textext("Euros") rotated 90,OUT);
        glabel.bot("${\cal C}$",(5,3000));
        glabel.top("${\cal R}$",(15,500));
        save a; numeric a[];
        a0 := 2000 ; a1 := 50 ; a2 := -0.2 ;
        gdraw makefunctionpath(xmin,90,1000,polynomial_function(a,2,x));
        b0 := 0 ; b1 := 80 ;
        gdraw makefunctionpath(xmin,90,1000,polynomial_function(b,1,x));
    endgraph ;
    \bTD Jours \eTD
    \bTD Entrées \eTD
    \bTD 1 \eTD
    \bTD \unknown \eTD
    \bTD 2 \eTD
    \bTD \unknown \eTD
    \bTD 3 \eTD
    \bTD \unknown \eTD
    \bTD 4 \eTD
    \bTD \unknown \eTD
    \bTD 5 \eTD
    \bTD 870 \eTD
    \bTD 6 \eTD
    \bTD 910 \eTD
    \bTD 7 \eTD
    \bTD 1\,000 \eTD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150109/517d5827/attachment.html>

More information about the ntg-context mailing list