KTUGFaq

KTUG FAQ

·Î±×ÀÎ:
ºñ¹Ð¹øÈ£:
°¡ÀÔ
Expect a letter from a friend who will ask a favor of you.
FrontPageKarnes/2009-07 › MetaPost/Graph
verbatimtex
%&latex
\documentclass{article}
\usepackage{dhucs}
\begin{document}
etex;

input graph;

civilgdp-0.jpg
beginfig(0);
    draw begingraph(12cm,8cm);
        gdraw "clitig.txt" ;
    endgraph;
endfig;

civilgdp-1.jpg
beginfig(1);
    draw begingraph(12cm,8cm);
        gdraw "clitig.txt" ;
        gdotlabel.lft(btex IMF $\rightarrow$ etex, 45);
    endgraph;
endfig;

civilgdp-2.jpg
beginfig(2);
    draw begingraph(12cm,8cm);
        gdraw "clitig.txt"  withpen pencircle scaled 1.5pt;
        glabel.ulft(btex ¹Î»ç¼Ò¼Û etex, 43);
        glabel.bot(btex ¿¬µµ etex, OUT);
        glabel.lft(btex »ç°Ç¼ö etex rotated 90 ,OUT);
    endgraph;
endfig;

civilgdp-3.jpg
beginfig(3);
    draw begingraph(12cm,8cm);
        gdraw "clitig.txt" withpen pencircle scaled 1.5pt;
        glabel.ulft(btex ¹Î»ç¼Ò¼Û etex, 43);
        gdraw "rgdp.txt" ;
        glabel.lrt(btex GDP etex, 45);
        glabel.bot(btex ¿¬µµ etex, OUT);
        glabel.lft(btex »ç°Ç¼ö/½Ê¾ï¿ø etex rotated 90 ,OUT);
    endgraph;
endfig;

civilgdp-4.jpg
beginfig(4);
    draw begingraph(12cm,8cm);
        gdraw "clitig.txt" withpen pencircle scaled 1.5pt;
        glabel.lrt(btex ¹Î»ç¼Ò¼Û etex, 43);
        autogrid(,otick.lft);
        setcoords(linear,linear);
        gdraw "rgdp.txt" ;
        glabel.ulft(btex GDP etex, 40);
        autogrid(otick.bot,otick.rt);
        glabel.bot(btex ¿¬µµ etex, OUT);
        glabel.lft(btex ¹Î»ç¼Ò¼Û(°Ç¼ö) etex rotated 90 ,OUT);
        glabel.rt(btex ½ÇÁúGDP(½Ê¾ï¿ø) etex rotated -90 ,OUT);
    endgraph;
endfig;

civilgdp-5.jpg
input sarith;

beginfig(5);
    draw begingraph(12cm,8cm);
        path p[];
        gdata("clitig.txt",$,
            if scantokens $1 >=1980: augment.p0($1,$2 Sdiv 1000); fi);
        gdata("rgdp.txt",$,
            if scantokens $1 >=1980: augment.p1($1,$2 Sdiv 1000); fi);
        gdraw p0 withpen pencircle scaled 1.5pt;
        glabel.lrt(btex ¹Î»ç¼Ò¼Û etex, 13);
        autogrid(,otick.lft);
        setcoords(linear,linear);
        gdraw p1 ;
        glabel.ulft(btex GDP etex, 15);
        autogrid(,otick.rt);
        for u=auto.x: otick.bot(format("%f",u),u); endfor;
        glabel.bot(btex ¿¬µµ etex, OUT);
        glabel.lft(btex ¹Î»ç¼Ò¼Û(õ°Ç) etex rotated 90 ,OUT);
        glabel.rt(btex ½ÇÁúGDP(Á¶¿ø) etex rotated -90 ,OUT);
    endgraph;
endfig;

civilgdp-6.jpg
beginfig(6);
    draw begingraph(12cm,8cm);
        path p[];
        gdata("clitig.txt",$,
            if scantokens $1 >=1980: augment.p0($1,$2 Sdiv 1000); fi);
        gdata("rgdp.txt",$,
            if scantokens $1 >=1980: augment.p1($1,$2 Sdiv 1000); fi);
        gdraw p0 withpen pencircle scaled 1.5pt;
        glabel.lrt(btex ¹Î»ç¼Ò¼Û etex, 13);
        for u=auto.y: otick.lft(format("%g",u Smul 1000),u); endfor;
        setcoords(linear,linear);
        gdraw p1 ;
        glabel.ulft(btex GDP etex, 15);
        for u=auto.y: otick.rt(format("%g",u Smul 1000),u); endfor;
        for u=auto.x: otick.bot(format("%f",u),u); endfor;
        glabel.bot(btex ¿¬µµ etex, OUT);
        glabel.lft(btex ¹Î»ç¼Ò¼Û(°Ç¼ö) etex rotated 90 ,OUT);
        glabel.rt(btex ½ÇÁúGDP(½Ê¾ï¿ø) etex rotated -90 ,OUT);
    endgraph;
endfig;

end;


^
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-06-16 22:05:51
Processing time 0.0303 sec