JuliaPlots / PlotlyJS.jl

Julia library for plotting with plotly.js
Other
413 stars 77 forks source link

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

Open empet opened 12 months ago

empet commented 12 months ago

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))