Warning: Can't synchronize with the repository (Unsupported version control system "svn". Check that the Python support libraries for "svn" are correctly installed.)
|
File range_fix.patch, 1.2 kB
(added by aprzywecki@…, 4 years ago)
|
|
fixes bar proportion for single bar with an xrange greater than 0
|
-
|
|
|
|
| 39 | 39 | uniqx = uniqueIndices(stores) |
| 40 | 40 | |
| 41 | 41 | barWidth = 0 |
| 42 | | if len(uniqx) == 1: |
| 43 | | xdelta = 1.0 |
| 44 | | barWidth = 1.0 * self.options.barWidthFillFraction |
| 45 | | self.barWidthForSet = barWidth / len(stores) |
| 46 | | self.barMargin = (1.0 - self.options.barWidthFillFraction) / 2 |
| 47 | | else: |
| 48 | | xdelta = min([abs(uniqx[j] - uniqx[j-1]) |
| 49 | | for j in range(1, len(uniqx))]) |
| 50 | | barWidth = xdelta * self.xscale * self.options.barWidthFillFraction |
| 51 | | self.barWidthForSet = barWidth / len(stores) |
| 52 | | self.barMargin = (xdelta * self.xscale |
| 53 | | * (1.0 - self.options.barWidthFillFraction) / 2) |
| | 42 | xdelta = 1.0 |
| | 43 | barWidth = xdelta * self.xscale * self.options.barWidthFillFraction |
| | 44 | self.barWidthForSet = barWidth / len(stores) |
| | 45 | self.barMargin = (xdelta * self.xscale |
| | 46 | * (1.0 - self.options.barWidthFillFraction) / 2) |
| 54 | 47 | |
| 55 | 48 | self.minxdelta = xdelta |
| 56 | 49 | self.bars = [] |
Download in other formats: