Visualization of matrix created by numpy

The boundary becomes clear with interpolation ='nearest'. You can change the direction of the vertical axis with origin ='lower'.

#coding:utf-8
from pylab import *
import numpy

matrixW = numpy.zeros( (6, 11) )
    
#Enter a value in matrixW as appropriate
    
#Visualization
#figure(1)
im = imshow(matrixW, interpolation='nearest') # origin='lower'
title('$W_j$')
colorbar(im) #Color bar showing the correspondence between colors and values
grid(True)
gray() #Blank, gray(), hot()The color changes depending on
show()

w_j.jpg

Recommended Posts

Visualization of matrix created by numpy
Visualization of data by prefecture
Visualization of NMF (Nonnegative Matrix Factorization) Learning
[Scientific / technical calculation by Python] Calculation of matrix product by @ operator, python3.5 or later, numpy
[Scientific / technical calculation by Python] Inverse matrix calculation, numpy
Numpy leave? !! Partial differential of matrix with Sympy
Visualization of Produce 101 Japan trainee ranking by scraping
Image processing by matrix Basics & Table of Contents-Reinventor of Python image processing-
Analysis of financial data by pandas and its visualization (2)
Visualization memo by Python
About all of numpy
Analysis of financial data by pandas and its visualization (1)
Add a list of numpy library functions little by little --a
Matrix considered by function
Calculation of homography matrix by least squares method (DLT method)
Visualization method of data by explanatory variable and objective variable
Matrix concatenation with Numpy
Set function of NumPy
Add a list of numpy library functions little by little --- b
Benchmark by matrix product: NumPy, Numba, Cython, Swig, OpenCL, intelMKL
Add a list of numpy library functions little by little --c
[Scientific / technical calculation by Python] Basic operation of arrays, numpy
Negative / positive judgment of sentences and visualization of grounds by Transformer
Negative / positive judgment of sentences by BERT and visualization of grounds
Sum of multiple numpy arrays (sum)
Distribution of eigenvalues of Laplacian matrix
Try matrix operation with NumPy
Matrix multiplication in python numpy
About all of numpy (2nd)
Calculation of similarity by MinHash
Visualization memo by pandas, seaborn
Visualization of possessed skills [continuation]
Impressions of touching Dash, a data visualization tool made by python