<div dir="ltr"><div><div>Hi Kay,<br><br></div>I've looked carefully at the computed colors in your colormaps, and I agree its perplexing as to the resultant colors in the maps and the labelbar in the unpaneled case. certainly perplexed as to the resultant colors. We have a known issue with RasterFill and RGBa colors -- it manifests rather differently, but I'm wondering if your case is related.<br><br></div>How much trouble would it be for you to provide your scripts and data for us to take a deeper look at the issue? If the data are to large to email, they can be posted to an FTP site: <br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 10, 2015 at 5:19 PM, Kay Shelton <span dir="ltr"><<a href="mailto:kay.shelton@gmail.com" target="_blank">kay.shelton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Rick,<div><br></div><div>Thanks for the response. I had followed that example to make one of my plots, but for the others I wanted to avoid needing to know the contouring values and number of required colours. </div><div><br></div><div>For the first plot (following example 18), I have:</div><div><br></div><div><div> opacity_val = 0.5</div><div><br></div><div> colour_map0 = "BlueYellowRed"<br></div><div> cmap0 = read_colormap_file(colour_map0)</div><div> colours0 = (array_append_record(2,floattoint(fspan(255.,129.,4)),0))<br></div><div> colours1 = (array_append_record(colours0,floattoint(fspan(128.,2.,6)),0))</div><div> colours = (array_append_record(colours1,255,0))</div><div> colour_levels = cmap0(colours-2,:)</div><div> colour_levels(:,3) = opacity_val </div><div><br></div><div><div> resFa0@cnFillOn = True</div><div> resFa0@cnFillMode = "RasterFill"</div><div> resFa0@cnRasterSmoothingOn = True</div><div> resFa0@cnLevelSelectionMode = "ExplicitLevels"</div><div> resFa0@cnFillColors = colour_levels</div><div> resFa0@cnLevels = (fspan(0.,100.,11))</div></div><div><br></div><div>For the second plot I have:<br></div></div><div><br></div><div><div> colour_map1 = "WhiteBlueGreenYellowRed"</div><div> cmap1 = read_colormap_file(colour_map1)</div><div> cmap1(:,3) = opacity_val</div></div><div><br></div><div> resFa1@cnFillOn = True<br></div><div><div> resFa1@cnFillMode = "RasterFill"</div><div> resFa1@cnRasterSmoothingOn = True</div><div> resFa1@cnLevelSelectionMode = "ManualLevels"</div><div> resFa1@cnMinLevelValF = 0.5</div><div> resFa1@cnMaxLevelValF = 10.</div><div> resFa1@cnLevelSpacingF = 0.5</div><div> resFa1@cnFillPalette = cmap1<br></div><div> resFa1@cnSpanFillPalette = True</div><div><br></div><div>Both methods seem to have the same results with the hideous colours (note the actual colours that result vary depending on the opacity_val I set), when panelled the label bar colours are correct.</div><div>(Also note, cnRasterSmoothingOn = True seems to be entirely ignored, turning it on and off make no difference to the plot. Separate issue, but odd.)</div><div><br></div><div>A pdf showing the resulting plots can be found here: <a href="https://drive.google.com/file/d/0B6ntGQfT_YcxZGdFMEhGUEx6aTQ/view?usp=sharing" target="_blank">https://drive.google.com/file/d/0B6ntGQfT_YcxZGdFMEhGUEx6aTQ/view?usp=sharing</a></div><div><br></div><div>If I set cnFillMode to "AreaFill", I get exactly what I want, except it takes a fair while to plot. For the moment, I can apply smoothing to the fields to make them plot quicker, but for publication, I would prefer not to have to do that, so I'd rather use a raster plot.</div><div><br></div><div>I am a little stumped by this.</div><div><br></div><div>Any help would be greatly appreciated.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Kay</div><div><br></div></font></span></div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 10 March 2015 at 03:28, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Kay,<br><br></div>I'm not totally sure I understand what you are after, but does RGBa example #18 address your issue?<br><br><a href="http://ncl.ucar.edu/Applications/rgbacolor.shtml" target="_blank">http://ncl.ucar.edu/Applications/rgbacolor.shtml</a><br><br></div>It tested it with RasterFill and it behaves as expected with regard to the opacities of the labelbar.<br><br></div>Hope that helps..<br></div>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Sun, Mar 8, 2015 at 8:24 PM, Kay Shelton <span dir="ltr"><<a href="mailto:kay.shelton@gmail.com" target="_blank">kay.shelton@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hello NCLers,<div><br></div><div>(I am running 6.2.0 and 6.2.1)<br><div><br></div><div>Should I be able to make a contour plot using RasterFill and setting cnFillPalette to a colour map with alpha values <1?</div><div><br></div><div>I am trying to do this because I need to use RasterFill as I have high resolution global data that takes an age to plot as an AreaFill contour plot, but I want the opacity level reflected in the colour bar. The alternative is to set cnFillOpacityF, however then the plot colours do not match the label bar very well.</div></div><div><br></div><div>My current result when using RasterFill and the colour map with edited alpha values is hideously coloured plots, but with required opacity level. For plots that are not panelled the label bar matches the plot, but is in hideous colours, for panelled plots the plots are hideous but the label bar is correct.</div><div><br></div><div>Is what I am trying to achieve even possible?</div><div><br></div><div>Thanks,</div><div>Kay</div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>