Re: resources

From: mkrug AT egs.uct.ac.za
Date: Thu Jan 06 2005 - 13:20:00 MST

  • Next message: alexg: "ocean depth sections"

    Gosh I knew it was something stupid. I'd better drink some coffe next
    time. Thanks.

    >
    > Marjolaine,
    >
    > You don't want to use equal signs or quotes in a resource file.
    > Instead, use colons, and remove the quotes. For example:
    >
    > *tmXBLabelFont : Helvetica-bold
    > *tmYLLabelFont : Helvetica-bold
    > *tmYLLabelFontHeightF : 0.012
    > *tmXBLabelFontHeightF : 0.012
    >
    > --Mary
    >
    >
    > On Jan 6, 2005, at 5:12 AM, Marjolaine Krug wrote:
    >
    >> Dear Mary,
    >>
    >> Thanks to your help I have managed to plot the output to a different PS
    >> filename. However, my program still does not seem to understand my
    >> resource
    >> file. I am confused on how to set the resources in the resource file.
    >> In my NCL program, I make the plot with the call:
    >> map = gsn_csm_contour_map_ce(wks,sst,res)
    >> where res = True, and sst is my variable.
    >> Inside my res file, i have placed definitions such as:
    >> !
    >> ! Tick marks
    >> !
    >> *tmXBLabelFont = "Helvetica-bold"
    >> *tmYLLabelFont = "Helvetica-bold"
    >> *tmYLLabelFontHeightF = 0.012
    >> *tmXBLabelFontHeightF = 0.012
    >> *tmXBMajorLengthF = 0.006
    >> *tmXBMajorLengthF = 0.003
    >> !
    >> ! Contour
    >> !
    >> *cnFillOn = True
    >> *cnLinesOn = False
    >> *cnRasterModeOn = True
    >> *cnFillDrawOrder = "PreDraw"
    >> *cnLevelSelectionMode = "ManualLevels"
    >> *cnMinLevelValF = 15.
    >> *cnMaxLevelValF = 30.
    >> *cnLevelSpacingF = 0.5
    >>
    >> These contour or tick mark settings are not "seen" by my NCL program.
    >>
    >> What am I doing wrong???
    >>
    >> Sincerely, Marjolaine.
    >>
    >> On Tuesday 04 January 2005 17:35, you wrote:
    >>> Marjolaine Rouault
    >>> 28, 9th Avenue
    >>> 7975, Fish Hoek
    >>> Cape Town
    >>> South Africa
    >>> Tel: +27-(0)21-782-3666
    >>>
    >>>
    >>>
    >>> -----Original Message-----
    >>> From: Mary Haley [mailto:haley@ucar.edu]
    >>> Sent: Tuesday, January 04, 2005 4:48 PM
    >>> To: Marjolaine Rouault
    >>> Cc: ncl-talk@ucar.edu
    >>> Subject: Re: resources
    >>>
    >>> On Jan 4, 2005, at 3:53 AM, Marjolaine Rouault wrote:
    >>>> Hi,
    >>>>
    >>>> I would like to load some resources from a file and save my plot into
    >>>> a postscript file with a name different to that of the resource file.
    >>>> Is that possible? I have looked at the examples and can not find
    >>>> anything like that.
    >>>>
    >>>> Also, i have tried using my resource file within the ncl program and
    >>>> it does not see it. I call the resource file sst.res into the ncl
    >>>> program by giving the command:
    >>>>
    >>>> wks = gsn_open_wks("ps" ,"sst.res")
    >>>>
    >>>> Thanks in advance for your help. Marjolaine.
    >>>
    >>> Hi Marjolaine,
    >>>
    >>> You can try using the "wkPSFileName" resource:
    >>>
    >>> type = "ps"
    >>> type@wkPSFileName = "psfile"
    >>> wks = gsn_open_wks(type,"sst")
    >>>
    >>> Your PS file name will be "psfile.ps". Note that I removed the ".res"
    >>> suffix from the second argument. This is
    >>> because NCL will internally append the ".res" suffix. The way you had
    >>> it above, NCL would have looked for
    >>> a file "sst.res.res".
    >>>
    >>> A side note: the setting of the wkPSFileName resource may cause some
    >>> warning messages like:
    >>>
    >>> warning:_NhlSetValues:wkPSFileName does not have "S" access
    >>>
    >>> You can safely ignore these. I will fix the code in a future release
    >>> so
    >>> the warnings go away.
    >>>
    >>> --Mary
    >
    >



    This archive was generated by hypermail 2b29 : Thu Jan 06 2005 - 19:46:55 MST