Directions for using csplot.py

Note: If python complains about Tkinter not being installed when you try to import csplot.py, you are working on a machine which does not have Tkinter installed. Either install Tkinter, or work on a different machine, as csplot.py uses Tkinter to output graphics. Tkinter is installed on all Wilkinson lab machines.

Once you have imported the csplot.py file (using either import csplot or from csplot import *) you will have access to the plotting commands provided by csplot.

The commands available are as follows:

 

Command Line Commands

plot(Y, low, hi)

Plots line segments joining the data in the list Y evenly spaced from low to hi (excluding hi)

 

plot(Y, low, hi, plottype)

Same as above, plus additional effects based on what the string plottype includes

If plottype includes:

ex. If plottype = 'sprecL', the line segments, points, and left-aligned rectangles will be drawn.

 

plot(Y, low, hi, plottype, color)

Same as above, plus any line segments drawn are drawn in the specified color. Colors may be defined as explained here.

 

clear()

removes all plotted points from the canvas (axes stay)

 


 

On-canvas Commands

In on the plot window itself, there are a number of different ways to interact with the screen.

 

Mousedrag options

If you hold down a certain key while dragging the mouse (left-clicking and holding down the mouse button while moving the mouse around the window) you will get different responses depending on the key held down.

 

Clicking commands