Hi,

transparency is certainly not a good idea, as the length of the line is 
shortened by the arrow. (The arrow is an ornament at the decorated path, and 
excludes parts of the original path from drawing.) Furthermore you will keep 
all the arrow paths in the output; they will just be invisible.

While clearing attributes does look interesting, a deco.arrow.clear in the 
lineattrs does not prevent the arrow from being drawn as the arrow decorator is 
added after the lineattrs. On the other hand it is correct that the line attrs 
are added first, as by that you can for example set the color of the line and 
the arrow by setting a color for the lineattrs. Unfortunately there is a strict 
rule when merging attrs, that an attr can influence preceeding attrs only, but 
not attrs added afterwards. To my mind we should not question this behavior.

The solution Axel proposed in this thread is the way to go. However, you may 
just copy the whole arrow style and remove all arrow stuff from it keeping the 
lines only.

While I think we should not allow for size=None in the arrow decorator, I don't 
see any particular problem to allow arrowsize=0 in the graph.arrow style for a 
very simple solution to your problem. I submitted a patch in changeset 3034, so 
in case you use the SVN version of PyX, just update, set arrowsize to None and 
you're done.

Best,


André


Am 03.12.2010 um 18:49 schrieb William Henney:

> Hi list
> 
> I am trying to produce a vector plot with pyx.graph.style.arrow() in
> which the arrow heads do not appear.
> 
> The only working solution I have found is to put
> 
> pyx.graph.style.arrow(arrowattrs=[pyx.color.transparency(1.0)])
> 
> but this does not seem like a "clean" solution.
> 
> The following two attempted solutions did not work:
> 
> 1. pyx.graph.style.arrow(arrowattrs=[attr.clear])
> 
> File 
> "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/pyx/deco.py",
> line 240, in processPDF
>    raise RuntimeError("Path neither to be stroked nor filled nor
> decorated in another way")
> 
> 2. pyx.graph.style.arrow(arrowsize=0)
> 
> File 
> "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/pyx/normpath.py",
> line 957, in close
>    raise NormpathException("Normsubpath too short, cannot be closed")
> 
> Is there a better way than transparency to achieve this? The reason I
> don't want arrow heads is that the field I am plotting is of
> polarization "vectors", for which there is no distinction between the
> angle theta and the angle (theta + 180 deg).
> 
> Cheers
> 
> Will
> 
> -- 
> 
>   Dr William Henney, Centro de Radioastronomía y Astrofísica,
>   Universidad Nacional Autónoma de México, Campus Morelia
> 
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> PyX-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyx-user

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Compatibility Made Easier than Ever Before
New IBM DB2 features make compatibility easy. In this guide, you'll learn 
about native support for PL/SQL, new data types, scalar functions, improved 
concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best 
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to