imshow Questions
4
Solved
I have an array of images where each image is stored as the following dimension
(3, 32, 32)
if I wanted to show an image using
plt.imshow(img)
then I am getting the following error:
TypeError: ...
Hausfrau asked 16/12, 2020 at 13:42
16
Solved
I need to take an image and save it after some process. The figure looks fine when I display it, but after saving the figure, I got some white space around the saved image. I have tried the 'tight'...
Heterochromatin asked 7/8, 2012 at 1:2
4
Solved
I have a RGB Image, which I plot with matplotlib.pyplot.imshow and it works fine.
But now I want to change the plot, that where the value of the picture is e.g 1, the color of the plot should chang...
3
Solved
I have a matplotlib plot with a colorbar attached. I want to position the colorbar so that it is horizontal, and underneath my plot.
I have almost done this via the following:
plt.colorbar(orient...
Credulity asked 9/11, 2012 at 15:9
3
Solved
I have a medium-sized array (e.g. 1500x3000) that I want to plot at scale since it is an image. However, the vertical and horizontal scales are very different. For simplification let say that there...
Superfamily asked 16/10, 2015 at 15:35
2
Solved
How to plot a imshow() image in 3d axes? I was trying with this post. In that post, the surface plot looks same as imshow() plot but actually they are not. To demonstrate, here I took different dat...
Buchheim asked 26/5, 2015 at 16:29
2
Solved
I have consistently had problems with my colour maps when using imshow; some colours seem to just become black. I have finally realised that imshow seems to, by default, normalise the matrix of flo...
Jann asked 1/3, 2014 at 22:28
11
Solved
I cannot get the colorbar on imshow graphs like this one to be the same height as the graph, short of using Photoshop after the fact. How do I get the heights to match?
Natashianatassia asked 12/8, 2013 at 20:6
2
Solved
I am trying to plot image data in altair, specifically trying to replicate face recognition example in this link from Jake VDP's book - https://jakevdp.github.io/PythonDataScienceHandbook/05.07-sup...
Cacodyl asked 1/2, 2020 at 16:43
2
Solved
The np.array that results from this loop has 4383 lines and 6 columns. I have tried without success to use pylab.imshow() from matplotlib(pylab) to display the array.
The objective is to create an ...
Barbital asked 2/8, 2012 at 10:11
2
Solved
By default, matplotlib would position colorbar labels alongside the vertical colorbars. What is the best way to force the label to be on top of a colorbar? Currently my solution needs adjusting lab...
Worldly asked 16/11, 2015 at 14:11
2
I use matpotlib's imshow() to interpolate and plot some data. Here is a 2D array.
im = ax.imshow(data2D,interpolation='sinc')
I would like to get the 'sinc' interpolated data after imshow. I haven...
Toulouse asked 20/9, 2018 at 7:9
3
Solved
I have the following code:
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import matplotlib.cm as cm
img = mpimg.imread("lena.jpg")
fig, axs = plt.subplots(2, 2)
axs[0...
Protestantism asked 16/9, 2014 at 6:32
3
Solved
Say I have some input data:
data = np.random.normal(loc=100, scale=10, size=(500,1,32))
hist = np.ones((32, 20)) # initialise hist
for z in range(32):
hist[z], edges = np.histogram(data[:, 0, z], ...
Forerun asked 9/9, 2013 at 10:23
5
Solved
How do I use the matlib function plt.imshow(image) to display multiple images?
For example my code is as follows:
for file in images:
process(file)
def process(filename):
image = mpimg.imread(...
Bottommost asked 18/12, 2016 at 17:12
5
Solved
I am working on a project in which I need to put together a plot grid of 10 rows and 3 columns. Although I have been able to make the plots and arrange the subplots, I was not able to produce a nic...
Lobotomy asked 10/12, 2016 at 3:45
10
For my image processing algorithm I'm using python / OpenCV. The output of my algorithm shall be updated im the same window over and over again.
However sometimes the window freezes and doesn't u...
Technicality asked 4/5, 2016 at 21:45
3
Solved
Why is there a difference in the output image when calling the same image using plt.imshow & cv2.imshow()?
Here is my code:
import cv2
import numpy as np
from matplotlib import pyplot as plt
s...
Gwennie asked 26/7, 2016 at 19:14
1
I have disk simulation data with snapshots in a .dat file. I want to plot only one but in polar coordinates.
I have:
rho = np.fromfile(filename).reshape(128,384)
plt.imshow(np.log10(rho),origin='...
Rate asked 16/1, 2019 at 2:33
3
I am a Python beginner.
I have a list of X values
x_list = [-1,2,10,3]
and I have a list of Y values
y_list = [3,-3,4,7]
I then have a Z value for each couple. Schematically, this works lik...
Granoff asked 27/9, 2016 at 14:14
7
Solved
I am working on a project which requires functions from OpenCV to plot images.
I am trying to display image using the below code in Google Colab. But nothing shows up in the output. Can anybody hel...
Millicent asked 21/3, 2019 at 20:19
9
Solved
I'm trying to display a grayscale image using matplotlib.pyplot.imshow(). My problem is that the grayscale image is displayed as a colormap. I need it to be grayscale because I want to draw on top ...
Bathyal asked 29/9, 2010 at 16:33
6
I have data in X, Y, Z format where all are 1D arrays, and Z is the amplitude of the measurement at coordinate (X,Y). I'd like to show this data as a contour or 'imshow' plot where the contours/col...
4
Solved
When you want to plot a numpy array with imshow, this is what you normally do:
import numpy as np
import matplotlib.pyplot as plt
A=np.array([[3,2,5],[8,1,2],[6,6,7],[3,5,1]]) #The array to plot
...
Witchery asked 30/5, 2017 at 11:4
3
Solved
I'm relatively new to all this and I started the tutorial on image analysis here. When trying to perform the pylab.imshow(dna) step it returns the following error:
In [10]: pylab.imshow(dna)
------...
Ketosis asked 21/2, 2013 at 17:0
1 Next >
© 2022 - 2024 — McMap. All rights reserved.