Skip to content

Conversation

almarklein
Copy link
Member

@almarklein almarklein commented Mar 21, 2024

Changes the pixel ratio logic again (see e.g. #638).

  • If the renderer.pixel_ratio is set to None, this will now follow the canvas' ratio, e.g. as it moves to a different screen, instead of staying fixed to whatever it was at the start.
  • Fixes the raising of a ZeroDivisionException in the notebook, because the initial size of the canvas is (0, 0).

@kushalkolar have you seen that bug before? Perhaps you just set an explicit pixel_ratio to prevent it?

Implementation notes

  • The self._pixel_ratio is not used outside of the property anymore.
  • It is set to None to mean "auto mode".
  • So renderer.pixel_ratio may change in the background, but it still always produces a value (so this pr does not undo Renderer.pixel_ratio always has a value #638).

@almarklein almarklein requested a review from Korijn as a code owner March 21, 2024 12:18
@kushalkolar
Copy link
Contributor

kushalkolar commented Mar 21, 2024

@kushalkolar have you seen that bug before? Perhaps you just set an explicit pixel_ratio to prevent it?

Yup, we set it to 2 by default few weeks ago: fastplotlib/fastplotlib#412

Looks like we can remove it now and it will auto track

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants