Re: Re : Line thickness

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 11 May 2009 09:03:42 -0600

Another approach:

The following is untested

    res_at_gsnDraw = False
    res_at_gsnFrame= False

    plot = ....

    getvalues plot
        "cnLevels" : cnlvls
        "cnLineDashPatterns" : cnlinepat
        "cnLineThicknesses" : cnlinethk
        "cnLineColors" : cnlinecolor
    end getvalues

    ii = ind(cnlvls.eq. -2.0)

    if (.not.ismissing(ii)) then
       ;cnlinepat(ii) = 5 ; simple dash line
        cnlinethk(ii) = 2 ; make twice as thick
       ;cnlinecolor(ii) = 2 ; index or (say) "red"
    end if

    setvalues plot
      ;"cnMonoLineDashPattern" : False
      ;"cnLineDashPatterns" : cnlinepat
       "cnMonoLineThickness" : False
       "cnLineThicknesses" : cnlinethk
      ;"cnMonoLineColor" : False
      ;"cnLineColors" : cnlinecolor

    end setvalues

    draw(plot)
    frame(wks)

===========
Youc could use the above approach to change colors

Adam Phillips wrote:
> Hi Michel,
>
> Louis' idea would work. Another way is to set cnMonoLineThickness =
> False, and then set cnLineThicknesses to the appropriate array:
>
> http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnMonoLineThickness
> http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLineThicknesses
>
> example:
> res = True
> ....
> res_at_cnLevelSelectionMode = "ExplicitLevels"
> res_at_cnLevels = (/-5,-3,-2,-1,0,1,2,3,5/)
> res_at_cnMonoLineThickness = False
> res_at_cnLineThicknesses = (/1,1,3,1,1,1,1,1,1/)
>
> Adam
>
>
> louis Vonder wrote:
>> Hi Michel,
>>
>> Perhaps this is not the best methods?
>>
>> You can plot only a figure with -2C contour with a custom thickness and
>> then overlay
>> your first plot by another plot with regular thickness of the contours.
>>
>> --Louis
>>
>> --- En date de : *Lun 11.5.09, Michel dos Santos Mesquita
>> /<Michel.Mesquita_at_bjerknes.uib.no>/* a écrit :
>>
>>
>> De: Michel dos Santos Mesquita <Michel.Mesquita_at_bjerknes.uib.no>
>> Objet: [ncl-talk] Line thickness
>> À: ncl-talk_at_ucar.edu
>> Date: Lundi 11 Mai 2009, 9h26
>>
>> Hi everyone,
>>
>> I know NCL has the function 'gsnContourZeroLineThicknesssF', to set
>> the thickness of the zero contour.
>>
>> How can I change the thickness of line corresponding to another value?
>> For example, if I want to change the thickness of the -2C Temperature?
>>
>> THanks,
>>
>> Michel
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 11 2009 - 09:03:42 MDT

This archive was generated by hypermail 2.2.0 : Mon May 11 2009 - 09:43:46 MDT