Ok,your example works.  It appears that my issue is specifically with curved text.  Transformations do not seem to apply at all.

Here is a modified example from http://pyx.sourceforge.net/examples/text/textalongpath.html

    from pyx import *

    c = canvas.canvas(attrs=[trafo.mirror()])

    p = path.path(path.moveto(-2, 0), path.curveto(-1, 0, -1, 1, 0, 1), path.curveto(1, 1, 1, 0, 2, 0))

    c.stroke(p, [deco.curvedtext("\PyX{} is fun!", textattrs=[trafo.mirror()]),
                 deco.curvedtext("left", textattrs=[text.halign.left, text.vshift.mathaxis, trafo.mirror()], arclenfrombegin=0.5, exclude=0.1),
                 deco.curvedtext("right", textattrs=[text.halign.right, text.vshift.mathaxis, trafo.mirror()], arclenfromend=0.5, exclude=0.1)])

    c.writePDFfile("textalongpath")


Is this a bug?



On Sat, May 11, 2013 at 4:00 PM, André Wobst <wobsta@users.sourceforge.net> wrote:
Hans,

Sorry, I should have read your question more carefully.

Well, there's probably no other options than applying transformations. A simple example works rather well:

    from pyx import *
    c = canvas.canvas([trafo.mirror()])
    c.stroke(path.line(0, 0, 2, 2))
    c.text(1, 1, "Hello, world!", [trafo.mirror()])
    c.writePDFfile()

Unfortunately, we don't have a hook to apply the mirror trafo to all text boxes. You may define you some convenience method or alter the texrunner instance ... it probably depends on the use-case what is best.


André


Am 11.05.2013 um 22:42 schrieb Hans L:

> I'm not using graphs specifically, I just mean to flip the y orientation of general rendering to a canvas.
>
> Hans
>
>
> On Sat, May 11, 2013 at 3:34 PM, André Wobst <wobsta@users.sourceforge.net> wrote:
> Hi Hans,
>
> You can use the reverse flag of the axis, see http://pyx.sourceforge.net/manual/axis.html#graph.axis.axis.linear, or fix the axis range manually and set max to be smaller than min (which sounds a little crazy, but it perfectly does the trick as well).
>
> HTH, André
>
> Am 11.05.2013 um 21:55 schrieb Hans L:
>
> > Hello, I am new to using PyX and was wondering if it is possible to invert the Y axis so the top left of page is 0,0 and the y value increases as you go towards the bottom of the page?
> >
> > I experimented with passing a trafo to the canvas constructor:
> > trafo.trafo(matrix=((1, 0), (0, -1)), vector=(0, canvasheight))
> >
> > This seems to work ok for graphics, but then of course all text is upside down.
> > I tried applying a similar y flipping transformation to the textattrs to upright it again, but it did not seem to do anything.
> >
> > Is there any simple solution to this?
> >
> > Thanks,
> > Hans
> >
> > ------------------------------------------------------------------------------
> > Learn Graph Databases - Download FREE O'Reilly Book
> > "Graph Databases" is the definitive new guide to graph databases and
> > their applications. This 200-page book is written by three acclaimed
> > leaders in the field. The early access version is available now.
> > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may_______________________________________________
> > PyX-user mailing list
> > PyX-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/pyx-user
>
> --
> by  _ _      _    Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
>    / \ \    / )   wobsta@users.sourceforge.net, http://www.wobsta.de/
>   / _ \ \/\/ /    PyX - High quality PostScript and PDF figures
>  (_/ \_)_/\_/     with Python & TeX: visit http://pyx.sourceforge.net/
>
>

--
by  _ _      _    Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
   / \ \    / )   wobsta@users.sourceforge.net, http://www.wobsta.de/
  / _ \ \/\/ /    PyX - High quality PostScript and PDF figures
 (_/ \_)_/\_/     with Python & TeX: visit http://pyx.sourceforge.net/