Hi Arnd,

Indeed in PyX 0.12.1, the graph code uses the newly introduced canvas
layer system to specify the drawing order of various parts of the graph.
This fixes an old bug (graph grids had been drawn above the axis ticks).
Unfortunately, this also breaks old scripts - that's why PyX is still,
even after so many years, in an alpha state - and documentation is still
lacking a bit...

In any case, in order to draw the bitmap below lines and/or symbols of,
e.g., a function plot use:

   g.layer("filldata").insert(...)

Btw, you should also have a look at the new density style of the graph,
which, in many cases, should make it unnecessary to generate and insert
bitmaps by yourself.

Best,

        Jörg

On 09.12.12, Arnd Baecker wrote:
> Hi,
> 
> with PyX 0.11.1 bitmaps were added behind
> lines of the graph and ticks.
> With PyX 0.12.1 it seems that bitmaps are added in front
> of everything (see the example below).
> 
> Is there a way to restore the old behaviour?
> (The problem is that old scripts break by this change.)
> Maybe for new plots the new canvas.layer could be used,
> but at a quick glance, I could not find and example.
> 
> Best, Arnd
> 
> # <--- snip here
> """Variation of axis.py and jpeg.py
> 
> Run: python axis_with_bitmap.py ; gv axis_with_bitmap.eps
> 
> - PyX 0.12.1: bitmap before function
> - PyX 0.11.1: bitmap behind function
> """
> 
> import pyx
> 
> g = pyx.graph.graphxy(width=8,
>                        x=pyx.graph.axis.log(min=1e-1, max=1e4,
>                                             title=r"$x$-axis"),
>                        y=pyx.graph.axis.lin(max=5, title=r"$y$-axis"))
> 
> g.plot(pyx.graph.data.function("y(x)=tan(log(1/x))**2"))
> 
> img = pyx.bitmap.jpegimage("jpeg.jpg")
> g.insert(pyx.bitmap.bitmap(0, 0, img, compressmode=None))
> 
> g.writeEPSfile("axis_with_bitmap")
> # <--- snip here
> 
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> PyX-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyx-user
> 

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to