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

PlotlyJS.image incorrectly serializes to json the z array of size (d, rows, cols) , d=3, 4 #471

Open
empet opened this issue Jul 23, 2023 · 0 comments

Comments

@empet
Copy link

empet commented Jul 23, 2023

Example:

plt=Plot(image(z=rand(0:255, (3, 6, 4)), colormodel="rgb",  x0=1, y0=1), 
         Layout(width=500, height=335))

wrong-image

To get the right image the following permutedims of the array of size (d, rows, cols) = (3, 6, 4) must be performed:

Plot(image(z=permutedims(rand(0:255, (3, 6, 4)), (1, 3,2)), colormodel="rgb", x0=1, y0=1))
@empet empet changed the title PlotlyJS.image, incorrectly serializes to json the z array of size (d, rows, cols) , d=3 4 PlotlyJS.image incorrectly serializes to json the z array of size (d, rows, cols) , d=3 4 Jul 23, 2023
@empet empet changed the title PlotlyJS.image incorrectly serializes to json the z array of size (d, rows, cols) , d=3 4 PlotlyJS.image incorrectly serializes to json the z array of size (d, rows, cols) , d=3, 4 Jul 23, 2023
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

No branches or pull requests

1 participant