[ncl-talk] Can't plot x-axis labels on a vertical cross-section plot.

Mary Haley haley at ucar.edu
Mon Feb 12 12:33:38 MST 2018


Hi Ty,

Sorry about the delay. Most of the NCL team was out for a workshop last
week.

The error is likely coming from nzlabs being equal to 1.  You cannot call
fspan with just 1 value, because fspan wants to return both the start *and*
the end values, which requires that the third argument be at least 2.

So, this won't work:

x = fspan(0,5,1)

but this will:

x = fspan(0,5,2)

You need to check this code:

  res at tmXBMode = "Explicit"
  res at tmXBValues = fspan(0,xspan,nxlabs)                     ; Create the
correct tick marks
  res at tmXBLabels = sprintf("%.1f",fspan(xmin,xmax,nxlabs))

and make sure that "nxlabs" is 2 or greater.  If it's not, then you may
need to check on the calculation for nxlabs.

--Mary



On Mon, Feb 5, 2018 at 1:23 PM, Ty Buckingham <
ty.buckingham at manchester.ac.uk> wrote:

> Hi there,
>
> I'm currently trying to plot a vertical cross section of a section of my
> WRF model output. When attempting to change the x-axis from number of
> grid-points to an associated longitude, I receive the following error:
>
>
> fatal:fspan: number of elements parameter is less-than-or-equal-to one,
> can't continue
>
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 89 in
> file vertical_slice_test.ncl
>
>
>
> It appears I can associate my Y-axis with the correct height in metres,
> but not the X-axis with longitude. Any help?
>
>
> Thanks
>
> Ty
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180212/969fc472/attachment.html>


More information about the ncl-talk mailing list