Last modified: 12 December 2018

How do I start ChIPS?

The Starting ChIPS thread provides information on how to start ChIPS. If you have CIAO installed and initialized you can just use the chips command which will display a banner and then leave you at an interactive prompt at which you can enter any ChIPS or other Python command. Please see the How do I create a plot from ChIPS in a script? entry for using ChIPS in a non-interactive manner.

unix% chips
Welcome to ChIPS: CXC's Plotting Package
CIAO 4.11 ChIPS version 1 Wednesday, December 5, 2018


Note that, unlike some plotting packages, you can edit, add to, or delete from your visualization at the command line and the display will be updated. The undo and redo commands allow you to easily correct any mistakes, and a GUI is available for editing properties of your visualization.

An example session, plotting the curve \(y = e^{-x/2} {\rm sin}(5x)\) is shown below:

chips-1> x = np.arange(0, 2*np.pi, 0.01)
chips-2> y = np.exp(-x/2) * np.sin(5*x)
chips-3> add_curve(x, y)
chips-4> set_curve(['', 'none'])

where the last line is needed to hide the symbols drawn at each point (by default symbols are drawn at the vertexes of the data and lines drawn between them). At this point the screen display looks like:

[The data points have been connected by lines; all elements are drawn in white on a black background]

The GUI can be started with a command - as shown below - or by bringing up the right-mouse menu over the ChIPS window; from the GUI the properties of the visualization can be inspected, changed, or deleted.

chips-5> show_gui()
[The GUI contains options to inspect and change the properties of the visualization]

Various output formats are supported; here a PNG version is created. Note that the foreground and background colors are automatically swapped from the on-screen version (this can be changed by setting the appropriate preference settings).

chips-6> print_window('example.png')
[The PNG output has black lines on a white background.]

The ChIPS threads and Gallery plots, as well as other entries in the FAQ provide more information and examples on how ChIPS works and the range of visualizations it can create.

Changes in CIAO 4.7

The default for the window.smoothing attribute has been changed to true in CIAO 4.7. This may require deleting the ~/.chips.rc file to see; that is, if the following does not display true:

chips> !grep smoothing ~/.chips.rc
window.smoothing       : true

The smoothing attribute determines whether the "bitmap" verions of a plot - that is, on screen and PNG or JPEG output - have any form of anti-aliasing. This can be seen by comparing the output of

chips> add_window(['id', 'smooth', 'smoothing', True])
chips> add_window(['id', 'none', 'smoothing', False])
chips> current_window('all')
chips> add_curve(x, y, ['', 'none'])

The difference can be seen on screen

[The curve in the left window looks smoother than that on the right due to anti-aliasing.]

and in the PNG (or JPEG) output

[The curve in this plot has anti-aliasing/smoothing.] [The curve in this plot has no anti-aliasing/smoothing.]

Note that the smoothing attribute of a window can not be changed after the window has been created.