%% demi-longueur d'un sous-tiret (en point postscript)
/subticklength 1.25 def
/xsubtick {subticklength xt@ck} def
/ysubtick {subticklength yt@ck} def
/ysubtkstep .5 def
/setysubtkstep {
/ysubtkstep exch def
} def
/xsubtkstep .5 def
/setxsubtkstep {
/xsubtkstep exch def
} def
/setsubtkstep {
setysubtkstep
setxsubtkstep
} def
/xsubticks {
2 dict begin
/n xmax xsubtkstep div truncate cvi
xsubtkstep mul def % subtick max
/i xmin xsubtkstep div truncate cvi
xsubtkstep mul def % le 1er
{
i 0 ne {i xsubtick} if
/i i xsubtkstep add store
i n gt {exit} if
} loop
end
} def
/ysubticks {
2 dict begin
/n ymax ysubtkstep div truncate cvi
ysubtkstep mul def % subtick max
/i ymin ysubtkstep div truncate cvi
ysubtkstep mul def % l 1er
{
i 0 ne {i ysubtick} if
/i i ysubtkstep add store
i n gt {exit} if
} loop
end
} def
/subticks {
xsubticks
ysubticks
} def
|