ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A question on drawing functions in MetaFun
@ 2005-08-10 13:55 Jin-Hwan Cho
  2005-08-10 23:26 ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Jin-Hwan Cho @ 2005-08-10 13:55 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

I tried to generate "Figure 9.2 An example of a graphic with labels
along the axes." in metafun-p.pdf (p.209), but could get only graphics
without labels.

I used the codes in the page 208 as follows (see the attached file)

\startMPpage
StartPage ;
... codes in p.208 here ...
StopPage ;
\stopMPpage

In this case, the generated MPS file (ch93-1-mpgraph.1) had the bounding
box (0, 0, 420, 596).

When I used \startuseMPgraphic instead of \startMPpage, the generated
MPS file had the different bounding box (-47, -17, 300, 575), and I
could see the right one.

Please tell me what I missed.

Best, ChoF.
~~~~~~~~~~~~~~~~~~~~~~~~~   ***
| Cho, Jin-Hwan == ChoF |   ^ ^
~~~~~~~~~~~~~~~~~~~~~~~~~~~  o
| Dept. of Mathematics    | ---
| The University of Suwon |  |
~~~~~~~~~~~~~~~~~~~~~~~~~~~  |
| Korean TeX Users Group  |  |
| http://www.ktug.or.kr   |  |
~~~~~~~~~~~~~~~~~~~~~~~~~~~  |
| chofchof@ktug.or.kr |     ***
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


[-- Attachment #2: ch93-1.tex --]
[-- Type: application/octet-stream, Size: 1202 bytes --]

% Chapter 9. Functions
%
% 9.3 Drawing functions
\setupcolors [state=start]

\starttext

  % If \startMPpage is used, the generating mps graphic does not have
  % accurate bounding box. Why?

  %\startuseMPgraphic{function demo}
  \startMPpage 
    StartPage ; 
      drawoptions(withpen pencircle scaled .25pt withcolor .5white) ; 

      draw hlingrid (0, 20, .2, 20cm, 10cm) ; 
      draw vloggrid (0, 10, .5, 10cm, 20cm) ; 

      drawoptions(withpen pencircle scaled .50pt) ; 

      draw hlingrid (0, 20, 1, 20cm, 10cm) ; 
      draw vloggrid (0, 10, 1, 10cm, 20cm) ; 

      fmt_pictures := false ;     % use the TeX as formatting engine 
      textextoffset := ExHeight ; % a variable set by ConTeXt 

      draw hlintext.lft(0, 20, 5, 20cm, "@3e") ; 
      draw vlogtext.bot(0, 10, 9, 10cm, "@3e") ; 

      draw 
        function(1,"log(x)","x",1,10,1) xyscaled (10cm,2cm) 
        withpen pencircle scaled 5mm withcolor transparent(1,.5,yellow) ; 
      draw 
        function(2,".5log(x)","x",1,10,1) xyscaled (10cm,2cm) 
        withpen pencircle scaled 5mm withcolor transparent(1,.5,blue) ; 
    StopPage ; 
  \stopMPpage 
  %\stopuseMPgraphic

  \useMPgraphic{function demo}

\stoptext

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-08-15 11:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-10 13:55 A question on drawing functions in MetaFun Jin-Hwan Cho
2005-08-10 23:26 ` Hans Hagen
2005-08-12  8:42   ` Jin-Hwan Cho
2005-08-12 10:15     ` Vit Zyka
2005-08-12 15:06       ` Jin-Hwan Cho
2005-08-12 16:10         ` Hans Hagen
2005-08-12 17:14           ` Jin-Hwan Cho
2005-08-12 22:00             ` Vit Zyka
2005-08-12 22:33               ` Hans Hagen
2005-08-15 11:56             ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).