Can not display image using plot in spider

import os

import numpy as np

import as skio

print(vol.shape) # vol size (1753,584,1780)




import matplotlib.pyplot as plt


error:Invalid shape (500, 250, 900) for image data and no image on plots its empty

can anybody solve my problem please ? I cant find any solution

Here is the documentation for pyplot.imshow. As you can see there, the expected input image has to have a certain shape.

The image data. Supported array shapes are:

* (M, N): an image with scalar data. The values are mapped to colors using normalization and a colormap. See parameters *norm*, *cmap*, *vmin*, *vmax*.
* (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
* (M, N, 4): an image with RGBA values (0-1 float or 0-255 int), i.e. including transparency.

However, the “image” that you want to plot has the shape 500 x 250 x 900. This means that you have 900 in the third dimension, but only 3 or 4 are supported.

Maybe you can take a look at how the images are stored in order to determine where is one valid image, select it and then you can plot it.