C-plot is an old-school plot software. Many people had a hard time learning to use it, which results in less and less people using this software. Of course there aren’t “many” people using it in the first place.
The software was written in several decades ago by a college of my boss Mark Schlossman who would always like to use this light tool to catch up the real time data at 15ID@APS. Since it was born long time ago, it was not difficult to infer that the word “plot” really means sitting in the paint room, grabbing a paint brush and paint on the canvas.
Imagine you enter a house called c-plot, and there are a plenty of rooms in that house. One of the rooms stores the data you get from your data file, the second room is your plot room where you have a whole bunch of tools to plot your data, and there are several other rooms that serve as fitting functions. Once you’ve put a copy of your data in the fitting room, you will gain fitted parameters of the function corresponding to that room, where you could also generate fitted data in the room and send them out to the data room for plotting.
Here are some rules how things work out inside this house. Firstly, plot room can only receive data from data room. If you produce a new set of data in the fitting room, yo’ll have to first send them to the data room. Secondly, any new data sent to the data room will replace the old one. Thirdly, any command performed in a fitting room are only valid in that room. Having these three rules in mind, let make a simple plot.
Once you’ve entered the plot house, there are two desks and one computer in the living room. And there is a set of data on one desk, and a canvas and a set of painting tools on the other desk. The computer is used for fitting your data using different functions. Imagine that you entered the living room with your data file in hand. And you want it to be plotted into a beautiful neat graph, by typing:
PLOT->eb 1 X-error bar mode is OFF. Y-error bar mode is now ON. PLOT-> gd2 filename
you will import data from the data file onto the desk where every piece of work starts from. The eb command allows you read the third column as error bar. Once you have data ready, you could plot it out on the canvas by simply typing
z. The plot will look like this:
Notice that the initial plot spans from the first point all the way to the last point. In this example, the signal is just a narrow part of the whole picture, you could type
ra to set the plot range:
PLOT-> ra xmin (1) = 600 xmax (1280) = 660 ymin (0) = 0 ymax (0.0830731) = 0.01 PLOT-> z
z is necessary to replot the picture:
Now let’s work on a simple task. We want to fit the background in the graph above into a decay function that we already have in ./functions/ directory. Let me first plot a graph without the signal by just manipulating the datafile. Then I reload the datafile into c-plot:
CPLOT-> gd2 ./data/temp.txt CPLOT-> z
sy: select plot symbol( mannual, page44)