Only draw last uppx cols worth if xy cached on fmtr

multichartz
Tyler Goodlet 2023-02-02 18:16:17 -05:00
parent c2bc01e1ac
commit ff58421565
1 changed files with 24 additions and 22 deletions

View File

@ -934,16 +934,17 @@ class Viz(msgspec.Struct): # , frozen=True):
# the most recent datum is being drawn.
uppx = ceil(gfx.x_uppx())
if (
(self._in_ds or only_last_uppx)
and uppx > 0
):
alt_renderer = self._alt_r
if alt_renderer:
renderer, gfx = alt_renderer
else:
renderer = self._src_r
if (
(self._in_ds or only_last_uppx)
and uppx > 0
and renderer is not None
):
fmtr = renderer.fmtr
x = fmtr.x_1d
y = fmtr.y_1d
@ -952,6 +953,7 @@ class Viz(msgspec.Struct): # , frozen=True):
if alt_renderer:
iuppx = ceil(uppx / fmtr.flat_index_ratio)
if y is not None:
y = y[-iuppx:]
ymn, ymx = y.min(), y.max()
try: