About ContourZ()

Hello,

So I've got this kinda bizarre problem with ContourZ(). Say when I execute this in the command window:
     ImgXYZ = ContourZ("Graph0","XYZ",0, x, y)
...it works just fine.

But if I put this line in a user defined function, where the source wave XYZ is modified before, the contourZ function just doesn't work. Any idea what's going on?

Many thanks in advance.

Cheers
Update: say we have this functin:

Function DoContourImg()
  Wave ImgXYZ , XYZ
  XYZ = 0
  ImgXYZ =0
  AssignValues2XYZ()
  ImgXYZ = ContourZ("Graph0","XYZ",0, x, y)
End


If execute DoContourImg() in the command line, contourZ doesn't work. But if execute the same function again in the command line, it works...
baroques_solari wrote:
Update: say we have this functin:

Function DoContourImg()
  Wave ImgXYZ , XYZ
  XYZ = 0
  ImgXYZ =0
  AssignValues2XYZ()
  ImgXYZ = ContourZ("Graph0","XYZ",0, x, y)
End


If execute DoContourImg() in the command line, contourZ doesn't work. But if execute the same function again in the command line, it works...


Try calling DoUpdate after your call to AssignValues2XYZ() and before you call ContourZ. Since ContourZ works on graph data, I suspect that the graph itself needs to be updated after you modify the wave (assuming that AssignValues2XYZ() modifies the wave).

Executing the function line by line from the command line would be more or less equivalent to adding a call to DoUpdate.