Hi René,
On Tue, May 17, 2011 at 11:22:50AM +0200, R. Bastian wrote:
> Salut,
> 
> i wrote that:
> -----------------------------
> def figure(listeprofils, nfichier, xwidth=12, xheight=8, 
>            dimension=500, epais=0.05):
>     """ fonction pour tracer les profils de 'listeprofils'
>     """
>     lstyles = [pyx.style.linestyle.solid,
>                pyx.style.linestyle.dotted,
>                pyx.style.linestyle.dashed,
>                pyx.style.linestyle.dashdotted]
>     g = pyx.graph.graphxy(width=xwidth, height=xheight)
>     for i, xp in enumerate(listeprofils):
>         p, titre = xp
>         g.plot(pyx.graph.data.points(zip(range(dimension), p), x=1, y=2, 
>                                      title=titre),
>            styles=[pyx.graph.style.line([pyx.color.rgb.black,
>                                      lstyles[i],
>                                      pyx.style.linewidth(epais)])])
>     g.writePDFfile(nfichier)
> ---------------------------------
> but the title does not appear and there is no error message.
> 
> What is wrong ?
> listeprofils = [v0, v1, ...] where vX are numpy.ndarrays
The idea in PyX is: The titles appear only in the key ==> you have to
add a key to your graph.
replace "g = pyx.graph.graphxy(width=xwidth, height=xheight)"  by
g = pyx.graph.graphxy(width=xwidth, height=xheight, key=graph.key.key())

See http://pyx.sourceforge.net/manual/module-graph.key.html
for the full documentation of the parameters for "key" (e.g. where to
place it, which size, ...)


Axel


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to