<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif">Dear All,<br><br>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)<br></div><br><div class="gmail_default" style="font-family:times new roman,serif">Here is my ncl code.<br><br>;-----------------------------------------------------------------------------<br>; Plot Phase Space Diagram<br>;----------------------------------------------------------------------------<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl" <br><br>begin<br><br>dir="./"<br><br>;o1=asciiread(dir+"2nd-NELP-Ow199.dat",(/103389/),"float")<br>;o2=asciiread(dir+"2nd-Diff-N-ELP-Hw-Ow.dat",(/103389/),"float")<br>o2=asciiread(dir+"cos-angle.dat",(/103389/),"float")<br>o1=asciiread(dir+"PTC-N31-Hw-Ow.dat",(/103389/),"float")<br> printVarSummary(o1)<br><br><br> opt = True<br> opt@bin_nice = True<br><br> pdf2obs = pdfxy(o1,o2, 0, 0, opt) ; 25 is the default <br>printVarSummary(pdf2obs)<br>; print(pdf2obs)<br><br>;************************************************<br>; create plots<br>;************************************************<br>; wks = gsn_open_wks("pdf","FIG-10") ; open a ps file<br> wks = gsn_open_wks("png","FIG-10") ; open a ps file<br>; gsn_define_colormap(wks,"prcp_2")<br> gsn_define_colormap(wks,"amwg256")<br><br><br> res = True<br> res@gsnDraw = True <br> res@gsnFrame = True <br> res@cnInfoLabelOn = False<br> res@cnFillOn = True ; Turn on color<br> res@cnLinesOn = False <br> res@cnLineLabelsOn = False <br> res@lbLabelAutoStride = True <br> res@gsnSpreadColors = True<br> res@lbOrientation = "vertical" ; vertical label bar<br><br> res@trYMinF = 0.6 ; set minimum Y-axis value<br> res@trYMaxF = 1.0 ; set maximum Y-axis value<br> res@trXMinF = -0.8 ; set minimum X-axis value<br> res@trXMaxF = 1.8 ; set maximum X-axis value<br><br><br> res@tmXMajorGrid = True ; implement x grid<br> res@tmXMajorGridThicknessF = 0.5 ; 2.0 is default<br> res@tmXMajorGridLineDashPattern = 2 ; select short dash lines<br><br> res@tmYMajorGrid = True ; implement y grid<br> res@tmYMajorGridThicknessF = 0.5 ; 2.0 is default<br> res@tmYMajorGridLineDashPattern = 2 ; select short dash lines<br><br> res@cnLevelSelectionMode = "ManualLevels" ; manually set the contour levels with the following 3 resources<br> res@cnMinLevelValF = 0.001 ; set the minimum contour level<br> res@cnMaxLevelValF = 6.0 ; set the maximum contour leve<br> res@cnLevelSpacingF = 0.04 ; set the interval between contours<br><br> res@tiXAxisString = "bond Length (A)"<br> res@tiYAxisString = "tragectory"<br><br><br> plot = gsn_csm_contour (wks,pdf2obs, res)<br><br><br>end<br><br></div><br>-- <br><div class="gmail_signature"><div dir="ltr"><br><span style="font-family:times new roman,serif"><span style="color:rgb(0,0,153)">Subrahmanyam.Sappati</span><br><span style="color:rgb(102,0,204)">C/o Dr. Prasenjit Ghosh</span><br><span style="color:rgb(102,0,204)">IISER PUNE<br>Pin code : 411 008</span><br><br><span style="color:rgb(204,0,0)">Phone : +91 94 03 59 35 18</span></span><br><br></div></div>
</div>