[ncl-talk] two color bars, different color tables

Matt Flournoy mflournoy37 at gmail.com
Tue Jun 20 12:15:21 MDT 2017


Sure! I did away with the second workstation (xwks2), and read in the
second color table using read_colormap_file. Now, before I add the second
label bar, I have:

cmap2 = read_colormap_file("BlAqGrYeOrReVi200")

And then set "res_lb at lbFillColors = cmap2". Beforehand, my script had the
equivalent of "res_lb at lbFillColors = "BlAqGrYeOrReVi200", so it didn't know
how to convert that string to a color table.

-Matt

On Tue, Jun 20, 2017 at 1:09 PM, Barry Lynn <barry.h.lynn at gmail.com> wrote:

> You're welcome.
>
> Could we trouble you to tell us the answer you found?
>
> Thanks
>
> On Tue, Jun 20, 2017 at 9:05 PM, Matt Flournoy <mflournoy37 at gmail.com>
> wrote:
>
>> Hi Barry,
>>
>> Yes, my original problem was that I couldn't see the color bar associated
>> with the trajectories. But... a coworker and I just figured it out! Thanks
>> for your quick response.
>>
>> Best,
>> Matt
>>
>> On Tue, Jun 20, 2017 at 1:03 PM, Barry Lynn <barry.h.lynn at gmail.com>
>> wrote:
>>
>>> Hi:
>>>
>>> Do you mean that you can't see the second color bar?
>>>
>>> I ask because I can see the trajectories.
>>>
>>> Barry
>>>
>>> On Tue, Jun 20, 2017 at 8:34 PM, Matt Flournoy <mflournoy37 at gmail.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm trying to plot some WRF output with surface reflectivity shading
>>>> overlaid with parcel trajectories. I'd like the reflectivity to be shaded
>>>> in a grayscale, and the parcel trajectories to be colored according to
>>>> their height. I currently have a color bar for the shaded reflectivity, but
>>>> am having trouble getting a second color bar to show the parcel heights. I
>>>> think my issue might come from my use of a different color table for the
>>>> trajectories than for the reflectivity, which is what I defined my
>>>> workstation colormap with (MPL_Greys).
>>>>
>>>> I've attached the script I'm currently using and the resulting plot.
>>>> I'm trying to get the height color bar (using BlAqGrYeOrReVi200) on the
>>>> right side of the plot. When I run the script as is, I get this message in
>>>> between my "error1" and "error2" print lines:
>>>>
>>>> fatal:CvtStringGenArrayToColorIndexGenArray: Unable to convert string
>>>> "BlAqGrYeOrReVi200" to requested type
>>>>
>>>> warning:Error retrieving resource lbFillColors from args - Ignoring Arg
>>>> If you remove the semicolon before the "frame(xwks2)" line, the plot
>>>> will show the parcel height color bar (without the labels working...), but
>>>> not the rest of the plot.
>>>>
>>>> Any help would be greatly appreciated!
>>>>
>>>> Thank you,
>>>> Matt
>>>>
>>>> --
>>>> Matthew Flournoy
>>>> M.S. Meteorology Candidate, University of Oklahoma
>>>> B.S. Meteorology, Penn State University[image: Inline image 1]
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>>
>>>
>>> --
>>> Barry H. Lynn, Ph.D
>>> Senior Lecturer,
>>> The Institute of the Earth Science,
>>> The Hebrew University of Jerusalem,
>>> Givat Ram, Jerusalem 91904, Israel
>>> Tel: 972 547 231 170
>>> Fax: (972)-25662581
>>>
>>> C.E.O, Weather It Is, LTD
>>> Weather and Climate Focus
>>> http://weather-it-is.com
>>> Jerusalem, Israel
>>> Local: 02 930 9525
>>> Cell: 054 7 231 170
>>> Int-IS: x972 2 930 9525
>>> US 914 432 3108 <(914)%20432-3108>
>>>
>>
>>
>>
>> --
>> Matthew Flournoy
>> M.S. Meteorology Candidate, University of Oklahoma
>> B.S. Meteorology, Penn State University
>>
>
>
>
> --
> Barry H. Lynn, Ph.D
> Senior Lecturer,
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
> US 914 432 3108 <(914)%20432-3108>
>



-- 
Matthew Flournoy
M.S. Meteorology Candidate, University of Oklahoma
B.S. Meteorology, Penn State University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170620/e57c2c6f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: traj_refl_back.png
Type: image/png
Size: 51707 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170620/e57c2c6f/attachment.png 


More information about the ncl-talk mailing list