From: Ryan K. <rya...@gm...> - 2006-01-21 23:06:08
|
Thanks. This worked perfectly. On 1/21/06, Joerg Lehmann <jo...@us...> wrote: > Hi Ryan, > > On 20.01.06, Ryan Krauss wrote: > > I am new to PyX and am trying to use it for illustrations in my > > thesis. It seems really powerful. > > > > I am trying to draw and arc with arrows on both ends to illustrate a > > swinging motion. > > > > my script starts with > > > > from pyx import * > > > > myasize=3D0.5 > > text.set(mode=3D"latex") > > #text.preamble(r"\usepackage{palatino}") > > myarrow=3Ddeco.arrow(size=3Dmyasize) > > myearrow=3Ddeco.earrow(size=3Dmyasize) > > myblue=3Dcolor.rgb(b=3D0.8,g=3D0.05) > > mylinestyle=3Dstyle.linewidth.Thick > > > > and I later define > > mylinewarrows=3D[mylinestyle,myarrow,myearrow,myblue] > > > > this works great for straight lines but when I try: > > myarc=3Dpath.arc(2.5,8.2,4,250,285) > > An arc is just a subclass of pathitem, i.e., something > which in itself cannot be drawn directly on a canvas. > Instead, you need to wrap it into a path before stroking > it: > > myarc =3D path.path(path.arc(2.5, 8.2, 4, 250, 285)) > > > #c.stroke(myarc,[myblue,mylinestyle]) > > Btw, that this line works, is pure luck ;-) > > J=F6rg > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat= =3D121642 > _______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user > |