<div dir="ltr">Hi,<div><br></div><div>I am running a small python code with pvbatch that read a XDMF file and plots contours:</div><div><br></div><div>







<p class=""><span class="">    cf_VP_anim_xmf = XDMFReader( FileName=wdir+</span><span class="">'VPfield_files/XDMF/cf_VP'</span><span class="">+index[i]+</span><span class="">'.xmf'</span><span class=""> )</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    cf_VP_anim_xmf.CellArrays = []</span></p>
<p class=""><span class="">    cf_VP_anim_xmf.Sets = []</span></p>
<p class=""><span class="">    cf_VP_anim_xmf.PointArrays = [</span><span class="">'Cf'</span><span class="">]</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    RenderView1 = GetRenderView()</span></p>
<p class=""><span class="">    a1_Cf_PVLookupTable = GetLookupTableForArray( </span><span class="">"Cf"</span><span class="">, </span><span class="">1</span><span class=""> )</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    Cfcontours = Show()</span></p>
<p class=""><span class="">    Cfcontours.EdgeColor = [</span><span class="">0.0</span><span class="">, </span><span class="">0.0</span><span class="">, </span><span class="">0.50000762951094835</span><span class="">]</span></p>
<p class=""><span class="">    Cfcontours.SelectionPointFieldDataArrayName = </span><span class="">'Cf'</span></p>
<p class=""><span class="">    Cfcontours.ScalarOpacityFunction = []</span></p>
<p class=""><span class="">    Cfcontours.ColorArrayName = </span><span class="">'Cf'</span></p>
<p class=""><span class="">    Cfcontours.ScalarOpacityUnitDistance = </span><span class="">2.4071425938556859</span></p>
<p class=""><span class="">    Cfcontours.LookupTable = a1_Cf_PVLookupTable</span></p>
<p class=""><span class="">    Cfcontours.ScaleFactor = </span><span class="">15.0</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    cf_VP_anim_xmf.Grids = [</span><span class="">'STL Grid'</span><span class="">]</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    RenderView1.CacheKey = </span><span class="">2.0</span></p>
<p class=""><span class="">    RenderView1.CameraClippingRange = [</span><span class="">288.47079837284241</span><span class="">, </span><span class="">299.16435388730815</span><span class="">]</span></p>
<p class=""><span class="">    RenderView1.UseCache = </span><span class="">0</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    a1_Cf_PVLookupTable = GetLookupTableForArray( </span><span class="">"Cf"</span><span class="">, </span><span class="">1</span><span class="">, RGBPoints=[-</span><span class="">0.0001</span><span class="">, </span><span class="">0.0</span><span class="">, </span><span class="">0.0</span><span class="">, </span><span class="">1.0</span><span class="">, </span><span class="">0.0001</span><span class="">, </span><span class="">1.0</span><span class="">, </span><span class="">0.0</span><span class="">, </span><span class="">0.0</span><span class="">], </span><span class="">Lock</span><span class="">ScalarRange=</span><span class="">1</span><span class="">, ColorSpace=</span><span class="">'HSV'</span><span class=""> )</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    separationline = Contour( PointMergeMethod=</span><span class="">"Uniform Binning"</span><span class=""> )</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    separationline.ContourBy = [</span><span class="">'POINTS'</span><span class="">, </span><span class="">'Cf'</span><span class="">]</span></p>
<p class=""><span class="">    separationline.Isosurfaces = [</span><span class="">0.0</span><span class="">]</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    DataSeparationLine = Show()</span></p>
<p class=""><span class="">    DataSeparationLine.ScaleFactor = </span><span class="">12.321390008926393</span></p>
<p class=""><span class="">    DataSeparationLine.SelectionPointFieldDataArrayName = </span><span class="">'Cf'</span></p>
<p class=""><span class="">    DataSeparationLine.EdgeColor = [</span><span class="">0.0</span><span class="">, </span><span class="">0.0</span><span class="">, </span><span class="">0.50000762951094835</span><span class="">]</span></p>
<p class=""><span class="">    DataSeparationLine.LineWidth = </span><span class="">2.0</span></p>
<p class=""><span class="">    DataSeparationLine.DiffuseColor = [</span><span class="">0.0</span><span class="">, </span><span class="">0.0</span><span class="">, </span><span class="">0.0</span><span class="">]</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    DataSeparationLine.ColorArrayName = </span><span class="">''</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    Cfcontours.Visibility = </span><span class="">1</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    </span><span class="">#--- Setup view</span></p>
<p class=""><span class="">    RenderView1 = GetRenderView()</span></p>
<p class=""><span class="">    RenderView1.Background = [</span><span class="">1.0</span><span class="">, </span><span class="">1.0</span><span class="">, </span><span class="">1.0</span><span class="">]</span></p>
<p class=""><span class="">    RenderView1.CenterAxesVisibility = </span><span class="">0</span></p>
<p class=""><span class="">    RenderView1.OrientationAxesVisibility = </span><span class="">0</span></p>
<p class=""><span class="">    RenderView1.ViewSize = [</span><span class="">1450</span><span class="">, </span><span class="">300</span><span class="">]</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    RenderView1.InteractionMode = </span><span class="">'3D'</span></p>
<p class=""><span class="">    RenderView1.CameraClippingRange = [</span><span class="">120.40716073726786</span><span class="">, </span><span class="">126.85668499830999</span><span class="">]</span></p>
<p class=""><span class="">    RenderView1.CameraPosition = [</span><span class="">25.95</span><span class="">, </span><span class="">41.63</span><span class="">, </span><span class="">1.43</span><span class="">]</span></p>
<p class=""><span class="">    RenderView1.CameraFocalPoint = [</span><span class="">4.31</span><span class="">, </span><span class="">5.36</span><span class="">, </span><span class="">4.77</span><span class="">]</span></p>
<p class=""><span class="">    RenderView1.CameraViewUp = [</span><span class="">0.93</span><span class="">, -</span><span class="">0.36</span><span class="">, -</span><span class="">0.053</span><span class="">]</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    </span><span class="">#--- Uncomment for 2D Interaction Mode</span></p>
<p class=""><span class="">    </span><span class="">#RenderView1.CameraParallelScale = 5.5</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    a1_Cf_PVLookupTable = GetLookupTableForArray( </span><span class="">"Cf"</span><span class="">, </span><span class="">1</span><span class="">, RGBPoints=[-</span><span class="">0.0001</span><span class="">, </span><span class="">0.0</span><span class="">, </span><span class="">0.0</span><span class="">, </span><span class="">1.0</span><span class="">, </span><span class="">0.0001</span><span class="">, </span><span class="">1.0</span><span class="">, </span><span class="">0.0</span><span class="">, </span><span class="">0.0</span><span class="">], </span><span class="">Lock</span><span class="">ScalarRange=</span><span class="">1</span><span class=""> )</span></p>
<p class=""><span class=""></span><br></p>
<p class=""><span class="">    </span><span class="">#--- Export image</span></p>
<p class=""><span class="">    Render()</span></p>
<p class=""><span class="">    WriteImage(wdir+</span><span class="">'POSTPRO/IMAGES/cf_view1_'</span><span class="">+index[i]+</span><span class="">'.jpg'</span><span class="">)</span></p></div><div><br></div><div>I set the range of the contours from -0.0001 to 0.0001 but the contours levels revert back to automatic scaling instead of the range that I specify. I am using version 3.98 of Paraview but I also tried with version 4.1.0. Why is this happening? Do I miss something in my script?</div><div><br></div><div>Nikos</div><div><br></div></div>