Scales data[1:] to ranges[0]
(self, data, ranges)
| 114 | self.ax.tick_params(axis="both", pad=self.format_cfg["theta_tick_lbls_pad"]) |
| 115 | |
| 116 | def _scale_data(self, data, ranges): |
| 117 | """Scales data[1:] to ranges[0]""" |
| 118 | for d, (y1, y2) in zip(data[1:], ranges[1:]): |
| 119 | assert (y1 <= d <= y2) or (y2 <= d <= y1) |
| 120 | x1, x2 = ranges[0] |
| 121 | d = data[0] |
| 122 | sdata = [d] |
| 123 | for d, (y1, y2) in zip(data[1:], ranges[1:]): |
| 124 | sdata.append((d - y1) / (y2 - y1) * (x2 - x1) + x1) |
| 125 | return sdata |
| 126 | |
| 127 | def plot(self, data, *args, **kwargs): |
| 128 | """Plots a line""" |