[ncl-talk] RGB triplets colormap --> Two different figures, same script.
Lara Quitián Hernández
laraquitianhernandez at gmail.com
Fri Jun 1 14:13:26 MDT 2018
Great! Thanks for the clarification! :)
Best Regards,
Lara
El El vie, 1 jun 2018 a las 21:28, Rick Brownrigg <brownrig at ucar.edu>
escribió:
> Yes, Rashed is exactly correct (Thanks Rashed!). Because the first two
> colors in your colormap are very nearly white, and while the titles and
> other annotations are being drawn, they are nearly indistinguishable from
> the white background (you can see them very faintly however).
>
> On Fri, Jun 1, 2018 at 11:30 AM, Rashed Mahmood <rashidcomsis at gmail.com>
> wrote:
>
>> I think, the reason is that *for gsn_define_colormap*, you need to add
>> both background and foreground colours in the list when explicitly defining
>> colours triplets. So, in your list of color triplets, the second entry
>> should be "(/0.,0.,0./)".
>>
>> Replace the colors variable in your script with following:
>>
>> colors = (/"(/1.00, 1.00, 1.00/)","(/0.,0.,0./)", "(/0.98, 0.99,
>> 1.00/)", \
>> "(/0.98, 0.99, 1.00/)", "(/0.96, 0.98, 0.99/)", \
>> "(/0.95, 0.98, 0.99/)", "(/0.94, 0.98, 0.99/)", \
>> "(/0.93, 0.97, 0.99/)", "(/0.92, 0.97, 0.99/)", \
>> "(/0.91, 0.96, 0.99/)", "(/0.90, 0.96, 0.99/)", \
>> "(/0.89, 0.96, 0.99/)", "(/0.88, 0.95, 0.99/)", \
>> "(/0.87, 0.95, 0.98/)", "(/0.86, 0.94, 0.98/)", \
>> "(/0.85, 0.94, 0.98/)", "(/0.84, 0.94, 0.98/)", \
>> "(/0.83, 0.93, 0.98/)", "(/0.82, 0.93, 0.98/)", \
>> "(/0.81, 0.92, 0.98/)", "(/0.80, 0.92, 0.98/)", \
>> "(/0.79, 0.92, 0.98/)", "(/0.78, 0.91, 0.98/)", \
>> "(/0.77, 0.91, 0.98/)", "(/0.76, 0.90, 0.98/)", \
>> "(/0.74, 0.90, 0.98/)", "(/0.74, 0.90, 0.98/)", \
>> "(/0.72, 0.89, 0.97/)", "(/0.71, 0.89, 0.97/)", \
>> "(/0.70, 0.89, 0.97/)", "(/0.69, 0.88, 0.97/)", \
>> "(/0.69, 0.88, 0.97/)", "(/0.67, 0.87, 0.97/)", \
>> "(/0.66, 0.87, 0.97/)", "(/0.65, 0.87, 0.97/)", \
>> "(/0.64, 0.86, 0.97/)", "(/0.63, 0.86, 0.96/)", \
>> "(/0.61, 0.85, 0.96/)", "(/0.60, 0.84, 0.96/)", \
>> "(/0.59, 0.83, 0.96/)", "(/0.58, 0.83, 0.95/)", \
>> "(/0.58, 0.82, 0.94/)", "(/0.57, 0.81, 0.94/)", \
>> "(/0.56, 0.80, 0.94/)", "(/0.55, 0.80, 0.93/)", \
>> "(/0.54, 0.79, 0.92/)", "(/0.53, 0.78, 0.92/)", \
>> "(/0.52, 0.77, 0.92/)", "(/0.51, 0.76, 0.91/)", \
>> "(/0.50, 0.75, 0.90/)", "(/0.49, 0.74, 0.90/)", \
>> "(/0.49, 0.74, 0.90/)", "(/0.48, 0.73, 0.89/)", \
>> "(/0.47, 0.72, 0.89/)", "(/0.46, 0.71, 0.88/)", \
>> "(/0.45, 0.70, 0.88/)", "(/0.44, 0.70, 0.87/)", \
>> "(/0.43, 0.69, 0.87/)", "(/0.42, 0.68, 0.86/)", \
>> "(/0.41, 0.67, 0.86/)", "(/0.40, 0.67, 0.85/)", \
>> "(/0.40, 0.66, 0.85/)", "(/0.39, 0.65, 0.85/)", \
>> "(/0.38, 0.64, 0.84/)", "(/0.37, 0.63, 0.83/)", \
>> "(/0.36, 0.62, 0.83/)", "(/0.35, 0.61, 0.83/)", \
>> "(/0.34, 0.61, 0.82/)", "(/0.33, 0.60, 0.81/)", \
>> "(/0.32, 0.59, 0.81/)", "(/0.31, 0.58, 0.81/)", \
>> "(/0.30, 0.58, 0.80/)", "(/0.30, 0.57, 0.80/)", \
>> "(/0.28, 0.55, 0.79/)", "(/0.28, 0.56, 0.77/)", \
>> "(/0.28, 0.56, 0.76/)", "(/0.28, 0.56, 0.74/)", \
>> "(/0.28, 0.57, 0.73/)", "(/0.28, 0.57, 0.72/)", \
>> "(/0.28, 0.58, 0.70/)", "(/0.28, 0.58, 0.69/)", \
>> "(/0.28, 0.58, 0.67/)", "(/0.28, 0.59, 0.66/)", \
>> "(/0.28, 0.60, 0.65/)", "(/0.28, 0.60, 0.63/)", \
>> "(/0.28, 0.60, 0.62/)", "(/0.28, 0.61, 0.61/)", \
>> "(/0.28, 0.61, 0.59/)", "(/0.28, 0.61, 0.58/)", \
>> "(/0.28, 0.62, 0.56/)", "(/0.28, 0.62, 0.55/)", \
>> "(/0.28, 0.63, 0.54/)", "(/0.28, 0.63, 0.52/)", \
>> "(/0.28, 0.63, 0.51/)", "(/0.28, 0.64, 0.49/)", \
>> "(/0.28, 0.64, 0.48/)", "(/0.28, 0.65, 0.47/)", \
>> "(/0.28, 0.65, 0.45/)", "(/0.28, 0.65, 0.44/)", \
>> "(/0.28, 0.66, 0.42/)", "(/0.28, 0.66, 0.41/)", \
>> "(/0.28, 0.67, 0.40/)", "(/0.28, 0.71, 0.38/)", \
>> "(/0.28, 0.68, 0.37/)", "(/0.28, 0.68, 0.35/)", \
>> "(/0.28, 0.69, 0.34/)", "(/0.28, 0.69, 0.32/)", \
>> "(/0.28, 0.69, 0.31/)", "(/0.28, 0.70, 0.30/)", \
>> "(/0.28, 0.70, 0.27/)"/)
>>
>>
>>
>>
>>
>> On Fri, Jun 1, 2018 at 3:12 AM, Lara Quitián Hernández <
>> laraquitianhernandez at gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I just found the solution! If you use the *cnFillPalette* instead of
>>> *gsn_define_colormap* function, it works! I do not know the reason
>>> because it should also work with the "gsn" function (as the documentation
>>> says), but at least it works.
>>>
>>> Regards,
>>> Lara
>>>
>>> 2018-06-01 11:50 GMT+02:00 Lara Quitián Hernández <
>>> laraquitianhernandez at gmail.com>:
>>>
>>>> OK. I will ask them.
>>>>
>>>> Thanks,
>>>> Lara
>>>>
>>>> 2018-06-01 11:47 GMT+02:00 Guido Cioni <guidocioni at gmail.com>:
>>>>
>>>>> SOrry, I've just realized that you're using WRF functions, which I
>>>>> actually don't know that much and use to cause many problems when they are
>>>>> used in a slightly different configuration that they were intended to...
>>>>> That may be the cause since I've used a similar setup, besides the WRF
>>>>> functions, and it was working. Maybe you should write to wrf-ncl-help?
>>>>>
>>>>> On 1. Jun 2018, at 11:45, Guido Cioni <guidocioni at gmail.com> wrote:
>>>>>
>>>>> Hey Lara,
>>>>> any chance you could also send the file? Or is it too large?
>>>>>
>>>>> On 1. Jun 2018, at 11:43, Lara Quitián Hernández <
>>>>> laraquitianhernandez at gmail.com> wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I don't get any warning or error message...It's really weird.
>>>>>
>>>>> Of course, I attach my script. Thank you very much.
>>>>>
>>>>> Regards,
>>>>> Lara
>>>>>
>>>>> 2018-06-01 11:29 GMT+02:00 Guido Cioni <guidocioni at gmail.com>:
>>>>>
>>>>>> Lara, this is indeed pretty weird...
>>>>>> Do you get any warning while running the script?
>>>>>> Also, could you attach the script so that we can take a look?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> On 1. Jun 2018, at 11:19, Lara Quitián Hernández <
>>>>>> laraquitianhernandez at gmail.com> wrote:
>>>>>>
>>>>>> Good morning,
>>>>>>
>>>>>> I'm trying to display a particular field using a combination of RGB
>>>>>> triplets. I have already defined them:
>>>>>>
>>>>>> *colors = (/"(/1.00, 1.00, 1.00/)", "(/0.98, 0.99, 1.00/)", \*
>>>>>> *"(/0.98, 0.99, 1.00/)", "(/0.96, 0.98, 0.99/)", \*
>>>>>> *"(/0.95, 0.98, 0.99/)", "(/0.94, 0.98, 0.99/)", \*
>>>>>> *"(/0.93, 0.97, 0.99/)", "(/0.92, 0.97, 0.99/)", \*
>>>>>> *"(/0.91, 0.96, 0.99/)", "(/0.90, 0.96, 0.99/)", \*
>>>>>> *"(/0.89, 0.96, 0.99/)", "(/0.88, 0.95, 0.99/)", \*
>>>>>> *"(/0.87, 0.95, 0.98/)", "(/0.86, 0.94, 0.98/)", \*
>>>>>> *"(/0.85, 0.94, 0.98/)", "(/0.84, 0.94, 0.98/)"/)*
>>>>>>
>>>>>>
>>>>>> *gsn_define_colormap(wks,colors)*
>>>>>>
>>>>>> However, I obtain a figure without title, tickmarks, time stamp,
>>>>>> labelbar information, etc.
>>>>>>
>>>>>> <850hPa_ETH_416_2014-10-19_18:00:00.png>
>>>>>> The issue is that when I use a predefined colormap without changing
>>>>>> any other variable in my script:
>>>>>>
>>>>>>
>>>>>> *gsn_define_colormap(wks,"WhiteBlueGreenYellowRed")*
>>>>>>
>>>>>> I obtain a complete figure with all predefined settings. Both images
>>>>>> are generated with the same script, only by modifying the colormap
>>>>>> function. What's going on?
>>>>>>
>>>>>> <850hPa_ETH2_416_2014-10-19_18:00:00.png>
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Regards,
>>>>>> Lara
>>>>>>
>>>>>> -
>>>>>>
>>>>>>
>>>>>> *Lara Quitián Hernández, PhD Student*
>>>>>> Departamento de Física de la Tierra, Astronomía y Astrofísica
>>>>>> Facultad de Ciencias Físicas
>>>>>> Ciudad Universitaria, Plaza Ciencias, 1
>>>>>> <https://maps.google.com/?q=Ciudad+Universitaria,+Plaza+Ciencias,+1+28040+Madrid.+Spain&entry=gmail&source=g>
>>>>>> 28040 Madrid. Spain
>>>>>> <https://maps.google.com/?q=Ciudad+Universitaria,+Plaza+Ciencias,+1+28040+Madrid.+Spain&entry=gmail&source=g>
>>>>>> Email: lquitian at ucm.es <mlunar at aemet.es>
>>>>>>
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> ncl-talk at ucar.edu
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>
>>>>>>
>>>>>>
>>>>>> Guido Cioni
>>>>>> http://guidocioni.altervista.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>>
>>>>> *Lara Quitián Hernández, PhD Student*
>>>>> Departamento de Física de la Tierra, Astronomía y Astrofísica
>>>>> Facultad de Ciencias Físicas
>>>>> Ciudad Universitaria, Plaza Ciencias, 1
>>>>> <https://maps.google.com/?q=Ciudad+Universitaria,+Plaza+Ciencias,+1+28040+Madrid.+Spain&entry=gmail&source=g>
>>>>> 28040 Madrid. Spain
>>>>> <https://maps.google.com/?q=Ciudad+Universitaria,+Plaza+Ciencias,+1+28040+Madrid.+Spain&entry=gmail&source=g>
>>>>> Email: lquitian at ucm.es <mlunar at aemet.es>
>>>>>
>>>>> <ETH_lara.ncl>
>>>>>
>>>>>
>>>>>
>>>>> Guido Cioni
>>>>> http://guidocioni.altervista.org
>>>>>
>>>>>
>>>>>
>>>>> Guido Cioni
>>>>> http://guidocioni.altervista.org
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>> *Lara Quitián Hernández, PhD Student*
>>>> Departamento de Física de la Tierra, Astronomía y Astrofísica
>>>> Facultad de Ciencias Físicas
>>>> Ciudad Universitaria, Plaza Ciencias, 1
>>>> <https://maps.google.com/?q=Ciudad+Universitaria,+Plaza+Ciencias,+1+28040+Madrid.+Spain&entry=gmail&source=g>
>>>> 28040 Madrid. Spain
>>>> <https://maps.google.com/?q=Ciudad+Universitaria,+Plaza+Ciencias,+1+28040+Madrid.+Spain&entry=gmail&source=g>
>>>> Email: lquitian at ucm.es <mlunar at aemet.es>
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>>
>>> *Lara Quitián Hernández, PhD Student*
>>> Departamento de Física de la Tierra, Astronomía y Astrofísica
>>> Facultad de Ciencias Físicas
>>> Ciudad Universitaria, Plaza Ciencias, 1
>>> <https://maps.google.com/?q=Ciudad+Universitaria,+Plaza+Ciencias,+1+28040+Madrid.+Spain&entry=gmail&source=g>
>>> 28040 Madrid. Spain
>>> <https://maps.google.com/?q=Ciudad+Universitaria,+Plaza+Ciencias,+1+28040+Madrid.+Spain&entry=gmail&source=g>
>>> Email: lquitian at ucm.es <mlunar at aemet.es>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
> --
*Lara Quitián Hernández, PhD Student*
Departamento de Física de la Tierra, Astronomía y Astrofísica
Facultad de Ciencias Físicas
Ciudad Universitaria, Plaza Ciencias, 1
28040 Madrid. Spain
Email: lquitian at ucm.es <mlunar at aemet.es>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180601/8eb2c1e0/attachment.html>
More information about the ncl-talk
mailing list