diff -r 8f660d2f4b23 -r 070115c37e6d src/chart.py
|
a
|
b
|
|
| 238 | 239 | if 0.0 <= pos <= 1.0: |
| 239 | 240 | self.yticks.append((pos, label)) |
| 240 | 241 | |
| | 242 | elif self.options.axis.y.interval > 0: |
| | 243 | interval = self.options.axis.y.interval |
| | 244 | label = (divmod(self.minyval, interval)[0] + 1) * interval |
| | 245 | pos = 1.0 - (self.yscale * (label - self.minyval)) |
| | 246 | while 0.0 <= pos <= 1.0: |
| | 247 | self.yticks.append((pos, label)) |
| | 248 | label += interval |
| | 249 | pos = 1.0 - (self.yscale * (label - self.minyval)) |
| | 250 | |
| 241 | 251 | elif self.options.axis.y.tickCount > 0: |
| 242 | 252 | prec = self.options.axis.y.tickPrecision |
| 243 | 253 | num = self.yrange / self.options.axis.y.tickCount |
| … |
… |
|
| 577 | 622 | range=None, |
| 578 | 623 | rotate=None, |
| 579 | 624 | label=None, |
| | 625 | padding=0, |
| 580 | 626 | ), |
| 581 | 627 | y=Option( |
| 582 | 628 | hide=False, |
| 583 | 629 | ticks=None, |
| 584 | 630 | tickCount=10, |
| 585 | 631 | tickPrecision=1, |
| | 632 | interval=0, |
| 586 | 633 | range=None, |
| 587 | 634 | rotate=None, |
| 588 | 635 | label=None, |
| | 636 | padding=0, |
| 589 | 637 | ), |
| 590 | 638 | ), |
| 591 | 639 | background=Option( |