Dear Gert, Am 18.06.2015 um 13:07 schrieb Gert-Ludwig Ingold <[email protected]>: > thanks a lot for your replies. The hint with None helps me to do what > I need. > > It probably could be debated what the expected behavior is. As far as > I understand, None applies only for the last entry in a stack. So one > could keep (2, 2, 3) for three bar pieces but would need to replace > (2, 2) by (2, None). I am not sure whether this is very consistent > although it is of course well defined.
Injecting None into the data does indeed have side effects. If you enable the addontop flag of the stackedbarpos the None value will "propagate" to the bars stacked on top of the "None"-value bar, i.e. it won't be plotted either. But also without the addontop flag enabled the very next bar stacked on top of a bar with ending value set to None will be skipped as well, as this bar doesn't have a "starting" value. Using None really is just a trick here! (And then, yes, this means that we cannot easily do what you want here.) > Having an extra flag like André had proposed, seems very nice from a > user perspective because it avoids the need to write an extra filter > (of course, it would need to be written for PyX). In my present > application, I sometimes encounter data where no problem with boxes of > zero height arises and I would be tempted to forget about filtering. But > the data for next year could be different and I get bitten by not having > implemented a filter. Setting a flag could be done routinely instead. > > Concerning explicit vs. implicit: Of course, I agree that explicit is > better, but I would have expected that a bar of height 0 has zero height > and not a finite height. But I can see your point, Jörg, that other users > might expect to see something rather than nothing and in some cases this > might be the desired behavior. I would suggest to add a flag to the bar style to skip drawing of zero height bars. This should be rather straight forward. However, there is one thing needing some attention, namely the changebar style. I think, skipping the drawing of zero height bars would not mean to skip it from the changing style evaluation. At least this would be my first guess to not take it into account here. But we could do so as well ... :-/ (Maybe this is just a too exotic situation to really take care about at all right here in this discussion.) Best, André -- 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
