plotframe - plot a frame with scaling and grids
: vector [wantgrids,findbounds] where wantgrids is a boolean variable ( %t or %f ) which indicates gridding. findbounds is a boolean variable. If findbounds is %t , the bounds given in rect are allowed to be slightly modified (in fact always increased) in order to have simpler graduations: then tics(2) and tics(4) are ignored.
plotframe is used with 2D plotting functions plot2d , plot2d1 ,... to set a graphics frame. It must be used before plot2d which should be invoked with the "000" superposition mode.
x=[-0.3:0.8:27.3]';
y=rand(x);
rect=[min(x),min(y),max(x),max(y)];
tics=[4,10,2,5]; //4 x-intervals and 2 y-intervals
plotframe(rect,tics,[%f,%f],["My plot","x","y"],[0,0,0.5,0.5])
plot2d(x,y,2,"000")
plotframe(rect,tics,[%t,%f],["My plot with grids","x","y"],[0.5,0,0.5,0.5])
plot2d(x,y,3,"000")
plotframe(rect,tics,[%t,%t],..
["My plot with grids and automatic bounds","x","y"],[0,0.5,0.5,0.5])
plot2d(x,y,4,"000")
plotframe(rect,tics,[%f,%t],..
["My plot without grids but with automatic bounds","x","y"],..
[0.5,0.5,0.5,0.5])
plot2d(x,y,5,"000")
xset("default")