[ncl-talk] Joint probability distribution in Logarithmic scale
Subrahmanyam Sappati
subrahmanyamsappati at gmail.com
Thu Aug 20 23:57:48 MDT 2015
Thank you Adam Phillips. I am able to plot in terms of
(/5.e-5,1.e-4,1.e-3,1.e-2,.1,1,10/). But I am unable to normalize (P/Pmax).
Regards
Subrahmanyam Sappati
On Fri, Aug 21, 2015 at 1:25 AM, Adam Phillips <asphilli at ucar.edu> wrote:
> Hi Subrahmanyam,
> Yes, I think you just need to set your contour levels appropriately.
>
> Try using these resources:
> res at cnLevelSelectionMode = "ExplicitLevels"
> res at cnLevels = (/5.e-5,1.e-4,1.e-3,1.e-2,.1,1,10/)
> ; You can add levels to the above line as needed
>
> That should do it. If that doesn't help or if you have further issues
> please respond to the ncl-talk email list..
> Adam
>
>
>
>
>
>
> On Thu, Aug 20, 2015 at 12:55 AM, Subrahmanyam Sappati <
> subrahmanyamsappati at gmail.com> wrote:
>
>> Dear All,
>>
>> I am able to plot Joint PDF of two sets (data set 1, data set 2) with
>> following ncl code (Refer fig - Fig-10.png). Is it possible to plot
>> normalized Joint PDF in logarithmic scale (10^(n)) ? (please refer
>> Ref.png)
>>
>> Here is my ncl code.
>>
>>
>> ;-----------------------------------------------------------------------------
>> ; Plot Phase Space Diagram
>>
>> ;----------------------------------------------------------------------------
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
>>
>> begin
>>
>> dir="./"
>>
>> ;o1=asciiread(dir+"2nd-NELP-Ow199.dat",(/103389/),"float")
>> ;o2=asciiread(dir+"2nd-Diff-N-ELP-Hw-Ow.dat",(/103389/),"float")
>> o2=asciiread(dir+"cos-angle.dat",(/103389/),"float")
>> o1=asciiread(dir+"PTC-N31-Hw-Ow.dat",(/103389/),"float")
>> printVarSummary(o1)
>>
>>
>> opt = True
>> opt at bin_nice = True
>>
>> pdf2obs = pdfxy(o1,o2, 0, 0, opt) ; 25 is the default
>> printVarSummary(pdf2obs)
>> ; print(pdf2obs)
>>
>> ;************************************************
>> ; create plots
>> ;************************************************
>> ; wks = gsn_open_wks("pdf","FIG-10") ; open a ps file
>> wks = gsn_open_wks("png","FIG-10") ; open a ps file
>> ; gsn_define_colormap(wks,"prcp_2")
>> gsn_define_colormap(wks,"amwg256")
>>
>>
>> res = True
>> res at gsnDraw = True
>> res at gsnFrame = True
>> res at cnInfoLabelOn = False
>> res at cnFillOn = True ; Turn on color
>> res at cnLinesOn = False
>> res at cnLineLabelsOn = False
>> res at lbLabelAutoStride = True
>> res at gsnSpreadColors = True
>> res at lbOrientation = "vertical" ; vertical label bar
>>
>> res at trYMinF = 0.6 ; set minimum Y-axis value
>> res at trYMaxF = 1.0 ; set maximum Y-axis value
>> res at trXMinF = -0.8 ; set minimum X-axis value
>> res at trXMaxF = 1.8 ; set maximum X-axis value
>>
>>
>> res at tmXMajorGrid = True ; implement x grid
>> res at tmXMajorGridThicknessF = 0.5 ; 2.0 is default
>> res at tmXMajorGridLineDashPattern = 2 ; select short dash
>> lines
>>
>> res at tmYMajorGrid = True ; implement y grid
>> res at tmYMajorGridThicknessF = 0.5 ; 2.0 is default
>> res at tmYMajorGridLineDashPattern = 2 ; select short dash
>> lines
>>
>> res at cnLevelSelectionMode = "ManualLevels" ; manually set the
>> contour levels with the following 3 resources
>> res at cnMinLevelValF = 0.001 ; set the minimum
>> contour level
>> res at cnMaxLevelValF = 6.0 ; set the maximum
>> contour leve
>> res at cnLevelSpacingF = 0.04 ; set the interval
>> between contours
>>
>> res at tiXAxisString = "bond Length (A)"
>> res at tiYAxisString = "tragectory"
>>
>>
>> plot = gsn_csm_contour (wks,pdf2obs, res)
>>
>>
>> end
>>
>>
>> --
>>
>> Subrahmanyam.Sappati
>> C/o Dr. Prasenjit Ghosh
>> IISER PUNE
>> Pin code : 411 008
>>
>> Phone : +91 94 03 59 35 18
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> --
> Adam Phillips
> Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
>
--
Subrahmanyam.Sappati
C/o Dr. Prasenjit Ghosh
IISER PUNE
Pin code : 411 008
Phone : +91 94 03 59 35 18
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150821/e70228d0/attachment.html
More information about the ncl-talk
mailing list