[ncl-talk] Discrete Color Bar

Dennis Shea shea at ucar.edu
Sun Sep 27 21:13:45 MDT 2015


The Classification examples illustrate how to use some of the
resources... For example

  res at cnLevelSelectionMode = "ExplicitLevels" ; set explict contour levels
  res at cnLevels         = integertobyte( ispan(2,18,1) )

  res at lbLabelPosition  = "Center"           ; label position
  res at lbLabelAlignment = "BoxCenters"       ; label orientation
  res at lbLabelStrings   = ispan(1,18,1)


On Sun, Sep 27, 2015 at 6:56 PM, jbuzan <jbuzan at purdue.edu> wrote:
> Thanks Mary!
>
> -Jonathan
>
>
> On Sep 27, 2015, at 8:27 PM, Mary Haley <haley at ucar.edu> wrote:
>
> Hi Jonathan,
>
> NCL always wants to contour using transitions, rather than discrete values.
> If you truly have discrete values, like an array of integers, then you can
> get around this by selecting contour levels that straddle the discrete
> values. You may also want to set lbLabelAlignment to "BoxCenter" and
> lbLabelStrings to select the appropriate labels, since you probably don't
> want the labels used for the contour levels.
>
> I've included a script which uses dummy data, so you can run it as is.  Let
> me know if this doesn't answer your question.
>
> --Mary
>
>
> On Sun, Sep 27, 2015 at 9:31 AM, jbuzan <jbuzan at purdue.edu> wrote:
>>
>> Hello NCL-Talk,
>>
>> Is there a way to set contour colors to discrete colors, instead of the
>> transitions?
>>
>> -Jonathan
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> <conLev_6.ncl>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


More information about the ncl-talk mailing list