Skip to content
jcanny edited this page May 30, 2014 · 4 revisions

Basic Plots

BIDMat has basic plotting and histogram capabilities.

To plot a dataset, call "plot(M)" with an argument matrix M, and you get a straight line plot of the value along Y with an implicit X-axis numbered from 1 to numpoints. Plotting two one-dimensional matrices "plot(X,Y)" plots the values as x-y coordinate pairs. You can also plot multiple graphs on the same axes by using alternating X and Y matrices: plot(X1, Y1, X2, Y2,...)

The plot library uses Xwindows through Java and you need to be running an X server on your machine. It works fine when the machine you are typing at and the machine running BIDMat are distant. When you connect to the remote machine (say iclusterxy), you need to enable X packet forwarding. This is a menu option for the Putty application. If you use ssh from the command line to connect, you should add the "-X" option to cause forwarding to happen.

Customizing Plots

When you call val p = plot(X), it returns a ptolemy.Plot object. You can call any of the methods described in the plolemy docs to customize the plot: http://ptolemy.eecs.berkeley.edu/java/ptplot/

Log and Other Non-Linear Plots

Various log-scale plots are supported, like loglog(), semilogx(), and semilogy().

There is a simple histogram function, called by hist(M, nbins)

Clone this wiki locally