The imshow()
function with parameters interpolation='nearest'
and cmap='hot'
should do what you want.
import matplotlib.pyplot as plt import numpy as np a = np.random.random((16, 16)) plt.imshow(a, cmap='hot', interpolation='nearest') plt.show()
Related Posts:
- ImportError: DLL load failed: The specified module could not be found
- ImportError: DLL load failed: The specified module could not be found
- Unable to plot Double Bar, Bar plot using pyplot for ndarray
- TypeError: ‘DataFrame’ object is not callable
- Overcome ValueError for empty array
- ValueError: x and y must be the same size
- TypeError: Invalid dimensions for image data when plotting array with imshow()
- Linear regression with matplotlib / numpy
- Matplotlib: TypeError: can’t multiply sequence by non-int of type ‘numpy.float64’
- How to plot an array in python?
- IndexError: index 2 is out of bounds for axis 0 with size 2
- TypeError: zip argument #2 must support iteration
- numpy/scipy/ipython:Failed to interpret file as a pickle
- numpy max vs amax vs maximum
- TypeError: only size-1 arrays can be converted to Python scalars (matplotlib)
- Showing an image with pylab.imshow()
- How do you change the size of figures drawn with Matplotlib?
- What is the purpose of meshgrid in Python / NumPy?
- How to fix ‘Object arrays cannot be loaded when allow_pickle=False’ for imdb.load_data() function?
- ValueError: Unknown label type: ‘continuous’
- ImportError: No module named matplotlib.pyplot
- TypeError: unhashable type: ‘numpy.ndarray’
- data type not understood
- Save plot to image file instead of displaying it using Matplotlib
- ImportError: numpy.core.multiarray failed to import
- ImportError: Missing required dependencies [‘numpy’]
- How can I plot a confusion matrix? [duplicate]
- ImportError: numpy.core.multiarray failed to import
- numpy array concatenate: “ValueError: all the input arrays must have same number of dimensions”
- TypeError: ‘numpy.float64’ object is not callable
- Convert a tensor to numpy array in Tensorflow?
- TypeError: ‘numpy.float64’ object is not callable?
- How to normalize a NumPy array to a unit vector?
- How to customize a scatter matrix to see all titles?
- How can I upgrade NumPy?
- Is there a NumPy function to return the first index of something in an array?
- How to get element-wise matrix multiplication (Hadamard product) in numpy?
- Matplotlib automatic legend outside plot
- Numpy/Python Array Value error
- Changing the “tick frequency” on x or y axis in matplotlib?
- matplotlib error – no module named tkinter
- Plot pie chart and table of pandas dataframe
- ModuleNotFoundError: No module named ‘matplotlib’
- What is dtype(‘O’), in pandas?
- ValueError: could not broadcast input array from shape (224,224,3) into shape (224,224)
- Overflow Error in Python’s numpy.exp function
- ValueError: ‘object too deep for desired array’
- LinAlgError: Last 2 dimensions of the array must be square
- What does axis in pandas mean?
- Pytorch tensor to numpy array
- ‘numpy.float64’ object is not iterable
- How to add title to subplots in Matplotlib
- How to change a ‘LinearSegmentedColormap’ to a different distribution of color?
- Normalize data in pandas
- Can’t broadcast input array from shape (3,1) into shape (3,)
- 3-dimensional array in numpy
- How do I calculate percentiles with python/numpy?
- deleting rows in numpy array
- How to increase plt.title font size?
- How to make a 3D scatter plot in matplotlib
- ‘list’ object has no attribute ‘shape’
- How to draw vertical lines on a given plot in matplotlib
- What is the difference between np.mean and tf.reduce_mean?
- Changing the “tick frequency” on x or y axis in matplotlib
- How can I set the aspect ratio in matplotlib?
- What does ‘index 0 is out of bounds for axis 0 with size 0’ mean?
- python SyntaxError: invalid syntax %matplotlib inline
- How to make a histogram from a list of data
- Moving average or running mean
- How do I change the figure size with subplots?
- Saving a Numpy array as an image
- NumPy List Comprehension Syntax
- Numpy extract submatrix
- numpy-equivalent of list.pop?
- Using numpy to build an array of all combinations of two arrays
- Can’t update to numpy 1.13 with anaconda?
- How to put the legend out of the plot
- RuntimeError: Invalid DISPLAY variable
- TypeError: only integer arrays with one element can be converted to an index 3
- Numpy, multiply array with scalar
- Python 3: Multiply a vector by a matrix without NumPy
- How to add a new row to an empty numpy array
- Why do many examples use `fig, ax = plt.subplots()` in Matplotlib/pyplot/python
- Numpy – add row to array
- How do I compute derivative using Numpy?
- ImportError: cannot import name NUMPY_MKL
- plot a circle with pyplot
- Is there any numpy group by function?
- Mean Squared Error in Numpy?
- Is there a head and tail method for Numpy array?
- Difference between data type ‘datetime64[ns]’ and ‘
- Merging two DataFrames
- inverting image in Python with OpenCV
- How do I tell Matplotlib to create a second (new) plot, then later plot on the old one?
- Transposing a 1D NumPy array
- numpy.float64 object is not iterable…but I’m NOT trying to
- vectorize conditional assignment in pandas dataframe
- Python OpenCV2 (cv2) wrapper to get image size?
- Equivalent to matlab’s imagesc in matplotlib? [duplicate]
- alueError: ordinal must be >= 1