Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image flickering when the y-axes is *not* reversed #12

Open
almarklein opened this issue Nov 9, 2020 · 5 comments
Open

Image flickering when the y-axes is *not* reversed #12

almarklein opened this issue Nov 9, 2020 · 5 comments
Labels
bug Something isn't working upstream A bug or feature in e.g. plotly/dash/dcc

Comments

@almarklein
Copy link
Collaborator

almarklein commented Nov 9, 2020

The Image trace is quite efficient when a base64-encoded png is used as the source. However, when the current implementation (of the Image trace in Plotly) needs extra steps (including per-pixel blitting) when the image is not aligned with the screen.

Possible solutions:

@emmanuelle
Copy link
Contributor

I'm not sure I understand all what you wrote, could you please give more details or an example? That said, I remember that for the Image trace the fast image rendering (passing the b64 string directly to the browser) is only performed when the axis is reversed (default case) that is when the origin is represented at the top-left corner. See https://github.com/plotly/plotly.js/blob/master/src/traces/image/plot.js#L18 and https://github.com/plotly/plotly.js/blob/master/src/traces/image/plot.js#L34 (maybe you had already seen this). @antoinerg implemented both the Image trace and the fast image rendering so he's the person to ping for this kind of questions :-).

What is the usecase where we're not happy with a not-reversed y-axis?

@almarklein
Copy link
Collaborator Author

Well, the VolumeSlicer has a reverse_y argument, because sometimes you don't want the y-axis reversed. In fact the example data that I've been using so far is best seen with the origin in the bottom-left.

Also, more generally, I can imagine that users don't expect the performance to depend on the reversed-ness of the axes :)

@almarklein
Copy link
Collaborator Author

plotly/plotly.js#5305

@almarklein
Copy link
Collaborator Author

Fixed in Plotly.js (plotly/plotly.js#5307). I think now we just need to wait for a new release of plotly.js and then a release of plotly.py.

@almarklein almarklein added the bug Something isn't working label Dec 1, 2020
@emmanuelle
Copy link
Contributor

So cool! It should be this week I think, the timing is great.

@almarklein almarklein added the upstream A bug or feature in e.g. plotly/dash/dcc label Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream A bug or feature in e.g. plotly/dash/dcc
Projects
None yet
Development

No branches or pull requests

2 participants