[metapost] gdraw and negative numbers
Jørgen Larsen
jl at ruc.dk
Mon Aug 22 15:39:25 CEST 2005
With MetaPost 0.901 the gdraw command (from the graph package) seems to
have a problem with negative numbers in axis labels: the minus sign is
placed far too low.
(I have tried the MP that comes with teTeX 3.0 and the MP that comes
with XemTeX, and they both give the same (wrong) result.)
Here is a very minimal example:
prologues:=2;
input graph;
beginfig(1)
draw begingraph(2cm,2cm);
gdraw (-1,-1);
endgraph;
endfig
end.
and the resulting eps-file is
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: -25 -26 59 59
%%HiResBoundingBox: -24.73004 -25.06209 58.9429 58.9429
%%Creator: MetaPost 0.901
%%CreationDate: 2005.08.22:1519
%%Pages: 1
%%DocumentFonts: CMSY10 CMR10
%%BeginProlog
/cmsy10 /CMSY10 def
/cmr10 /CMR10 def
/fshow {exch findfont exch scalefont setfont show}bind def
%%EndProlog
%%Page: 1 1
0 0.5 dtransform truncate idtransform setlinewidth pop [] 0 setdash
1 setlinecap 1 setlinejoin 10 setmiterlimit
newpath 28.34645 28.34645 moveto 0 0 rlineto stroke
0.5 0 dtransform exch truncate exch idtransform pop setlinewidth
newpath 28.34645 -7 moveto
28.34645 0 lineto stroke
21.98143 -22.23186 moveto
(\000) cmsy10 9.96265 fshow
29.73013 -16.42036 moveto
(1) cmr10 9.96265 fshow
0 0.5 dtransform truncate idtransform setlinewidth pop
newpath -7 28.34645 moveto
0 28.34645 lineto stroke
-22.73004 22.64561 moveto
(\000) cmsy10 9.96265 fshow
-14.98134 28.4571 moveto
(1) cmr10 9.96265 fshow
newpath 0 0 moveto
56.6929 0 lineto
56.6929 56.6929 lineto
0 56.6929 lineto
closepath stroke
showpage
%%EOF
--
Jørgen
More information about the metapost
mailing list