Re: No negative signs in scale bar

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 23 2012 - 10:02:22 MDT

You can make your X11 window larger if you have room, by editing the ~/.hluresfile and changing wkWidth and wkHeight to larger than 500x500 values.

If you don't have a .hluresfile, then download it from here:

http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml

--Mary

On Mar 23, 2012, at 10:14 AM, Melissa Anne Pfeffer wrote:

> Thanks,
> Your suggestion of what to do next (provide you an image) solved the
> mystery. The minus sign is only not shown in X11- when I produce a
> .pdf image the minus sign is there.
> Thanks.
>
> On Fri, Mar 23, 2012 at 4:05 PM, Mary Haley <haley@ucar.edu> wrote:
>> Hi Melissa,
>>
>> It would help if you could provide an image that shows the problem.
>>
>> It could be that the labelbar is running off the side of the page, or maybe
>> into the plot itself, and so you are unable to see the minus signs.
>>
>> I do know that the wrf_xxxx codes try to set a bunch of labelbar resources
>> in order to position it correctly with respect to the plot. It's possible that
>> one of these settings is causing your minus signs to disappear. But, until
>> I can see sample image, I'm not sure if this is the issue.
>>
>> Thanks,
>>
>> --Mary
>>
>> On Mar 23, 2012, at 9:57 AM, Melissa Anne Pfeffer wrote:
>>
>>> I'm using the following code and my scale bar, which goes from -400 -
>>> 800, does not show the negative signs, so it looks like 300 200 100 0
>>> 100 200 ...
>>> Can you please tell me how to get the - signs to appear? Even with
>>> the default res@cnExplicitLabelBarLabelsOn = "False" the - signs are
>>> not appearing.
>>>
>>> Thank you,
>>> Melissa
>>>
>>> res = True
>>> pltres = True ; Plot resources
>>> pres = True
>>> delete(i)
>>> i=0
>>> plot = new(1,graphic)
>>> contourq=new(1,graphic)
>>>
>>> res@cnFillOn = True
>>> res@cnFillMode = "CellFill"
>>> res@cnRasterSmoothingOn=False
>>> res@cnSmoothingOn =False
>>> res@gsnSpreadColors = True
>>> res@cnLinesOn = False
>>> res@InitTime = False
>>> res@ValidTime = False
>>> res@Footer = False
>>> res@tiXAxisString = "Latitude [deg N]"
>>> res@tiYAxisString = "Height [m]"
>>> res@tmYLMode= "Explicit"
>>> res@tmYLLabelStride = 6
>>> res@tmYLValues= (/ispan(0,(dimsizes(NICE(i,:,i))-1),1)/)
>>> res@tmYLLabels=(/floattoint(z_ave(i,:,0))/)
>>> res@tmXBMode= "Explicit"
>>> res@tmXBValues= (/ispan(0,(dimsizes(NICE(i,i,:))-1),1)/)
>>> res@tmXBLabels=
>>> (sprintf("%6.4g",(fspan(min(XLAT(i,:)),max(XLAT(i,:)),(floattoint(dimsizes(NICE(i,i,:)-1)/1)+1)))))
>>> res@tmXBLabelStride = 6
>>> res@tmXBAutoPrecision = False
>>> res@tmXBPrecision = 1
>>> res@gsnDraw = False ; do not draw picture
>>> res@gsnFrame = False ; do not advance frame
>>> res@lbTitlePosition = "Bottom"; move scale bar
>>> label to right instead of default top
>>> pltres@NoTitles = True
>>> pltres@PanelPlot = True
>>> pltres@gsnDraw = False ; do not draw picture
>>> pltres@gsnFrame = False ; do not advance frame
>>> gsn_merge_colormaps(wks,"WhViBlGrYeOrRe","BlWhRe") ; merge two color maps
>>> ; colors for difference plots
>>> res@gsnSpreadColorStart = 110 ; now start at color
>>> res@gsnSpreadColorEnd = 200 ; and end at color
>>> ; colors for not difference plots
>>> ;res@gsnSpreadColorStart = 2 ; start at 4
>>> ;res@gsnSpreadColorEnd = 102 ; end at 15
>>> res@cnExplicitLabelBarLabelsOn = "True"
>>> delete(res@lbLabelStrings)
>>> res@lbLabelStrings = sprinti("%4.1i",ispan(-300,800,100))
>>> ; Format the labels
>>>
>>> NICEdiff@description = "NICE"
>>> plot(0) = wrf_contour(a[i],wks,NICEdiff(i,:,:),res)
>>>
>>> ;*******************************************
>>> ; create panel resources
>>> ;*******************************************
>>>
>>> pres@gsnFrame = False ; save panel until
>>> both ready
>>> pres@PanelPlot = True
>>> pres@gsnFrame = False
>>> pres@gsnPanelTop = 0.9 ; draw from left
>>> edge to center
>>> pres@gsnPanelLabelBar = False ; commom label bar
>>> pres@gsnPanelCenter = True
>>> pres@gsnPaperOrienation = "Portrait"
>>>
>>> ;*******************************************
>>> ;make title
>>> ;*******************************************
>>>
>>> text1 = create "text1" textItemClass wks
>>> "txString" : "Double - Ref"
>>> "txPosXF" : 0.53
>>> "txPosYF" : 0.84
>>> "txFontHeightF" : 0.018
>>> end create
>>>
>>> draw((/text1/))
>>> gsn_panel(wks,plot,(/1,1/),pres); 1rows, 1 columns
>>> frame(wks)
>>> _______________________________________________
>>> 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 Fri Mar 23 10:02:35 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2012 - 08:50:24 MDT