<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>With a lot of help from Utkarsh, I now know how to set custom color maps in Python. Here is what I did, and the code, for coloring Sources/ Wavelet by the blue to red rainbow. (And has been said, blue to red rainbow is a poor color map for doing real
work. It does create pretty pictures, however.)</div>
<div> </div>
<div>ParaView 4.3.1, local server, Linux.</div>
<div>Sources/ wavelet/ apply. Change outline to surface. Paint by RTData.</div>
<div>Color editor. Preset – Blue to Red Rainbow. Export. Save this as an xml file somewhere you can find it.</div>
<div>Edit this .xml file. There will be two ColorMaps (unless this has been fixed). Delete the second group (from ColorMap to /ColorMap). Also, delete the two lines with ColorMaps in them.</div>
<div>(Note – I will write up bugs for these two issues.)</div>
<div> </div>
<div>Edit/ reset session.</div>
<div>Tools/ Start Trace. OK.</div>
<div>Sources/ Wavelet. Apply. Change outline to surface. Paint by RTData.</div>
<div>Tools/ Stop Trace. </div>
<div> </div>
<div>Save the script.</div>
<div> </div>
<div>Edit the script. Below the line where it says wavelet1Display.SetScalarBarVisibility(renderView1, True), add the following: </div>
<div> </div>
<div>lut = GetColorTransferFunction("RTData")</div>
<div>with open("/..../junkDir/blue-to-red-rainbow.xml", "r") as f:</div>
<div> data = f.read()</div>
<div> lut.ApplyColorMap(data)</div>
<div> </div>
<div> </div>
<div> </div>
<div>Then, comment out the two lines that say:</div>
<div># get color transfer function/color map for 'RTData'</div>
<div>rTDataLUT = GetColorTransferFunction('RTData')</div>
<div> </div>
<div># get opacity transfer function/opacity map for 'RTData'</div>
<div>rTDataPWF = GetOpacityTransferFunction('RTData')</div>
<div> </div>
<div> </div>
<div> </div>
<div>Save your file, then in ParaView do the following:</div>
<div>Edit/ reset session.</div>
<div>Tools/ Python shell. Run script. </div>
<div> </div>
<div>Alan</div>
<div> </div>
<div> </div>
<div> </div>
</span></font>
</body>
</html>