I don't think:
is what you want. The index for testA should be an integer between 0 and 2000. Instead:
looks to be what you trying to do, i.e. initializing testA to contain the sqrts of values between 0.0 and 0.1. But as you noted, when you display the array in the Array Viewer you see an xrange of 0 to 2000. That's because the default behaviour is to display the array indices along the x-axis. To display different x-axis labels you need to create an additional array containing the x values and then call favSetDimScale.
The code would look like this:
Subroutine viewary( ) use AVDef use AVVieweruse DFLib
real(8), allocatable :: testA(:)real(8), allocatable :: xscale(:)!DEC$ATTRIBUTES array_visualizer :: testAreal(8) xmax, x
integer istatus, ihvallocate (testA(0:2000))allocate (xscale(0:2000))
xmax=0.1 DO i=0, 2000x=xmax*i/2000.0100 testA(i)=dsqrt(x)xscale(i) = x
call faglStartWatch(testA, istatus)call faglStartWatch(xscale, istatus)call FavStartViewer(ihv, istatus)call favSetArray(ihv, testA, istatus)call favSetDimScale(ihv, 1, xscale, istatus)call favShowWindow(ihv, AV_TRUE, istatus)call faglSaveAsFile(testA, "testA.agl", istatus)call favEndViewer(ihv, istatus)call faglEndWatch(testA, istatus)
deallocate(testA) deallocate(xscale)END Subroutine viewary
Thank you for your consideration.
I have tried it again as what you suggested but there was still no change. It seems a big trouble.
Can you give me some resource about CVF?
I'm not sure what the problem could be. I'll attach the source for the program I ran and a screen shot. Is this not what you are looking for?
Johnreadey, Yes, I have done as what you suggested under Win32 API enviroment. I used a dialog to replace the keyboard response in your program. I also found that if I only utilized the line: call fagSaveasFile(...), what I had saved in the file was not what I needed X_scale_modified figure but the original form. So, I saved the figure directly in the array viewer as another file then everything was OK.
But another problem is coming: how can I realize the logarithm scale(uneven intervals) on X axis?
Thank you! wen
Yes, that looks like a bug. At least saving from the Array Viewer works ok.
Logarithmic scales aren't supported in the Compaq Array Visualizer, but they are in the new Intel Array Visualizer that ships with Intel Fortran v7.0. There's a free trial download if you want to try it out.
Can you tell me the website?
30-Day Trial of Intel Fortran for Windows (includes Array Visualizer). Be aware that it looks quite different from the one in CVF.