Dear Gert,
setting the last value of the 'c' data to None (i.e. data = [('a', 0, 2), ('b',
2, 3), ('c', 2, None)] ) will suppress the drawing of this zero height box.
However, if the box height is zero, it is painted resulting in the output you
observe. Setting the line width to zero generally means stroking a "hairline",
i.e. the thinnest line possible for the output device.I think PyX is behaving properly here. Maybe I'm alone with this opinion, but I would like to have some magical "remove zero height" boxes. Maybe, to serve both opinions, we could add a flag to alter this behavior. Would you favor this? Also I would greatly acknowledge feedback by other users. Best, André Am 17.06.2015 um 22:14 schrieb Gert-Ludwig Ingold <[email protected]>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Dear André, dear Jörg, > > while playing around with stacked bars, I came across a case where the > stack height is zero. When I try to suppress the borders, I still get > a thin line for the stack of zero height. Suppressing the borders by > setting the linewidth to zero did not help either because a very thin > line (1 pixel?) remained. As a minimal example, I modified the code > from the examples: > > from pyx import * > > data = [('a', 0, 2), ('b', 2, 3), ('c', 2, 2)] > > g = graph.graphxy(width=14, height=6, x=graph.axis.bar()) > g.plot(graph.data.points(data, xname=1, y=2, stack=3), > [graph.style.bar([deco.stroked([])]), > graph.style.stackedbarpos("stack"), > graph.style.bar([color.rgb.green, deco.stroked([])]), > ]) > g.writePDFfile() > > My problem is with the thin green line in the third bar. > > Shouldn't the bar graph avoid drawing anything if the height is zero? > > Best regards, > Gert > > - -- > Gert-Ludwig Ingold email: [email protected] > 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 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1 > > iEYEARECAAYFAlWB1ToACgkQ4E2iM4b/WpMrfgCguMiNg5IWwbPYu0nhPmV7jobk > QXgAoNzb+ujqbzYrA/v0NAtJ66+a/761 > =cIHK > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------------ > _______________________________________________ > 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/
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------
_______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
