Re: Segmentation fault, nglYAxisType

From: Nikolay Koldunov <koldunovn_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 20 2010 - 16:35:15 MDT

Hello Sasha,

Thanks for your response. But the resulting image still have irregular
Y axis, and additionally
 resources.trYReverse      = True
doesn't work :(

I believe that the name of the resource is right and there is
something else that I missing, or there is something wrong in the Ngl
code.

Anyway many thanks for your try!

Kolya

On Tue, Jul 20, 2010 at 11:54 PM, Oleksandr Huziy <guziy.sasha@gmail.com> wrote:
> Hello Kolya,
>
> works for me like this(produced image is attached), this is my first use of
> ngl))
>
> import Ngl
> import numpy
>
>
> def main():
>     foo = numpy.load('outfile1.npz')
>     print 'loaded'
>     print repr(foo)
>     llev = foo['arr_0']
>     temp_prof  = foo['arr_1']
>
> #    llev = numpy.arange(0,10.0,0.1)
> #    temp_prof = 0.25 * llev
>
>     print 'read in the array'
>
>     wkres = Ngl.Resources()
>  #   wkres.wkColorMap = "gui_default"
>     wks_type = "ps"
>     wks = Ngl.open_wks(wks_type,"axix_line",wkres)
>
>     resources = Ngl.Resources()
>     resources.sfMissingValueV = -9.99999978e22
>     resources.sfYArray        = llev[:]
>     resources.trYAxisType = "LinearAxis" #I think your error was here, the
> name of the resource was wrong
>
>     resources.trYLog        = False
>
>     resources.cnFillOn        = True
>     resources.trYReverse      = True
>
>     print temp_prof.shape
>     print llev.shape
>
>     Ngl.contour(wks, temp_prof,resources)
>     Ngl.end()
>
> if __name__ == '__main__':
>     main()
>
> --
> good luck
> Sasha
>
>
>
> 2010/7/20 Nikolay Koldunov <koldunovn@gmail.com>
>>
>> Dear list members,
>>
>> I have a problem with nglYAxisType resource. When I am trying to set
>> it to "linearaxis" or "logaxis" it cause segmentation fault error.
>> Default "irregularaxis" works fine.
>> I test it with different data values (salinity and temperature) but
>> the error is still there.
>>
>> My script and two files with the data are in attachment.
>>
>> version = '1.3.0b3'
>> array_module = 'numpy'
>> array_module_version = '1.3.0'
>> python_version = '2.6'
>>
>> Any help will be very much appreciated.
>>
>> Kolya
>>
>> --
>> Nikolay Koldunov
>> University of Hamburg
>> Institute of Oceanography
>> KlimaCampus
>>
>> koldunovn@gmail.com
>> nikolay.koldunov@zmaw.de
>> ph. +49 40 42838 7580
>> Grindelberg 5, room 211,
>> 20144 Hamburg, Germany
>>
>> _______________________________________________
>> pyngl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>>
>
>

-- 
Nikolay Koldunov
University of Hamburg
Institute of Oceanography
KlimaCampus
koldunovn@gmail.com
nikolay.koldunov@zmaw.de
ph. +49 40 42838 7580
Grindelberg 5, room 211,
20144 Hamburg, Germany
_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Tue Jul 20 16:35:20 2010

This archive was generated by hypermail 2.1.8 : Wed Aug 04 2010 - 09:35:05 MDT