Advertisement
Guest User

Minimal example for mpgraph - 2

a guest
Sep 2nd, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. \usemodule[graph]
  2.  
  3. \usetypescriptfile[type-auto1]
  4. \usetypescript[auto1]
  5. \setupbodyfont[auto1,ss,12pt]
  6.  
  7. \startMPinitializations
  8. input sarith;
  9. \stopMPinitializations
  10.  
  11. \starttext
  12.  
  13. \startMPcode
  14. draw begingraph(12cm,6cm);
  15. glabel.lft(btex Eje Y etex, OUT);
  16. glabel.bot(btex Eje X etex, OUT);
  17. path p;
  18. gdata("data.d",
  19. m,
  20. augment.p (0,m1);
  21. augment.p (m2,m1);
  22. augment p (m2,m1 Sadd .5);
  23. augment p (0,m1 Sadd .5);
  24. gfill p--cycle withcolor .8white;
  25. glabel.rt(m2, m2, m1 Sadd .25);
  26. glabel.lft(m3, 0, m1 Sadd .25);
  27. );
  28. autogrid(grid.bot,) withcolor .85white;
  29. gfill p--cycle withcolor .95green;
  30. frame withcolor white;
  31. endgraph;
  32. \stopMPcode
  33. What the font!
  34. \stoptext
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement