Index: trunk/ippMonitor/Makefile.in
===================================================================
--- trunk/ippMonitor/Makefile.in	(revision 28603)
+++ trunk/ippMonitor/Makefile.in	(revision 28604)
@@ -190,5 +190,5 @@
 $(DESTWWW)/histogramBackgroundImage.php \
 $(DESTWWW)/histogramCamProcessedExpImage.php \
-$(DESTWWW)/histogramChipProcessedImfileFwhmMajorImage.php \
+$(DESTWWW)/histogramZptObsImage.php \
 $(DESTWWW)/scatterPlotAirMassFwhmImage.php \
 $(DESTWWW)/scatterCpiBgReMaImage.php \
Index: trunk/ippMonitor/def/README
===================================================================
--- trunk/ippMonitor/def/README	(revision 28603)
+++ trunk/ippMonitor/def/README	(revision 28604)
@@ -98,2 +98,69 @@
 output column in the HTML table.
 
+Drawing Figures
+===============
+- Definition files (def/*.d) MUST be appended with Image.d to allow specific
+  processing (the template is not def/autocode.php but autocodeImage.php)
+     e.g.:   	  plotMyStuffImage.php
+- No changes to the previous file content except for these 4 items:
+
+     1) The 'restrict' keyword should be used in the 'show' column of
+     	FIELD entry if displaying the column values is wanted.
+	Such FIELDs are used in the WHERE restriction clause, not in
+	the query.
+
+	Note for developpers: actually any word different from the
+	existing keywords '', 'value', 'none', 'image=xxx',
+	'value=xxx' are ok.  No code was developped to support this
+	keyword in the scritps/generate script.
+
+     2) 'TOPLOT <list of db columns>': defines the list of columns to
+     	query.
+	e.g.: 
+	      TOPLOT camProcessedExp.fwhm_major
+	      TOPLOT chipProcessedImfile.bg, rawExp.sun_angle
+	All values (no LIMIT) are written to a temporary (text) file
+	of the /tmp directory.
+	In a row, the different values are separated by a single space
+	(i.e. ' ').
+
+     3) 'PLOTTER <php_script_name>': defines the name of the PHP
+        script that will call an external tool (e.g. a DVO script).
+	
+	It is expected that the PHP script named 'php_script_name'
+	supports the following parameters:
+	- input: the name of an input text filename;
+	- output: the name of an output image filename;
+	- title: a string (see item 4) PLOTTITLE).
+
+	e.g.:
+		PLOTTER scatterPlot.php	
+		PLOTTER plotHistogram.php
+
+	The list of existing plotters are detailed further.
+
+     4) 'PLOTTITLE <A title>': defines the title of a figure. Could be
+     	used in the external program which is effectively used for
+     	rendering the figure.
+
+	e.g.:
+		PLOTTITLE A title
+
+Existing plotting scripts
+=========================
+raw/skyplot.php (calls scripts/skyplot.dvo)
+	Text input file needs to contain 3 columns
+
+raw/plotHistogram.php (calls scripts/build_histogram.dvo)
+	Text input file needs to contain 1 column
+	Computes the histogram of the input file data for 100 bins.
+
+raw/scatterPlot.php (calls scripts/pot_x_vs_y.dvo)
+	Text input file needs to contain 2 columns
+	Scatter plot of the first column values vs the second ones
+	Regression line is also plotted (correlation coefficient is
+	shown in title).
+
+Known bugs of the plotting scripts
+==================================
+- the temporary files are not deleted.
Index: trunk/ippMonitor/def/histogramBackgroundImage.d
===================================================================
--- trunk/ippMonitor/def/histogramBackgroundImage.d	(revision 28603)
+++ trunk/ippMonitor/def/histogramBackgroundImage.d	(revision 28604)
@@ -2,5 +2,5 @@
 TITLE New histogram background
 FILE  histogramBackgroundImage.php
-MENU  ipp.imfiles.dat
+MENU  ipp.plots.dat
 
 WHERE camRun.state = 'full'
Index: trunk/ippMonitor/def/histogramZptObsImage.d
===================================================================
--- trunk/ippMonitor/def/histogramZptObsImage.d	(revision 28604)
+++ trunk/ippMonitor/def/histogramZptObsImage.d	(revision 28604)
@@ -0,0 +1,31 @@
+TABLE camRun, chipRun, rawExp, camProcessedExp
+TITLE Histogram of ZptObs
+FILE  histogramZptObsImage.php
+MENU  ipp.plots.dat
+
+WHERE camRun.state = 'full'
+WHERE camRun.chip_id = chipRun.chip_id
+WHERE chipRun.exp_id = rawExp.exp_id
+WHERE camProcessedExp.cam_id = camRun.cam_id
+WHERE camProcessedExp.fault = 0
+
+#    field                size  format  name           show     link to         extras
+FIELD rawExp.exp_name,            5, %s,     Exp Name, 	      restrict
+FIELD rawExp.exp_id,             5, %d,      Exp ID, 	      restrict
+FIELD rawExp.telescope,          10, %s,     Telescope,       restrict
+FIELD rawExp.camera,             10, %s,     Camera, 	      restrict
+FIELD rawExp.dateobs,            19, %T,     Date/Time,       restrict
+FIELD rawExp.ra,                  8, %C,     RA, 	      restrict
+FIELD rawExp.decl,                8, %C,     DEC, 	      restrict
+FIELD rawExp.comment,            65, %s,     Comment, 	      restrict
+FIELD rawExp.object,              8, %s,     Object, 	      restrict
+FIELD rawExp.filter,             10, %s,     FILTER, 	      restrict
+FIELD rawExp.exp_time,            5, %.2f,   exp_time, 	      restrict
+FIELD rawExp.airmass,             5, %.4f,   airmass, 	      restrict
+FIELD rawExp.bg,                  5, %.2f,   backgnd, 	      restrict
+FIELD rawExp.bg_stdev,            5, %.2f,   stdev, 	      restrict
+
+# What to plot
+TOPLOT camProcessedExp.zpt_obs
+PLOTTER plotHistogram.php
+PLOTTITLE ZptObs
Index: trunk/ippMonitor/raw/ipp.plots.dat
===================================================================
--- trunk/ippMonitor/raw/ipp.plots.dat	(revision 28603)
+++ trunk/ippMonitor/raw/ipp.plots.dat	(revision 28604)
@@ -2,16 +2,16 @@
 
 menutop   | menutop      | plain   | &nbsp;                                 | 
-menutop   | menutop      | link    | Simple plot - raw            	    | simplePlotRawImage.php
-menutop   | menutop      | link    | Simple plot - chip           	    | simplePlotChipImage.php
-menutop   | menutop      | link    | Simple plot - cam            	    | simplePlotCamImage.php
+menulink  | menuselect      | link    | Simple plot - raw            	    | simplePlotRawImage.php
+menulink  | menuselect      | link    | Simple plot - chip           	    | simplePlotChipImage.php
+menulink  | menuselect      | link    | Simple plot - cam            	    | simplePlotCamImage.php
 
 menutop   | menutop      | plain   | &nbsp;                                 | 
-menutop   | menutop      | link    | Histogram background                   | histogramBackgroundImage.php
-menutop   | menutop      | link    | Histogram Fwhm Major (camProcessedExp) | histogramCamProcessedExpImage.php
-menutop   | menutop      | link    | Histogram Fwhm Minor (chip processed)  | histogramChipProcessedImfileFwhmMajorImage.php
+menulink  | menuselect      | link    | Histogram background                   | histogramBackgroundImage.php
+menulink  | menuselect      | link    | Histogram Fwhm Major (camProcessedExp) | histogramCamProcessedExpImage.php
+menulink  | menuselect      | link    | Histogram Zpt Obs (camProcessedExp)  | histogramZptObsImage.php
 
 menutop   | menutop      | plain   | &nbsp;                                 | 
-menutop   | menutop      | link    | Plot airmass vs fwhm_major (chipProcessedImfile) | scatterPlotAirMassFwhmImage.php
-menutop   | menutop      | link    | Plot Background (chipProcessedImfile) vs Moon Angle (rawExp) | scatterCpiBgReMaImage.php
-menutop   | menutop      | link    | Plot Background (chipProcessedImfile) vs Moon Phase (rawExp) | scatterCpiBgReMpImage.php
-menutop   | menutop      | link    | Plot Background (chipProcessedImfile) vs Sun Angle (rawExp) | scatterCpiBgReSaImage.php
+menulink  | menuselect      | link    | Plot airmass vs fwhm_major (chipProcessedImfile) | scatterPlotAirMassFwhmImage.php
+menulink  | menuselect      | link    | Plot Background (chipProcessedImfile) vs Moon Angle (rawExp) | scatterCpiBgReMaImage.php
+menulink  | menuselect      | link    | Plot Background (chipProcessedImfile) vs Moon Phase (rawExp) | scatterCpiBgReMpImage.php
+menulink  | menuselect      | link    | Plot Background (chipProcessedImfile) vs Sun Angle (rawExp) | scatterCpiBgReSaImage.php
