<div dir="ltr">Superb,<div style>That was it. Thanks, both of you.</div><div style><br></div><div style>But I have another question.</div><div style>The automatic scaling of the vector field works as expected.</div><div style>
The scaling of the temperature however does not(array of floats). It set the range to [0 1], regardless of the actual values.</div><div style><br></div><div style>Paraview(under information) gives the data range = [3.5 1333.5], which is correct. And if I manually set the color range to this, everything is good.</div>
<div style>Pressing the automatic color scale(rescale to data), the used interval is set back to [0 1].</div><div style>Why is that?</div><div style><br></div><div style>I use to code suggested by Joe,</div><div style><div>
vtkFloatArray* temperature = vtkFloatArray::New();</div><div> temperature->SetName("Temperature");</div><div> temperature->SetNumberOfComponents(1);</div><div> temperature->SetNumberOfValues(mesh.nn);</div>
<div> for(int i=0;i<mesh.nn;i++){</div><div> temperature->SetValue(i,3.5);</div><div> }</div><div> rgrid->GetPointData()->AddArray(temperature);</div></div><div style><br></div><div style>And is it possible to update the plot if I overwrite the .vtr file, without closing and reopening the file?</div>
<div style><br></div><div style>Paw</div></div>