/xmkstep 1 def % les marques sur Ox
/xmarkstyle {dctext} def
/ymarkstyle {(-1 0) bltext} def
/setxmkstep {
/xmkstep exch def
} def
/xmark {
dup xtick
/Courier findfont .8 fontsize mul scalefont setfont
dup dup truncate eq {
cvi dup chaine cvs exch
} {
dup chaine cvs exch
} ifelse
Oy xmarkstyle
} def
/xmarks {
2 dict begin
/n xmax xmax xmin sub 1000 div sub xmkstep div truncate cvi
xmkstep mul def % mark max
/i xmin xmkstep div truncate cvi
xmkstep mul def % la 1ere
i xmin lt {/i i xmkstep add store} if
{
i 0 ne {i xmark} if
/i i xmkstep abs add store
i n gt {exit} if
} loop
end
} def
/ymkstep 1 def % les marques sur Oy
/setymkstep {
/ymkstep exch def
} def
/ymark {
dup ytick
/Courier findfont .8 fontsize mul scalefont setfont
dup chaine cvs exch
Ox exch ymarkstyle
} def
/ymarks {
2 dict begin
/n ymax ymax ymin sub 1000 div sub ymkstep div truncate cvi
ymkstep mul def % mark max
/i ymin ymkstep div truncate cvi
ymkstep mul def % la 1ere
{
i 0 ne {i ymark} if
/i i ymkstep abs add store
i n gt {exit} if
} loop
end
} def
/setmkstep {
setymkstep
setxmkstep
} def
/marks {
xmarks
ymarks
} def
|