|
[PyFeyn] PyFeyn adjust fontsIan Brock brock at physik.uni-bonn.deTue Nov 15 14:54:48 GMT 2016
Hi Georg, Thanks for the information. I am still finding my way around this stuff. Suppose I want a green electron line and the label to be also green. For now I do: fa2 = Fermion(vtx1, out1).addArrow().addLabel(r'$\Pe(k^{\prime})$') fa2.setStyles([FORESTGREEN]) However, how can I get \Pe to also be green? I am not sure how to change the pyx.text.defaulttexrunner attributes or where I can find documentation on that. 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? Best Regards Ian Ian C. Brock | Physikalisches Institut, Universität Bonn | Nußallee 12 | D-53115 Bonn Tel. +49 228 733616 | Email: brock at physik.uni-bonn.de <mailto:brock at physik.uni-bonn.de> > On 7 Nov 2016, at 13:02, Georg von Hippel <hippel at uni-mainz.de> wrote: > > > Dear Ian, > > Glad to hear you like PyFeyn! For the particle lines you can use the addStyle method, e.g. > > f1 = Fermion(vin1,vout1).addArrow().addStyle(RED).addStyle(THICK3) > > 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 > imported for convenience in pyfeyn.user. > > The labels are TeX, so you can use TeX commands within labels, e.g. > > Circle(x=4,y=4,radius=1).setFillStyle(RED).addLabel(r"\Large~$\Pi_{\mu\nu}$") > > gives a filled red circular blob labelled $\Pi_{\mu\nu}$. Alternatively, you can change the attributes of the pyx.text.defaulttexrunner. > > I hope this helps. Don't hesitate to ask in case of further questions. > > Best regards, > > Georg > > > On Mon, 24 Oct 2016, Ian Brock wrote: > >> Dear PyFeyn, >> >> I am getting used to using PyFeyn - certainly very promising and makes nice graphs. >> >> How can I change the font, size, color etc. of both labels and particles in Feynman graphs? >> >> Best Regards >> Ian >> >> Ian C. Brock | Physikalisches Institut, Universität Bonn | Nußallee 12 | D-53115 Bonn >> Tel. +49 228 733616 | Email: brock at physik.uni-bonn.de > > -- > =========================================================================== > > PD Dr. Georg von Hippel > Institut für Kernphysik Office: 2-100 > Johannes Gutenberg-Universität Mainz Phone: +49 6131 39-22933 > Johann-Joachim-Becher-Weg 45 Fax: +49 6131 39-22964 > 55099 Mainz Email: hippel at uni-mainz.de > Germany wwwth.kph.uni-mainz.de/1205.php > > =========================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://www.hepforge.org/lists-archive/pyfeyn/attachments/20161115/0a7a0aa8/attachment.html>
More information about the PyFeyn mailing list |