You can subscribe to this list here.
2003 |
Jan
(1) |
Feb
(2) |
Mar
(6) |
Apr
(11) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(15) |
Oct
(12) |
Nov
(11) |
Dec
(18) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(57) |
Feb
(16) |
Mar
(3) |
Apr
(14) |
May
(35) |
Jun
(41) |
Jul
(19) |
Aug
(25) |
Sep
(14) |
Oct
(36) |
Nov
(41) |
Dec
(29) |
2005 |
Jan
(44) |
Feb
(21) |
Mar
(17) |
Apr
(45) |
May
(23) |
Jun
(26) |
Jul
(30) |
Aug
(9) |
Sep
(120) |
Oct
(34) |
Nov
(17) |
Dec
(6) |
2006 |
Jan
(23) |
Feb
(56) |
Mar
(78) |
Apr
(14) |
May
(87) |
Jun
(52) |
Jul
(69) |
Aug
(41) |
Sep
(53) |
Oct
(37) |
Nov
(8) |
Dec
(17) |
2007 |
Jan
(32) |
Feb
(3) |
Mar
(21) |
Apr
(29) |
May
(14) |
Jun
(9) |
Jul
(30) |
Aug
(26) |
Sep
(6) |
Oct
(9) |
Nov
(7) |
Dec
(6) |
2008 |
Jan
(9) |
Feb
(19) |
Mar
(46) |
Apr
(44) |
May
(28) |
Jun
(32) |
Jul
(37) |
Aug
(14) |
Sep
(7) |
Oct
(3) |
Nov
(15) |
Dec
(3) |
2009 |
Jan
|
Feb
(6) |
Mar
(7) |
Apr
|
May
(20) |
Jun
(8) |
Jul
(5) |
Aug
(6) |
Sep
|
Oct
(45) |
Nov
(8) |
Dec
(20) |
2010 |
Jan
(3) |
Feb
(1) |
Mar
(12) |
Apr
|
May
(3) |
Jun
(12) |
Jul
(1) |
Aug
(2) |
Sep
(3) |
Oct
(11) |
Nov
(5) |
Dec
(6) |
2011 |
Jan
(4) |
Feb
|
Mar
|
Apr
(13) |
May
(9) |
Jun
(12) |
Jul
(12) |
Aug
(2) |
Sep
(11) |
Oct
(8) |
Nov
(2) |
Dec
(16) |
2012 |
Jan
(23) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(7) |
Nov
|
Dec
(3) |
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
(7) |
Jun
(6) |
Jul
(2) |
Aug
(12) |
Sep
|
Oct
(3) |
Nov
|
Dec
(3) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2015 |
Jan
|
Feb
(5) |
Mar
(5) |
Apr
(1) |
May
(7) |
Jun
(28) |
Jul
(9) |
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(10) |
2016 |
Jan
(16) |
Feb
(6) |
Mar
|
Apr
|
May
(9) |
Jun
(5) |
Jul
(6) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(5) |
Mar
(3) |
Apr
(4) |
May
(7) |
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
(5) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(6) |
Jul
(5) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
(5) |
Mar
(3) |
Apr
|
May
(9) |
Jun
(4) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rba...@mu...> - 2017-03-22 14:49:13
|
2017.03.22 Hell-oh, Is there a way to use music fonts? How to do? merci et a+ René |
From: Michael J G. <mic...@fa...> - 2017-02-23 09:12:02
|
Hi there, you cannot set the bbox for a canvas - it is computed automatically from its contents: http://pyx.sourceforge.net/manual/canvas.html#canvas.canvas.bbox It becomes relevant, though, only when you construct a page from the canvas, which by defaults uses that bbox (possibly enlarged), but you can tell the page constructor to use any bbox that you like: http://pyx.sourceforge.net/manual/document.html#class-page Note that when you write a canvas to a file "directly", the page (and document) constructor gets called under the hood, and can pass a bbox argument to the page constructor as described here: http://pyx.sourceforge.net/manual/canvas.html#canvas.canvas.writeEPSfile HTH. Michael rba...@mu... venit, vidit, dixit 23.02.2017 08:13: > > 2017.02.22 > > Moin-Moin (Salut, Hello, ...) > > How to set the bbox in a canvas? > > ------------ meine nicht schöne Lösung: > 2 sehr dünne Linien zufügen > > sV = path.line(0.0, y0, 0.0, y0 + hauteur) > sH = path.line(0.0, y0, 22.0, y0) > cblanc.stroke(sV, [style.linewidth(0.002)]) > cblanc.stroke(sH, [style.linewidth(0.002)]) > -------------- > > a+ > > René > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user > |
From: <rba...@mu...> - 2017-02-23 07:13:19
|
2017.02.22 Moin-Moin (Salut, Hello, ...) How to set the bbox in a canvas? ------------ meine nicht schöne Lösung: 2 sehr dünne Linien zufügen sV = path.line(0.0, y0, 0.0, y0 + hauteur) sH = path.line(0.0, y0, 22.0, y0) cblanc.stroke(sV, [style.linewidth(0.002)]) cblanc.stroke(sH, [style.linewidth(0.002)]) -------------- a+ René |
From: René B. <rba...@mu...> - 2017-02-16 18:44:53
|
Le Mon, 13 Feb 2017 15:16:36 -0500, "Alan G. Isaac" <ai...@am...> a écrit : > On 2/13/2017 2:34 PM, René Bastian wrote: > > AttributeError: 'canvas' object has no attribute 'outputPDF' > > > > writePDFfile > http://pyx.sourceforge.net/manual/canvas.html > > hth, > Alan Isaac > Merci Alan, en fait: confusion entre insert et stroke canvas.insert(canvasitem, ...) canvas.stroke(path, ...) -- René Bastian www.pythoneon.org |
From: Alan G. I. <ai...@am...> - 2017-02-13 20:16:50
|
On 2/13/2017 2:34 PM, René Bastian wrote: > AttributeError: 'canvas' object has no attribute 'outputPDF' writePDFfile http://pyx.sourceforge.net/manual/canvas.html hth, Alan Isaac |
From: René B. <rba...@mu...> - 2017-02-13 20:03:56
|
Guten Abend, File "t_staff.py", line 313, in <module> test6() File "t_staff.py", line 271, in test6 page.writePDFfile("g6_staff") File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 50, in wrappedindocument return method(d, file, **write_kwargs) File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 193, in writePDFfile pdfwriter.PDFwriter(self, f, **kwargs) File "/home/rbm/Python/PyX-0.14.1/pyx/pdfwriter.py", line 316, in __init__ catalog = PDFcatalog(document, self, registry) File "/home/rbm/Python/PyX-0.14.1/pyx/pdfwriter.py", line 143, in __init__ self.PDFpages = PDFpages(document, writer, registry) File "/home/rbm/Python/PyX-0.14.1/pyx/pdfwriter.py", line 202, in __init__ page = PDFpage(page, pageno, self, writer, registry) File "/home/rbm/Python/PyX-0.14.1/pyx/pdfwriter.py", line 236, in __init__ self.PDFcontent = PDFcontent(page, writer, self.pageregistry) File "/home/rbm/Python/PyX-0.14.1/pyx/pdfwriter.py", line 268, in __init__ page.processPDF(contentfile, awriter, acontext, registry, self.bbox) File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 135, in processPDF self._process("processPDF", *args) File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 129, in _process getattr(cc, processMethod)(contentfile, writer, context, registry, bbox) File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 238, in processPDF item.processPDF(file, writer, context, registry, nbbox) File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 238, in processPDF item.processPDF(file, writer, context, registry, nbbox) File "/home/rbm/Python/PyX-0.14.1/pyx/deco.py", line 238, in processPDF fillpath.outputPDF(file, writer) AttributeError: 'canvas' object has no attribute 'outputPDF' was habe ich falsch gemacht? mit meinen besten Grüssen, rené -- René Bastian www.pythoneon.org |
From: Brett R. <bra...@ia...> - 2016-09-14 19:23:03
|
Hello all, I am new to PyX and I am trying to run a simple script to test the Tex interpreter. My code is simply: from pyx import * c = canvas.canvas() c.text(0, 0, "Hello World!") The I receive the following in the terminal: Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\bramirez\AppData\Local\Continuum\Miniconda2\envs\py27\lib\threading.py", line 801, in __bootstrap_inner self.run() File "C:\Users\bramirez\AppData\Local\Continuum\Miniconda2\envs\py27\lib\site-packages\pyx\text.py", line 663, in run raise RuntimeError("TeX/LaTeX finished unexpectedly") RuntimeError: TeX/LaTeX finished unexpectedly I am running Pyhton 2.7.12 in a Conda environment, PyX version 0.12.1. I also MikTex installed. Any suggestions on what the issue could be? Thank you for your help; Brett |
From: Michael H. <mi...@sp...> - 2016-07-11 12:09:36
|
Hallo André, Hallo Jörg, > Sorry for the late answer. We investigated the issue and finally could > reproduce it on a recent version of Ubuntu. It turns out that pdftex is > sensitive to the number format of the font descriptor values StemV. It only > works for integer. We checked in a workaround to use integers (see > changeset 3682, https://sourceforge.net/p/pyx/code/3682/) and also reported > the issue to the pdftex folks at pd...@tu... (not yet visible in the > list archive http://tug.org/pipermail/pdftex/2016-July/thread.html). Thank you very much for investigating the problem, reporting the bug to pdftex, and finding a workaround! :) Best, --Michael |
From: André W. <wo...@us...> - 2016-07-10 22:36:02
|
Hi Michael, Sorry for the late answer. We investigated the issue and finally could reproduce it on a recent version of Ubuntu. It turns out that pdftex is sensitive to the number format of the font descriptor values StemV. It only works for integer. We checked in a workaround to use integers (see changeset 3682, https://sourceforge.net/p/pyx/code/3682/) and also reported the issue to the pdftex folks atp...@tu... (not yet visible in the list archive http://tug.org/pipermail/pdftex/2016-July/thread.html). Best, Jörg and André Am 27.05.2016 um 09:21 schrieb Michael Hartmann <mi...@sp...>: > Hello, > > I've had a strange problem regarding a PyX plot last week. I don't know if > it's the fault of PyX, but I want to report the problem anyhow. > > When I try to include a PDF created by PyX in a LaTeX document using > \includegraphics, pdflatex aborts. > > The PDF is created by this code (the code is attached: plot.py: the output is > also attached: plot.pdf): > > 1 from pyx import * > 2 > 3 text.set(text.LatexRunner) > 4 text.preamble(r"\usepackage{mathabx}") > 5 > 6 c = canvas.canvas() > 7 c.text(0,0, r"$\widebar{X}$") > 8 c.writePDFfile() > > I load the mathabx package, create a canvas and write \widebar{X} to the > canvas. PyX creates a PDF which looks fine to me in several PDF viewers > (okular, evince, xpdf). However, I get the warning: > > "We are about to extract font information for the Type 1 font 'TeX-mathx10' > from its pfb file. This is bad practice (and it's slow). You should use an afm > file instead." > > If I now try to include this PDF in a LaTeX document (see attachement > text.tex), pdflatex crashes and prints the error: > > "<plot.pdf, id=1, 11.07693pt x 10.43765pt> <use plot.pdf> [1{/var/lib/texmf/font > s/map/pdftex/updmap/pdftex.map} <./plot.pdfInternal Error (0): Call to Object > where the object was type 2, not the expected type 1 > > I've solved my problem by not using \widebar. But I don't know if this is a > problem of mathabx, of PyX or pdflatex. Unfortunately, I don't know how one > can check if a PDF file is valid. > > I use PyX 0.14 and pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) on > Debian 8.4. > > Best whishes, > > --Michael > <plot.pdf><plot.py><text.tex>------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e_______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user -- by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript and PDF figures (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/ |
From: André W. <wo...@us...> - 2016-07-10 22:35:55
|
Hi, Am 10.07.2016 um 00:22 schrieb Alan G. Isaac <ai...@am...>: > 1. I have some EPS figures. I'd like to import them into PyX, > add labels, and end up with PDFs. > > I believe the way to do this currently is is to import > the EPS, add labels, export as EPS, and use GhostScript > to convert the format to PDF. Will I reliably end up > with a vector graphic this way? Yes, this will work and should work reliably. > 2. If instead I try to export as PDF with an embedded > EPS, will PyX insert a bitmap? Indeed, as kind a kind of a poor man's solution, PyX can embed EPS in PDF by converting the EPS to a bitmap also using ghostscript. I was hoping for the use > of as PostScript XObject, but it looks like Adobe has > deprecated this. (Is it officially deprecated or just > discouraged?) So maybe XObject has lost its utility > for this purpose. We know about the XObject solution, which however is not well supported by PDF renders. > 3. Are you (the developers) still working on PDF import? > Is an experimental version available? This is not easy and requires quite some work. It is still on your TODO list. Best, Jörg and André > > Thanks! > Alan Isaac > > ------------------------------------------------------------------------------ > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > present their vision of the future. This family event has something for > everyone, including kids. Get more information and register today. > http://sdm.link/attshape > _______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user -- by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript and PDF figures (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/ |
From: Alan G. I. <ai...@am...> - 2016-07-09 22:23:01
|
1. I have some EPS figures. I'd like to import them into PyX, add labels, and end up with PDFs. I believe the way to do this currently is is to import the EPS, add labels, export as EPS, and use GhostScript to convert the format to PDF. Will I reliably end up with a vector graphic this way? 2. If instead I try to export as PDF with an embedded EPS, will PyX insert a bitmap? I was hoping for the use of as PostScript XObject, but it looks like Adobe has deprecated this. (Is it officially deprecated or just discouraged?) So maybe XObject has lost its utility for this purpose. 3. Are you (the developers) still working on PDF import? Is an experimental version available? Thanks! Alan Isaac |
From: Alan G. I. <ai...@am...> - 2016-07-06 14:56:20
|
Here are two enhancements that would make my life a little easier. 1. Whenever PyX returns a point, it returns a tuple of pyx.unit.length objects. It would be nice if this were a subclass of tuple that supported vector addition and scalar multiplication. (This would be backward compatible.) 2. When I want to collect path info along the way as I construct a path, I currently do partial construction, extract the info (usually the endpoint), append to the path, extract the info again, etc. It would be nice to have a collector object that could just be inserted into the path. This would require `path.path` to grow a method for retrieving the collector sequence. Since some info is expensive, the collectors should be able to specify what is collected. For example, if the collectors were just dicts, examples might be dict(arclen=True,atend=True) dict(path=True) The returned dictionaries update only the specified info, in the second example holding the path constructed up to that point. Cheers, Alan Isaac |
From: Alan G. I. <ai...@am...> - 2016-07-06 12:53:34
|
More user feedback. Please consider adding this to the first paragraph of the `Class canvas` documentation. Note that the writeXXX methods of a canvas construct a single page document, passing kwargs to the document.page constructor and to the `writeXXX` method of a document.document instance. (To pass a `page` kwarg, preface it with `page_`; to pass a `write` kwarg`, preface it with `write_`. Also, please consider augmenting the interface. It would be better from this user's perspective to provide keywords `page` and `write` that would each accept a dict of appropriate keywords (without the prefixes). Thanks! Alan Isaac |
From: René B. <rba...@mu...> - 2016-06-07 09:59:27
|
Le Tue, 7 Jun 2016 09:40:16 +0200, Gert-Ludwig Ingold <ger...@ph...> a écrit : > Hallo René, > > >> do you mean something like the clipping done in this example: > >> http://pyx.sourceforge.net/examples/drawing2/clipping.html ? > > > > Jein :) > > > > yes if the remaining of black rectangle disappears; > > no otherwise. > > Probably, the example is already too complex for your question because > it inserts the clipped canvas (cl) into another canvas (c). How about > the following? > > > from pyx import * > > clippath = path.circle(0, 0, 1) > drawpath = path.line(-2, -2, 1.2, 2) > > c = canvas.canvas([canvas.clip(clippath)]) > c.stroke(drawpath, [color.rgb.red, style.linewidth(1.0)]) > > c.writeEPSfile("clipping") > c.writePDFfile("clipping") > c.writeSVGfile("clipping") > > > That is probably what you are aiming at. Yes! Many thanks to you and to PyX! René > > > It is possible to crop with external means (convert from > > ImageMagick or PyPDF2). > > That should not be necessary. > > Best regards, > Gert > -- René Bastian www.pythoneon.org |
From: Gert-Ludwig I. <ger...@ph...> - 2016-06-07 07:40:34
|
Hallo René, >> do you mean something like the clipping done in this example: >> http://pyx.sourceforge.net/examples/drawing2/clipping.html ? > > Jein :) > > yes if the remaining of black rectangle disappears; > no otherwise. Probably, the example is already too complex for your question because it inserts the clipped canvas (cl) into another canvas (c). How about the following? from pyx import * clippath = path.circle(0, 0, 1) drawpath = path.line(-2, -2, 1.2, 2) c = canvas.canvas([canvas.clip(clippath)]) c.stroke(drawpath, [color.rgb.red, style.linewidth(1.0)]) c.writeEPSfile("clipping") c.writePDFfile("clipping") c.writeSVGfile("clipping") That is probably what you are aiming at. > It is possible to crop with external means (convert from ImageMagick or > PyPDF2). That should not be necessary. Best regards, Gert -- Gert-Ludwig Ingold email: Ger...@Ph... Institut für Physik Phone: +49-821-598-3234 Universität Augsburg Fax : +49-821-598-3222 D-86135 Augsburg WWW : www.physik.uni-augsburg.de/theo1/ingold Germany PGP : 86FF5A93, key available from homepage |
From: René B. <rba...@mu...> - 2016-06-07 07:29:00
|
Le Tue, 7 Jun 2016 08:04:33 +0200, Gert-Ludwig Ingold <ger...@ph...> a écrit : > Dear René, > > > Is there a PyX-way to crop a [(x0,y0), (x1,y1)] out of a PyX-graphic > > (eps, pdf or svg)? > Vielen Dank, Gert, > do you mean something like the clipping done in this example: > http://pyx.sourceforge.net/examples/drawing2/clipping.html ? Jein :) yes if the remaining of black rectangle disappears; no otherwise. crop : (ausschneiden, découper, extraire), It is possible to crop with external means (convert from ImageMagick or PyPDF2). > > Best regards, > Gert > -- René Bastian www.pythoneon.org |
From: Gert-Ludwig I. <ger...@ph...> - 2016-06-07 06:04:59
|
Dear René, > Is there a PyX-way to crop a [(x0,y0), (x1,y1)] out of a PyX-graphic > (eps, pdf or svg)? do you mean something like the clipping done in this example: http://pyx.sourceforge.net/examples/drawing2/clipping.html ? Best regards, Gert -- Gert-Ludwig Ingold email: Ger...@Ph... Institut für Physik Phone: +49-821-598-3234 Universität Augsburg Fax : +49-821-598-3222 D-86135 Augsburg WWW : www.physik.uni-augsburg.de/theo1/ingold Germany PGP : 86FF5A93, key available from homepage |
From: <rba...@mu...> - 2016-06-07 05:56:52
|
2016.06.07 Hallo PyX, Is there a PyX-way to crop a [(x0,y0), (x1,y1)] out of a PyX-graphic (eps, pdf or svg)? Merci & Servus, René Bastian www.pythoneon.org |
From: Gert-Ludwig I. <ger...@ph...> - 2016-05-27 09:14:24
|
Salut René, > ---------------------------- > <pyx.bbox.bbox_pt object at 0x7fee43d964e0> > (0.000000 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m > (0.000000 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m > (0.030000 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m > (0.020000 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m > ----------------------------- > What is t, u, v, w, x and m? PyX has a concept of different length types which is nice because it allows for independent scaling of different aspects of the plot. In short, the letters have the following meaning: t true length u lengths of graphical objects like positions etc. v sizes of visual elements, like arrows, graph symbols, axis ticks, etc. w line widths x length of TeX and LaTeX output m meter See also: http://pyx.sourceforge.net/manual/unit.html#class-length Your bounding box thus has a size of 3cm x 2cm. Best regards, Gert -- Gert-Ludwig Ingold email: Ger...@Ph... Institut für Physik Phone: +49-821-598-3234 Universität Augsburg Fax : +49-821-598-3222 D-86135 Augsburg WWW : www.physik.uni-augsburg.de/theo1/ingold Germany PGP : 86FF5A93, key available from homepage |
From: <rba...@mu...> - 2016-05-27 08:31:26
|
2016.05.27 Bonjour tous, I need infos about the bounding box. The script -------------------------- l1 = path.line(0,0,3,2) b1 = l1.bbox() print(b1) print(b1.left()) print(b1.bottom()) print(b1.width()) print(b1.height()) ---------------------------- prints: ---------------------------- <pyx.bbox.bbox_pt object at 0x7fee43d964e0> (0.000000 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m (0.000000 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m (0.030000 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m (0.020000 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m ----------------------------- What is t, u, v, w, x and m? Merci pour tout René Bastian |
From: Michael H. <mi...@sp...> - 2016-05-27 07:40:09
|
Hello, I've had a strange problem regarding a PyX plot last week. I don't know if it's the fault of PyX, but I want to report the problem anyhow. When I try to include a PDF created by PyX in a LaTeX document using \includegraphics, pdflatex aborts. The PDF is created by this code (the code is attached: plot.py: the output is also attached: plot.pdf): 1 from pyx import * 2 3 text.set(text.LatexRunner) 4 text.preamble(r"\usepackage{mathabx}") 5 6 c = canvas.canvas() 7 c.text(0,0, r"$\widebar{X}$") 8 c.writePDFfile() I load the mathabx package, create a canvas and write \widebar{X} to the canvas. PyX creates a PDF which looks fine to me in several PDF viewers (okular, evince, xpdf). However, I get the warning: "We are about to extract font information for the Type 1 font 'TeX-mathx10' from its pfb file. This is bad practice (and it's slow). You should use an afm file instead." If I now try to include this PDF in a LaTeX document (see attachement text.tex), pdflatex crashes and prints the error: "<plot.pdf, id=1, 11.07693pt x 10.43765pt> <use plot.pdf> [1{/var/lib/texmf/font s/map/pdftex/updmap/pdftex.map} <./plot.pdfInternal Error (0): Call to Object where the object was type 2, not the expected type 1 I've solved my problem by not using \widebar. But I don't know if this is a problem of mathabx, of PyX or pdflatex. Unfortunately, I don't know how one can check if a PDF file is valid. I use PyX 0.14 and pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) on Debian 8.4. Best whishes, --Michael |
From: Brendon H. <blh...@gm...> - 2016-05-16 19:34:56
|
Thanks, Andre! That does seem to have done the trick for me, too. Peace, Brendon On May 7, 2016 23:52:45 André Wobst wrote: > Hi Brendon, > > it's an interesting problem. I could reproduce it on a fresh Ubuntu 16.04 > install (which I was about to setup for myself anyway). It turns out that > for that case a virtual font within a virtual font is to be used, which PyX > didn't support yet. Adding it was surprisingly easy, please find by fix in > changeset 3678. This resolves the issue for me, it probably does so for you > as well. > > Best, > > > André > > Am 06.05.2016 um 19:38 schrieb Brendon Higgins <blh...@gm...>: > > Hi list, > > > > I can't make heads nor tails of this weird problem I'm seeing while trying > > to use newtx fonts. Here's a minimized example that causes the problem > > for me: > > > > from pyx import * > > text.set(cls=text.LatexRunner) > > text.preamble(r'''\usepackage{newtxtext,newtxmath}''') > > c = canvas.canvas() > > c.text(0, 0, r"Remove the period to make this work: $12.45$") > > c.writePDFfile("test") > > > > If I run this, at the final line I get "RuntimeError: missing font > > information for 'txmi'; check fontmapping file(s)". If I remove the > > period, everything works great - no problem with numbers. It also works > > fine if I don't use math mode. I did notice that if I replace the numbers > > with "$\alpha$" the problem comes back, but I haven't found a pattern to > > the behaviour (e.g. "$\in$" is fine). > > > > Perhaps it's just my installation/distribution that has a problem. (I'm > > using Debian testing, for what it's worth.) The error message says "check > > fontmapping file(s)", but I have no clue where to start! I'm already in > > way over my head with TeX's font system, so insight is much appreciated. > > :) > > > > Peace, > > Brendon > > > > -------------------------------------------------------------------------- > > ---- Find and fix application performance issues faster with Applications > > Manager Applications Manager provides deep performance insights into > > multiple tiers of your business applications. It resolves application > > problems quickly and reduces your MTTR. Get your free trial! > > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > > _______________________________________________ > > PyX-user mailing list > > PyX...@li... > > https://lists.sourceforge.net/lists/listinfo/pyx-user |
From: André W. <wo...@us...> - 2016-05-09 06:37:42
|
Hi, multilinto_pt is a path element, not a path. You cannot stroke path elements, for example: from pyx import * c = canvas.canvas() c.stroke(path.path(path.moveto(0, 0), path.lineto(1, 0))) # works c.stroke(path.path(path.moveto(0, 0), path.multilineto_pt([(1, 0)]))) # works as well c.stroke(path.lineto(1, 0)) # fails c.stroke(path.multilineto_pt([(1, 0)])) # fails as well c.writePDFfile() Best, André Am 08.05.2016 um 11:50 schrieb René Bastian <rba...@mu...>: > The same with path.path(path.moveto(...), path.lineto(...), ...) > works. > > rb > > Le Sun, 08 May 2016 08:07:02 -0000, > rba...@mu... a écrit : > >> >> 2016.05.07 >> >> Hallo André & Cie, >> >> Woas isch do loos? >> >> def ligature(self, pt, duree, h0, h1): >> dh = 0.2 >> x0 = unit.topt(pt) >> x1 = unit.topt(pt + duree) >> y00 = unit.topt(h0) >> y01 = unit.topt(h0 - dh) >> y10 = unit.topt(h1) >> y11 = unit.topt(h1 - dh) >> s = path.multilineto_pt([x0, y00, x0, y01, x1, y11, x1, y10, >> x0, y00]) self.c.stroke(s) >> >> File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 50, in >> wrappedindocument return method(d, file, **write_kwargs) >> File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 185, in >> writeEPSfile pswriter.EPSwriter(self, f, **kwargs) >> File "/home/rbm/Python/PyX-0.14.1/pyx/pswriter.py", line 142, in >> __init__ page.processPS(pagefile, self, acontext, registry, pagebbox) >> File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 132, in >> processPS self._process("processPS", *args) >> File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 78, in >> _process bbox.set(self.canvas.bbox()) # this bbox is not accurate >> File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 179, in bbox >> obbox += cmd.bbox() >> File "/home/rbm/Python/PyX-0.14.1/pyx/deco.py", line 101, in bbox >> pathbbox = self.path.bbox() >> AttributeError: 'multilineto_pt' object has no attribute 'bbox' >> >> @+ >> >> rb >> >> ------------------------------------------------------------------------------ >> Find and fix application performance issues faster with Applications >> Manager Applications Manager provides deep performance insights into >> multiple tiers of your business applications. It resolves application >> problems quickly and reduces your MTTR. Get your free trial! >> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z >> _______________________________________________ >> PyX-user mailing list >> PyX...@li... >> https://lists.sourceforge.net/lists/listinfo/pyx-user > > > > -- > René Bastian > www.pythoneon.org > > ------------------------------------------------------------------------------ > Find and fix application performance issues faster with Applications Manager > Applications Manager provides deep performance insights into multiple tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > _______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user -- by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim / \ \ / ) wo...@us..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript and PDF figures (_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/ |
From: René B. <rba...@mu...> - 2016-05-08 09:54:21
|
The same with path.path(path.moveto(...), path.lineto(...), ...) works. rb Le Sun, 08 May 2016 08:07:02 -0000, rba...@mu... a écrit : > > 2016.05.07 > > Hallo André & Cie, > > Woas isch do loos? > > def ligature(self, pt, duree, h0, h1): > dh = 0.2 > x0 = unit.topt(pt) > x1 = unit.topt(pt + duree) > y00 = unit.topt(h0) > y01 = unit.topt(h0 - dh) > y10 = unit.topt(h1) > y11 = unit.topt(h1 - dh) > s = path.multilineto_pt([x0, y00, x0, y01, x1, y11, x1, y10, > x0, y00]) self.c.stroke(s) > > File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 50, in > wrappedindocument return method(d, file, **write_kwargs) > File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 185, in > writeEPSfile pswriter.EPSwriter(self, f, **kwargs) > File "/home/rbm/Python/PyX-0.14.1/pyx/pswriter.py", line 142, in > __init__ page.processPS(pagefile, self, acontext, registry, pagebbox) > File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 132, in > processPS self._process("processPS", *args) > File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 78, in > _process bbox.set(self.canvas.bbox()) # this bbox is not accurate > File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 179, in bbox > obbox += cmd.bbox() > File "/home/rbm/Python/PyX-0.14.1/pyx/deco.py", line 101, in bbox > pathbbox = self.path.bbox() > AttributeError: 'multilineto_pt' object has no attribute 'bbox' > > @+ > > rb > > ------------------------------------------------------------------------------ > Find and fix application performance issues faster with Applications > Manager Applications Manager provides deep performance insights into > multiple tiers of your business applications. It resolves application > problems quickly and reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > _______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user -- René Bastian www.pythoneon.org |
From: <rba...@mu...> - 2016-05-08 08:37:15
|
2016.05.07 Hallo André & Cie, Woas isch do loos? def ligature(self, pt, duree, h0, h1): dh = 0.2 x0 = unit.topt(pt) x1 = unit.topt(pt + duree) y00 = unit.topt(h0) y01 = unit.topt(h0 - dh) y10 = unit.topt(h1) y11 = unit.topt(h1 - dh) s = path.multilineto_pt([x0, y00, x0, y01, x1, y11, x1, y10, x0, y00]) self.c.stroke(s) File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 50, in wrappedindocument return method(d, file, **write_kwargs) File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 185, in writeEPSfile pswriter.EPSwriter(self, f, **kwargs) File "/home/rbm/Python/PyX-0.14.1/pyx/pswriter.py", line 142, in __init__ page.processPS(pagefile, self, acontext, registry, pagebbox) File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 132, in processPS self._process("processPS", *args) File "/home/rbm/Python/PyX-0.14.1/pyx/document.py", line 78, in _process bbox.set(self.canvas.bbox()) # this bbox is not accurate File "/home/rbm/Python/PyX-0.14.1/pyx/canvas.py", line 179, in bbox obbox += cmd.bbox() File "/home/rbm/Python/PyX-0.14.1/pyx/deco.py", line 101, in bbox pathbbox = self.path.bbox() AttributeError: 'multilineto_pt' object has no attribute 'bbox' @+ rb |