<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Georg,<div class=""><br class=""></div><div class="">Thanks for the information. I am still finding my way around this stuff.</div><div class=""><br class=""></div><div class="">Suppose I want a green electron line and the label to be also green. For now I do:</div><div class=""><div class="">fa2 = Fermion(vtx1, out1).addArrow().addLabel(r'$\Pe(k^{\prime})$')</div><div class="">fa2.setStyles([FORESTGREEN])</div><div class="">However, how can I get \Pe to also be green?</div><div class="">I am not sure how to change the pyx.text.defaulttexrunner attributes or where I can find documentation on that.</div><div class=""><br class=""></div><div class="">Another question: Can I draw the diagram on a canvas rather than directly into a file? I see there is a command drawToCanvas(), bit I am not sure if I have to initialise the canvas and if so how?</div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Best Regards</div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Ian</div><div class=""><br class=""></div></div><div class=""><b class="">Ian C. Brock</b> <font color="#0433ff" class="">|</font> Physikalisches Institut, Universität Bonn <font color="#0433ff" class="">|</font> Nußallee 12 <font color="#0433ff" class="">|</font> D-53115 Bonn</div><div style="margin: 0px;" class="">Tel. +49 228 733616 <font color="#0433ff" class="">|</font> Email: <a href="mailto:brock@physik.uni-bonn.de" class="">brock@physik.uni-bonn.de</a></div><div style="margin: 0px;" class=""><br class=""></div></div></div></div></div></div></div></div></div></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 7 Nov 2016, at 13:02, Georg von Hippel <<a href="mailto:hippel@uni-mainz.de" class="">hippel@uni-mainz.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">Dear Ian,<br class=""><br class="">Glad to hear you like PyFeyn! For the particle lines you can use the addStyle method, e.g.<br class=""><br class="">f1 = Fermion(vin1,vout1).addArrow().addStyle(RED).addStyle(THICK3)<br class=""><br class="">gives a fermion line which is red and somewhat thicker than normal. A number of colours and line widths are predefined in pyfeyn.paint, which is<br class="">imported for convenience in pyfeyn.user.<br class=""><br class="">The labels are TeX, so you can use TeX commands within labels, e.g.<br class=""><br class="">Circle(x=4,y=4,radius=1).setFillStyle(RED).addLabel(r"\Large~$\Pi_{\mu\nu}$")<br class=""><br class="">gives a filled red circular blob labelled $\Pi_{\mu\nu}$. Alternatively, you can change the attributes of the pyx.text.defaulttexrunner.<br class=""><br class="">I hope this helps. Don't hesitate to ask in case of further questions.<br class=""><br class="">Best regards,<br class=""><br class=""> Georg<br class=""><br class=""><br class="">On Mon, 24 Oct 2016, Ian Brock wrote:<br class=""><br class=""><blockquote type="cite" class="">Dear PyFeyn,<br class=""><br class="">I am getting used to using PyFeyn - certainly very promising and makes nice graphs.<br class=""><br class="">How can I change the font, size, color etc. of both labels and particles in Feynman graphs?<br class=""><br class="">Best Regards<br class="">Ian<br class=""><br class="">Ian C. Brock | Physikalisches Institut, Universität Bonn | Nußallee 12 | D-53115 Bonn<br class="">Tel. +49 228 733616 | Email: <a href="mailto:brock@physik.uni-bonn.de" class="">brock@physik.uni-bonn.de</a><br class=""></blockquote><br class="">-- <br class="">===========================================================================<br class=""><br class=""> PD Dr. Georg von Hippel<br class=""> Institut für Kernphysik Office: 2-100<br class=""> Johannes Gutenberg-Universität Mainz Phone: +49 6131 39-22933<br class=""> Johann-Joachim-Becher-Weg 45 Fax: +49 6131 39-22964<br class=""> 55099 Mainz Email: <a href="mailto:hippel@uni-mainz.de" class="">hippel@uni-mainz.de</a><br class=""> Germany <a href="http://wwwth.kph.uni-mainz.de/1205.php" class="">wwwth.kph.uni-mainz.de/1205.php</a><br class=""><br class="">===========================================================================<br class=""></div></div></blockquote></div><br class=""></div></body></html>