%dw can be resized as stated in the Help file, but it needs a call-back function....here is the new code for my old plot....remember that you need the spwin module that I did not put here this time...
module funciones
contains
integer function bitmap()
use spwin
use mswin
integer x,y,resize,bitmapdc
real*4,dimension(100) ::xarr,yarr
integer*4 :: narr,ltype,xscale,yscale,ctype,i,ans
character(8) :: xlabel='x',ylabel='y',ptype
real*4 :: minx,maxx,miny,maxy
resize=clearwin_info@('GRAPHICS_RESIZING')
IF(resize.EQ.1)THEN
x=clearwin_info@('GRAPHICS_WIDTH')
y=clearwin_info@('GRAPHICS_DEPTH')
HDC_DIM%iWidth = x
HDC_DIM%iHeight = y
HDC_DIM%iBitmapDC=clearwin_info@('GRAPHICS_DC')
CALL SP_SupplyBitmap ! Pass Bitmap to SIMPLEPLOT
narr=0
do i=1,100
xarr(i)=2*i
yarr(i)=i*i
narr=narr+1
end do
minx=minval(xarr)
maxx=maxval(xarr)
miny=minval(yarr)
maxy=maxval(yarr)
xscale=1;yscale=1
call initsp
call pgfull(.true.)
!scale factor for text in graph
call textmg(1.5)
!characters set
call chset(0)
!direction of ticks: in, out
call axsbtk('XC','I')
call axsbtk('YC','O')
!line thickness
call thckmg('L',2.0)
!location of labels in the axes
CALL AXLBJS('**', 'Centre')
minx=minval(xarr)
maxx=maxval(xarr)
miny=minval(yarr)
maxy=maxval(yarr)
!define the graph scales: max and min values of x and y and the type of scales: 1-linear, 2-log
xscale=1;yscale=1
CALL SCALES(minx,maxx,xscale,miny,maxy,yscale)
!pen color 1...for axes
call pen(4)
!cross point of x and y
call axcrss('YC',minx)
! labels of axes
CALL AXES7(xlabel, ylabel)
!pen color for data
call pen(2)
!full line or dashed?
!ltype=0, full line,ltype=1, dashed
ltype=0
ptype='scatter'
ptype='curve'
if(ptype=='curve') then
!cvtype=1 -> smooth
!cvtype=3 -> straight lines
ctype=3
call cvtype(ctype)
CALL BRKNCV(real(xarr,1),real(yarr,1),narr,ltype)
else !scatter
CALL MKSET(1) !set of markers 1,2,3......
CALL MARKCV(real(xarr,1),real(yarr,1),narr,mtype,nstep)
endif
endif
bitmap=2
end function bitmap
end module funciones
program Resized_Simpleplot_plots
!requires simpleplot.dll
use mswin
use spwin
use funciones
implicit none
integer*4 ans
external bitmap
ans=winio@('%ca[A Simple Plot with Simpleplot]%bg[grey]&')
ans=winio@('%ww%pv%^dw[user_resize]&',800,600,bitmap) ! Pass bitmapDC to ClearWin
ans=winio@('%ff%nl%cn%6bt[Close]')
end program resized_simpleplot_plots
Hope this helps....
best regards,
Agustin