[Paraview] python script how to change Data Range

小縣信也 so0208jp at gmail.com
Wed Jan 19 07:48:44 EST 2011


Utkarsh

Thank you for quick reply.
i succeeded to change the color bar.
Your advice was very helpful for me.

Regards,
Shinya





2011/1/18 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>:
> The arguments to GetLookupTableForArray() are only the default values,
> when a new lookuptable is created. If one exists, then they don't make
> any changes.
> Change the RGBPoints explicitly as follows:
>
> 1_p_PVLookupTable.RGBPoints = [....]
>
> Utkarsh
>
> 2011/1/18 小縣信也 <so0208jp at gmail.com>:
>> Hi paraviewers!
>>
>> I tried to change Data Range of color bar by paraview python script.
>> But It didn't work.
>> Does someone know the reasson?
>> Is there another way to change Data Range in script?
>>
>> Kind Regards,
>> Shinya
>>
>> ---------------------code which I rtied----------------------------------
>>
>> ScalarBarWidgetRepresentation2 = CreateScalarBar( Title='p',
>> Position2=[0.13, 0.5], Enabled=1, LabelFontSize=12, LabelColor=[0.47,
>> 0.47, 0.47], TitleFontSize=12, TitleColor=[0.47, 0.47, 0.47],
>> Position=[0.87, 0.25] )
>>
>> 1_p_PVLookupTable = GetLookupTableForArray( "p", 1, RGBPoints=[0.0,
>> 0.0, 0.0, 1.0, 0.5, 1.0, 0.0, 0.0], ScalarRangeInitialized=1.0 )
>> ScalarBarWidgetRepresentation2.LookupTable = a1_p_PVLookupTable
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>


More information about the ParaView mailing list