Re: help: do loop invalid problem

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 21 Jun 2007 09:32:54 -0600 (MDT)

All,

I've been working with Li offline to solve this problem, and wanted to
update everybody here.

One of the problems had to do with setting an axis to "log".

If you set your X or Y axis to "Log", then your X and Y axis values
must be above 0. Unfortunately, if you have values like 1, 10, 20,
30, etc. on one of your axes, NCL may try to pick a "nice" value of 0
to round out the end of the axis. Thus, you then get an error that
trXMinF needs to be <= 0.0. I'm not sure why NCL doesn't detect that
you have a log axis and not try to use a nice value of 0.0, but you
can get around this by setting res_at_trXMinF to something small, like
0.1.

The other problem was with trying to write multiple frames to an EPS
file. As Adam already pointed out, you can only write one frame if you
use EPS. The extra frame was coming from an accidental call to
"frame(wks)", so once we removed this, it was okay.

There were other minor problems that were fixed that aren't worth
mentioning here.

Cheers,

--Mary

On Wed, 20 Jun 2007, lxf wrote:

> Hi,
> I have a strange problem.
> There is a do loop in my script to draw panels year by year(the script segment is attached behind the letter)
> . When I draw them as "x11", the pictures can be drawn correctlly except giving out the following information:
>
> warning:XyPlotSetValues:xyXStyle is NhlLOG:trXMinF can't be <= 0.0:Setting xyComputeXMin to True
> warning:gsnYRefLineColor is not a valid resource in /nami.11-3.1949_xy at this time
> warning:gsnYRefLineDashPatterns is not a valid resource in /nami.11-3.1949_xy at this time
> warning:LlDataLineTo: point 0.000000,0.000000 outside data domain
> warning:LlDataLineTo: point 0.000000,0.200000 outside data domain
> warning:XyPlotSetValues:xyXStyle is NhlLOG:trXMinF can't be <= 0.0:Setting xyComputeXMin to True
> warning:gsnYRefLineColor is not a valid resource in /nami.11-3.1950_xy at this time
> warning:gsnYRefLineDashPatterns is not a valid resource in /nami.11-3.1950_xy at this time
> warning:LlDataLineTo: point 0.000000,0.000000 outside data domain
> warning:LlDataLineTo: point 0.000000,0.200000 outside data domain
>
> However, when I change "wks = gsn_open_wks("x11",outname)" into "wks = gsn_open_wks("eps",outname) ", the fist picture is drawn correctlly but the second picture cann't be drawn out. And the error information is :
>
> warning:XyPlotSetValues:xyXStyle is NhlLOG:trXMinF can't be <= 0.0:Setting xyComputeXMin to True
> warning:gsnYRefLineColor is not a valid resource in /nami.11-3.1949_xy at this time
> warning:gsnYRefLineDashPatterns is not a valid resource in /nami.11-3.1949_xy at this time
> warning:LlDataLineTo: point 0.000000,0.000000 outside data domain
> warning:LlDataLineTo: point 0.000000,0.200000 outside data domain
> warning:GKS:GCLRWK: --PostScript error: Encapsulated PostScript can have only one page
> Segmentation fault
>
> It is strange ,isn't it? And do you know why?
>
> Li
>
> My script segment:
> *********************
> ...
> do iyr=1949,1950
> npanels = 5
> outname = outpath+name+"."+season(iseason)+iyr
> wks = gsn_open_wks("x11",outname)
> plot = new(npanels,graphic)
> res = True ; PLOT mods desired
> res_at_gsnFrame = False
> res_at_gsnDraw = False
>
> ylabel = (/"5-10","10-20","20-30","initial"/)
> do iband=0,3
> plot(iband) = plot_line1(data(iband,iyr-1949,:),wks,res,YRef(iband),ylabel(iband))
> ; Here "data","YRefylabel" are arrays
> ; which were difined previously .
> ; "plot_line1" and "draw_spec" are functions myself.
> end do
>
> XRef = pufeng(iyr-1948,0:npufeng(iseason)-1) ; Here "pufeng" ans "XRef" is a predifined array ,too.
> plot(4) = draw_spec(wks,per(:),pow_data(iyr-1948,:,0:n_tl(iseason)-1),XRef) ; And "iseason" is a const integer.
>
>
> resP = True ; modify the panel plot
> resP_at_gsnMaximize = True
> resP_at_txString = iyr+""
> gsn_panel(wks,plot(:),(/5,1/),resP ) ; now draw as one plot
> frame(wks)
> end do
> ...
> **********************************************
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 21 2007 - 09:32:54 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 21 2007 - 09:38:27 MDT