Learn R Programming

GSCAD (version 0.1.0)

PlotDic: Plot atoms of a given dictionary

Description

Given a learned dictionary D (m by p) matrix, this function plots all p atoms of D corresponding to p columns. Each column is mapped to a m1 by m2 small pactch.

Usage

PlotDic(D, n1 = NULL, n2 = NULL, m1 = NULL, m2 = NULL, title = NULL,
  color = F, background = "black")

Arguments

D

Dictionary of size m by p

n1, n2

(Optional) Number of patches to be displayed in each column and each row. If specified, both n1 and n2 have to be specified.

m1, m2

(Optional) Size of the small patch to be mapped. Default is m1=m2=sqrt(m). If specified, both n1 and n2 have to be specified.

title

Title of the plot.

color

(Optional) If TRUE, the plot is generated using tim.colors() option. If FALSE, the plot is generated using gray scale. Default is FALSE.

background

(Optional) Backgroup color. Default is black.

Value

Plot will be generated.

Examples

Run this code
# NOT RUN {
D=matrix(runif(64*100),nrow=64)
# PlotDic(D)
# }

Run the code above in your browser using DataLab