PsiLAB Help Manual Page

Section: Plot functions (2 independent dimensions)

Name: grayplot

Graylevel plot of an integer or float matrix (2 dimensional).
Manual and automatic graylevel scaling is provided.
grayplot
?(fmat = ([]:(float,'b,'c) Matrix.t list))
?(imat = ([]:(int,'b,'c) Matrix.t list))
?(autoscale = true)
?(fmax = 255.0)
?(fmin = 0.0)
?(imax = 255)
?(imin = 0)
?(xrange = [])
?(yrange = [])
?(xlabel = "")
?(ylabel = "")
?(title = "")
()

Either use the imat list argument for an integer matrix or the fmat argument list for a float matrix. The matrix must have the dimension 2.
If the autoscale argument is true, the grayplot function determines the maximum and minimum value of the matrix. Alternatively, the maximum and minimum value can set by the fmax, fmin arguments for float matrices, and with imax, imin for integer matrices.
Don't forget the unit operatot for the last argument.
The default x and y scaling are derived from the matrix size values. But a user specified scaling can be set with the xrange and yrange arguments:

~xrange:[ xmin ; xmax ]
~yrange:[ ymin ; ymax ]

There are some additional arguments to set the labels and the title:

~xlabel:" string "
~ylabel:" string "
~title:" string "

Example:
[] let f = fmatrix ~dim:[200;100] ~rand:[1.0] () ;; 
[] grayplot ~fmat:[f] () ;; 

Printed by PsiLAB