Thank you for your post!! This has helped me tremendously with plotting
TimeSeries data.
I couldn't figure out how to instantiate the DateFormatter to format the
axis.
In python => matplotlib.dates.DateFormatter("%b %d")
This doesn't work in julia:
@pyimport matplotlib.dates as mdates
dtf = mdates.DateFormatter("%b %d")
But using the convert method as you pointed out works like a champ:
@pyimport matplotlib.dates as mdates
dtf = convert(Function,mdates.DateFormatter)("%b %d")
This technique wasn't obvious to me after reading the PyCall docs (maybe
it's because I am still so new to julia.) Perhaps it should have a place
there to help out the newbies like myself?
Thanks for pointing out the solution!
On Wednesday, December 4, 2013 8:15:19 PM UTC-5, Diego Javier Zea wrote:
>
> *PyObject* can be converted to *Function*.
> This works :)
>
> julia> a = py_aln.align[:globalds]
> PyObject <Bio.pairwise2.alignment_function instance at 0xaf48680>
>
> julia> aa = convert(Function,a)
> fn (generic function with 1 method)
>
> julia> aa("AHHH","HHHA",py_mat.ident,-0.25,-0.5)
> 1-element Array{Any,1}:
> ("AHHH-","-HHHA",17.5,0,5)
>
> Thanks
>