“PLT IMSHOW Python” Kode Jawaban

PLT IMSHOW Python

import matplotlib.pyplot as plt
w = 4
h = 3
d = 70
plt.figure(figsize=(w, h), dpi=d)
x = [[3, 4, 5],
     [2, 3, 4],
     [1, 2, 3]]

color_map = plt.imshow(x)
color_map.set_cmap("Blues_r")
plt.colorbar()
plt.savefig("out.png")
Tremendous Enceladus

Imshow dari Matplotlib

matplotlib.pyplot.imshow() Function:
The imshow() function in pyplot module of matplotlib library is used to display data as an image; i.e. on a 2D regular raster.

Syntax: matplotlib.pyplot.imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None, vmin=None, vmax=None, origin=None, extent=None, shape=, filternorm=1, filterrad=4.0, imlim=, resample=None, url=None, \*, data=None, \*\*kwargs)

Parameters: This method accept the following parameters that are described below:

X: This parameter is the data of the image.
cmap : This parameter is a colormap instance or registered colormap name.
BIPIN KUMAR SINHA

Jawaban yang mirip dengan “PLT IMSHOW Python”

Pertanyaan yang mirip dengan “PLT IMSHOW Python”

Lebih banyak jawaban terkait untuk “PLT IMSHOW Python” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya