either scale - or start over; can't figure out either

either scale - or start over; can't figure out either

I am a new AV user. I am using VS2010, Inel Fortran 12.1, and AV 3.3. My code is doing a series of 3D graphs. What I want to do is toss out the first set of graphs and build a new set with each loop. However, avClose doesn't really close. So, as an alternative I rebuild the arrays and avUpdate them. That works, but the scaling from the first graph is retained and the second graph is literally off the page (I can rotate it and see it in the heavens).

1) how can I really close this thing down and start over within my loop?

2) how can I set the scaling to auto so that each time I re-graph it adjusts the scaling prperly?

viewer_var = 0

............

if (viewer_var .eq. 0) then

call avStartWatch(LOC(sig_f), 2, dim2d, AV_REAL4,"sig_f", status)

call avCreateGraph3D("sig_f", "plot:HEIGHTPLOT, xysource:sig_f, colorsource:sig_f", status)

else

call avupdate(LOC(sig_f),status)

call avViewerUpdate(viewerId,status)

endif

!--------

call avNewViewer(viewerId)

viewer_var=viewerId

call avSetViewerPath(viewerId,"graph:/sig_tr", status)

call avVisible(viewerId, AV_TRUE, status)

call avCloseViewer(viewerId, status)

call avEndWatch(LOC(M), status)

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I have not found a way to control scaling. I did figure out how to delete old graphs and data:

!

! remove all graphs and data sets from the viewer

!

data_root = avgetobject ("/")

sig_types = avgraphs (data_root)

n_graphs = avcount (sig_types)

if (.NOT.ALLOCATED(sig_type)) ALLOCATE(sig_type(n_graphs))

do i=1,n_graphs

sig_type(i) = avitem (sig_types,i)

call avGetPropertyString(sig_type(i), "ObjPath", item_name, pstatus)

enddo

do i=1,n_graphs

call avremove (sig_types,sig_type(i),pstatus)

enddo

!------------------------------------------------------------------------------

datasets = avdatasets (data_root)

n_datasets= avcount (datasets)

if (.NOT.ALLOCATED(dataset)) ALLOCATE(dataset(n_datasets))

do i=1,n_datasets

dataset(i) = avitem (datasets,i)

call avGetPropertyString(dataset(i), "ObjPath", item_name, pstatus)

enddo

do i=1,n_datasets

call avremove (datasets,dataset(i),pstatus)

enddo

Login to leave a comment.