Quoted from DanRRight
John,
That was great trick.
And if...if you also find similar simple workaround on how to
- change line thickness
- make the square frame (upper and lower x axis and left and right y axis)
- change the font for axis ticks and labels
then Simpleplot %pl will really get out of grave
Seemingly you cannot do that with %pl but you can use Simpleplot as follow:
program Simpleplot_plots
!requires simpleplot.dll and spwin module
use mswin
use spwin
implicit none
real*4,dimension(70) ::xarr,yarr
integer*4 :: narr,ltype,xscale,yscale
integer*4 :: ctype,i,ans
character(8) :: xlabel='x',ylabel='y'
character(2) :: istr
real*4 :: minx,maxx,miny,maxy,ins
narr=0
do i=1,70
xarr(i)=2*i
yarr(i)=i*i
narr=narr+1
end do
HDC_DIM%iWidth = 800
HDC_DIM%iHeight = 800
HDC_DIM%iBitmapDC = GET_Bitmap_DC@(HDC_DIM%iWidth, HDC_DIM%iHeight)
CALL SP_SupplyBitmap ! Pass Bitmap to SIMPLEPLOT
call picpos(4.0,5.0) ! locate the graph in the page so that everything enters
call textmg(1.5) !size of the text
call axsbtk('XC','I') !ticks inside for x axis
call axsbtk('YC','O') ! ticks outside for y axis
CALL AXLBJS('**', 'Centre') ! labels centred
minx=minval(xarr)
maxx=maxval(xarr)
miny=minval(yarr)
maxy=maxval(yarr)
xscale=1;yscale=1
CALL SCALES(minx,maxx,xscale,miny,maxy,yscale) ! draw scales for main plot
call axcrss('YC',minx)! x-y crossing at xmin
ltype=-1 !line type
ctype=1 !curve type
call chset(-8) ! character set
call cvtype(ctype) ! curve type
call thckmg('LINE',3.0) !thickness of lines
call pen(4) !pen colour
CALL AXES7(xlabel, ylabel) !draw axes with labels
CALL AXLOCN('YCartesian', 'Following') ! locate a new y axis on right
call axlban('yc','O') ! tick labels towards the outside
call axsbtk('yc','O') !ticks outside for y axis on the right
!call axclr('yc',1)! only axis is drawn if you prefer
call axis7('YC',' ') ! draw the new y axis without title
CALL AXLOCN('XCartesian', 'Following') !locate a new x axis on top
call axlban('xc','N') ! no tick labels
call axsbtk('xc','I') ! ticks inside
call axis7('XC',' ') ! no axis label
call thckmg('L',1.0) !line thickness = 1
call pen(2)! colour red
CALL BRKNCV(real(xarr,1),real(yarr,1),narr,ltype)! draw curve
ans=winio@('%ca[A Simple Plot with Simpleplot]%bg[grey]&')
ans=winio@('%dw&',HDC_DIM%iBitmapDC) ! Pass bitmapDC to ClearWin
ans=winio@('%ff%nl%cn%6bt[Close]')
end program simpleplot_plots
Agustin