1 HISTOGRAM

  Does something  with a   plot. See HELP HISTOGRAM Menu  for  a short
  description of each command. See HELP 2DIM for more commands on
  different ways of plotting 2-dimensional histograms.

2 Menu
  The following is a list of the  available commands.
  For more details see HELP HISTOGRAM and the individual subtopics:

  BOOK      Books a new plot inside Mn_Fit.
  DISPLAY   Makes an L3 or ZEUS detector display - only in display version.
  DUMP      Dumps the contents of a histogram.
  ERRORS    Changes the errors of a plot.
  EXTRACT   Extracts part of an HBOOK histogram e.g. BANX or SLIY or FUN.
  FILL      Fills a new plot inside Mn_Fit.
  IGTABLE   Interface to HIGZ IGTABL routines for 2-D histograms.
  LEGO      Makes a lego plot of a 2-D histogram.
  OVERLAY   Overlays a histogram on the present plot.
  PLOT      Plots a histogram.
  SURFACE   Makes a surface plot of a 2-dimensional histogram.
  2DIM      Interface to HIGZ IGTABL routines for 2-D histograms.

2 BOOK
  Syntax: BOOK[/BINNED|/UNBINNED|/ERROR|/NOERR|/ASYMMETRIC] id [&idb]
          title
          ndim
          maxpnt   OR nbinx xlo xhi [nbiny ylo yhi ...]
   where: id     is the plot identifier
          idb    is the (optional) secondary identifier
          title  is the title for the new plot
          ndim   is the number of dimensions
          maxpnt is the maximum number of points (for an unbinned plot)
          nbinx  is the number of x bins
          xlo    is the lower limit on x
          xhi    is the upper limit on x etc.

  Books a new plot inside Mn_Fit.  The default is an  unbinned plot with
  errors. This  command is  useful if you  want to fill a  plot with the
  results  of a  fit for   example. See HELP HISTOGRAM FILL  for more
  details. Note that the `title'  must be included in quotes if it is on
  the same line as the number of dimensions.

3 /BINNED

  Books a binned plot. You will be  prompted for the number of bins and
  the upper and lower limits for each variable.

3 /UNBINNED

  Books an  unbinned plot.  When you fill  the plot the  data you give
  will be  stored as  the next  point.  Use the  `PROJECT'  command to
  convert an unbinned to a binned plot if you want to do so.

3 /NOERRORS

  Plot will be  booked with no  space reserved to  store the errors on
  the data. Use the `HIST ERROR' command to add errors at a later time
  if you wish to.

3 /ERRORS

  Plot will be  booked with space  reserved for  errors. When you fill
  the plot you  will be prompted  for the errors if  it is an unbinned
  plot.

3 /ASYMMETRIC

  Plot will be booked with space  reserved for asymmetric errors. When
  you fill  the plot  you will be prompted for  both the  negative and
  positive errors if it is an unbinned plot.

3 Examples

!\begin{enumerate}
!\item
!^
  Example 1:
    Book a binned histogram with errors:
      BOOK/BIN/ERR 1 'A New Histogram' 1 100 0 100

!\item
!^
  Example 2:
    Book a series of points with asymmetric errors and allow
    a maximum of 1000 points:
      BOOK/UNBIN/ASYM 1 'A New Histogram' 1 1000

!\end{enumerate}

2 DISPLAY
  Syntax: HIST DISPLAY[/CLEAR|/NOCLEAR] detnam id [&idb]
   where: detnam  is the detector name
          id      is the histogram identifier
          idb     is the (optional) secondary identifier

  Makes a special display. This has been implemented for the following
  subdetectors in the L3 experiment: `ECAL', `FBGO' and `FSIL' and
  `FWCH'. For the ZEUS experiment it has been implemented for the
  `FTD' and `TRD' detectors. You have to use the
  `SET PARAMETER det' command to set the display options.

3 /CLEAR

  Default option. Specifies that the screen will be cleared before the
  next plot is made. Note  that if you  are plotting  with more than 1
  window (see HELP SET WINDOW) this option  will be overridden, except
  for the plot in the top lefthand corner (`WINDOW 1 1').

3 /NOCLEAR

  Specifies that the screen not be  cleared before  drawing this plot.
  This is useful if you want to overlay displays.

3 ECAL

  Displays the L3 BGO electromagnetic caloriter.
  This command must be preceded by  the command
  `SET PAR ECAL mode xlo xhi ylo yhi'. See HELP SET PARAMETER ECAL
  for more information.

3 FBGO

  Makes a 2-D display of the L3 forward luminosity monitor BGO.
  See HELP SET PARAMETER FBGO for more information on what parameters
  can be changed.

  To overlay the forward luminosity monitor chamber hits
  see HELP HISTOGRAM DISPLAY FWCH and to overlay the silicon tracker
  hits see HELP HISTOGRAM DISPLAY FSIL.

3 FSIL

  Makes a 2-D display of the L3 forward luminosity monitor silicon
  tracker.  See HELP SET PARAMETER FSIL for more information on what
  parameters can be changed.

  You can overlay the silicon tracker on the BGO by using the
  following syntax:

  SET PAR FBGO 4 0 0
  DISP FBGO id1
  SET PAR FSIL 1 0 1 0
  DISP/NOCLEAR FSIL id
  SET PAR FSIL 1 0 2 0
  DISP/NOCLEAR FSIL id
  SET PAR FSIL 1 0 3 0
  DISP/NOCLEAR FSIL id

3 FWCH

  Makes a 2-D display of the L3 forward luminosity monitor planar
  chambers.  See HELP SET PARAMETER FWCH for more information on what
  parameters can be changed.

  You can overlay chambers and also the BGO by using the following syntax:

  SET PAR FWCH mode side 1 0
  DISP FWCH id
  SET PAR FWCH mode side 2 0
  DISP/NOCLEAR id
  etc.

  Note that this will only work properly if you display one chamber at a
  time.

3 FTD
  Syntax: HISTOGRAM DISPLAY[/CLEAR|/NOCLEAR] FTD id[&idb] nevt
   where: id      is the histogram identifier
          idb     is the (optional) secondary identifier
          nevt    is the Ntuple event number

  Makes a display of the ZEUS forward tracking detector.
  See HELP SET PARAMETER FTD for more information on what parameters
  can be changed.

  The display assumes that you are using the standard FTD Ntuple
  format and that there is one event per Ntuple event.

  You can use the `SET X|Y LIMIT' commands to show only part of the
  detector. However this only works if you are displaying a single
  chamber. The default limits are -100 to +100cm.

3 TRD
  Syntax: HISTOGRAM DISPLAY[/CLEAR|/NOCLEAR] TRD id[&idb] nevt
   where: id      is the histogram identifier
          idb     is the (optional) secondary identifier
          nevt    is the Ntuple event number

  Makes a display of the ZEUS forward tracking detector.
  See HELP SET PARAMETER TRD for more information on what parameters
  can be changed.

  The display assumes that you are using the standard TRD Ntuple
  format and that there is one event per Ntuple event. If you want to
  see both the TRD and the FTD information you should use the combined
  Ntuple format.

  You can use the `SET X|Y LIMIT' commands to show only part of the
  detector. However this only works if you are displaying a single
  chamber. The default limits are -100 to +100cm.

2 DUMP
  Syntax: HIST DUMP id [&idb] Y|N|npnt1 [npnt2]
   where: id     is the histogram identifier
          idb    is the (optional) secondary identifier
          npnt1  is the 1st point to dump
          npnt2  is the last point to dump

  Dumps the contents of a histogram.
  If you omit the secondary identifier the default is used. If you
  answer `Y' when asked whether you want to see the points they will
  all be dumped. You can also give the range of point numbers that
  should be dumped. This is most useful for Ntuples.

2 ERRORS
  Syntax: HIST ERROR id [&idb] nmode [val]
   where: id    is the histogram identifier
          idb   is the (optional) secondary identifier
          nmode is the mode: -1 = remove errors altogether,
                              0 = zero errors,
                              1 = square root of the number of entries,
                              2 = same as 1, except the error on 0 points
                                  is set to 1.
                              3 = errors on all points are set to val
          val   is the value of the error for mode 3

  Changes the  errors for a  histogram. By default  all HBOOK histograms
  get errors  assigned  to the bin  contents  when they are  read in. If
  errors were not stored  with the histogram  they are set to the square
  root of the  bin contents.  Note that the  errors are  included in the
  calculation  of  the  minimum and  maximum  limits  when  plotting the
  histograms.

2 EXTRACT
  Syntax: HIST EXTRACT id part [npart] [idb]
   where: id    is the histogram identifier
          part  is the name of the part you want to extract
                HIST, FUN, PROX, PROY, SLIX, SLIY, BANX, or BANY
          npart is the slice or band number
          idb   is the secondary identifier for the part

  Extracts part of an  HBOOK histogram, such as  an associated function,
  projection, slice or band that you have filled. You cannot make a part
  that you  have not  already  booked. To make  a slice or  band use the
  `CUT' and `PROJECT' commands.

2 FILL
  Syntax: HIST FILL id [&idb] x y [dx [dy] ...]
      or  HIST FILL id [&idb] x [y] [weight]
   where: id      is the plot identifier
          idb     is the (optional) secondary identifier
          x       is the x value of the point
          y       is the y value of the point
          dx      is the error on x
          dy      is the error on y etc.
          weight  is the weight for that point

  Fills a plot. The first syntax is  for an unbinned plot and the second
  for a binned  plot. The values and  errors can be  numbers, registers,
  parameters,  etc.  See HELP Numbers  for more  details on  the things
  available and see HELP DEPOSIT on how to fill registers etc.

3 Examples

!\begin{enumerate}
!\item
!^
  Example 1:

    If you want to fill the plot with an upper limit, for example, use
    the `DEPOSIT'  command to  calculate the upper  limit, storing the
    answer in a register and then `FILL' the plot with that value:

      DEPOSIT R10 = P2(1) + 1.64*ERP2(1)
      FILL 10 0.5 R10

!\end{enumerate}

2 IGTABLE
  Syntax: HIST IGTABLE id [&idb]
   where: id    is the histogram identifier
          idb   is the (optional) secondary identifier

  Interface to HIGZ IGTABL routine. Specify the parameters for how to
  show the table using the command `SET IGTABLE'.
  See HELP SET HIGZ TABLE and the HIGZ/HPLOT manual for more details.
  IGTABL allows you to display 2-dimensional histograms as contours,
  lego plots, surface plots with and without colour and in different
  coordinate systems.

  If you omit the secondary identifier the default is used.

2 LEGO
  Syntax: HIST LEGO[/qual] id [&idb] theta phi (default theta=30, phi=30)
   where: qual     can be /C1|/C2|/BAR|/POL|/CYL|/SPH|/PSD|/NFB|/NBB
          id       is the plot identifier
          idb      is the (optional) secondary identifier
          theta    is the viewling angle in theta
          phi      is the viewing anlge in phi

  Makes a lego plot of a 2-dimensional histogram. `Theta' and `phi'
  are the angles from which you want to view the lego plot in
  degrees. They must lie between 0 and 90. This limit does not apply
  if the IGTABL interface is used.  The current lego plotting code
  will soon be replaced by that in the `2DIM LEGO' command, which has
  no restrictions on the rotation angles and has a number of
  diffferent colour options.

  If you give one of the qualifiers, the HIGZ IGTABL routine will be
  used for the drawing. See HELP 2DIM LEGO for more details.  The
  `2DIM' command can also be used to have many more options on how to
  plot 2-D histograms. See HELP 2DIM for more details.

  One of the qualifiers `/C1,/C2,/BAR' can be given and one of the
  coordinate system qualifiers `/POL,/CYL,/SPH,/PSD' can be given.
  The qualfiers `/NFB, /NBB' turn off the font and back boxes
  respectively.

2 OVERLAY
  Syntax: HIST OVERLAY[/option] id [&idb] [symb/col hatch/col patt/col]
      or  HIST OVERLAY[/option] id part
      or  HIST OVERLAY/NEXT [symb/col hatch/col patt/col]
   where: option   can be /SAME|/DIFFERENT|/NEXT/|/NTUPLE|/SMOOTH
          id       is the plot identifier
          idb      is the (optional) secondary identifier
          symb     is the symbol number to use (default = previous + 1)
          hatch    is the hatching to use (default = none)
          patt     is the pattern to use (default = none)
          col      is the (optional) colour for the symbol, hatch or pattern.

  Overlays  a histogram  on the  last one you  plotted. To plot the next
  histogram in memory use the form  `OVERLAY/NEXT'. If  you omit the
  secondary identifier, the default  is used. If you omit the symbol the
  default is taken as 1 greater than the current symbol  number.  If you
  are reading the command from a  macro or `DEFINE'd  command  the symbol
  number must be included on the same line, otherwise the defaults will
  be used. If you give the command interactively, you have to hit `<CR>' to
  get the default values. Hatching  and patterns  only work with the HIGZ
  versions of Mn_Fit  and are  device  dependent
  (see HELP SET HATCH and HELP SET PATTERN for more details).

  You can add the symbol, hatch or pattern colour to the symbol number
  as a qualifier, e.g. `32/red' instead of just 32.

  By  default  the plot  will  have the  same y  scale  as the  last one
  (`/SAME' qualifier).  If you want it on a  different y scale, give the
  command    `OVERLAY/DIFFERENT'.  The new  scale  will be  drawn on the
  right-hand side of the  plot. Give the  command `REDRAW' to get rid of
  the scale on the right from the first plot.

  Use `OVERLAY/NTUPLE' to plot variables from an Ntuple. You have to give
  the command `SET NTUPLE ...' first to specify the variables. Note that
  this form does not apply any cuts and is most useful for plotting
  different columns from a table of entries read in with `DAT_FETCH' for
  example.

  You can also plot histograms directly from an HBOOK RZ file by
  opening the file (`OPEN' or `HB_OPEN') and then giving the overlay
  command. This feature can be suppressed using the `SET AUTOFETCH
  OFF' command.

3 /SAME

  Default option.
  Specifies that the overlayed plot will have the same y scale as the
  first one.

3 /DIFFERENT

  Specifies that the overlayed plot will have its own y scale drawn
  on the right hand side of the plot.

3 /NEXT

  Draws the next plot that is in memory. Useful for scanning a series of
  plots, following an `id' that you know.

3 /NTUPLE

  Draws the specified variables from an Ntuple. Use the `SET NTUPLE ...'
  command to specify which variables to put on which axis.

3 /SMOOTH

  Draws the plot as a smooth curve using a cubic spline interpolation
  between the points.

2 PLOT
  Syntax: HIST PLOT[/option] id1[:id2] [&idb1:idb2]] [sym/col hat/col pat/col]
      or  HIST PLOT[/option] id part
      or  HIST PLOT/NEXT [sym/col hat/col pat/col]
   where: option   can be /CLEAR|/NOCLEAR|/NEXT/|/NTUPLE|/SMOOTH|/EMPTY
          id       is the plot identifier
          idb      is the (optional) secondary identifier
          sym      is the symbol number to use (default from `SET SYMBOL')
          hat      is the hatching to use (default from `SET HATCH')
          pat      is the pattern to use (default from `SET PATTERN')
          part     is the part of an HBOOK histogram that you want to plot
                   e.g. BANX, FUN etc.
          col      is the (optional) colour for the symbol, hatch or pattern.

  Plots a histogram on the currently  selected screen device. If you omit
  the secondary identifier, the default is used. You can plot a range of
  histograms  by  using the  syntax   `id1:id2' for  either or  both the
  primary and secondary identifiers.  To plot all histograms use the
  syntax `PLOT 0'. To plot the next histogram in memory use the form
  `PLOT/NEXT'.  The default option is `/CLEAR'. If you want  to add a
  second  plot as an  insert, for  example, use the `/NOCLEAR' qualifier
  and specify the size  and position of the second plot with  the
  `SET  X|Y  MARGIN' and  `SIZE'  commands. If the plot is within a window
  you  should  use  the `SET  X|Y  WMARGIN' and `WSIZE' commands.

  Use `PLOT/NTUPLE' to plot variables from an Ntuple. You have to give the
  command `SET NTUPLE ...' first to specify the variables. Note that this
  form does not apply any cuts and is most useful for plotting different
  columns from a table of entries read in with `DAT_FETCH' for example.

  If you want to plot an empty frame, without any error messages, book a
  new histogram with `HISTOGRAM BOOK' and then plot it with `PLOT/EMPTY'.

  If you omit the symbol, hatch or pattern the default will be used. If you
  specify a symbol this only applies to the current plot command and will
  not change the default. Use `SET SYMBOL' to change the default.

  If you are using a colour as a shading for an overlay and need to
  get the ticks redrawn use the `PLOT/NOCLEAR' command and redraw the
  1st histogram.

  2-D histograms can also be plotted using the `LEGO' or `SURFACE'
  commands, or by using the interface to the HIGZ IGTABL routine,
  via the `2DIM' or `IGTABLE' commands. See HELP 2DIM for more details.

  The normal procedure is to `FETCH' the histograms from a file and
  then plot them using the above syntax.  You can also plot histograms
  directly from an HBOOK RZ file by opening the file (`OPEN' or
  `HB_OPEN') and then giving the plot command. This feature can be
  suppressed using the `SET AUTOFETCH OFF' command. Note that this
  only works for single histograms and not for a range nor for all
  histograms.

  If you want to check whether a histogram exists in a macro before
  deciding what to do you can use the following commands:

    SET PLOT ida&idb DEFAULT
    IF r121 = ida & r122 = idb
      ...
    ENDIF

  Note that this only works for histograms that you have tried to
  fetch. It does not yet work for histograms in an RZ file.

3 /CLEAR

  Default option.  Specifies that the screen  will be cleared before the
  next plot  is made.  Note that  if you  are  plotting with  more than 1
  window (see HELP SET WINDOW) this option will be overridden, except for
  the plot in the top lefthand corner (`WINDOW 1 1').

3 /NOCLEAR

  Specifies  that the screen  not be  cleared before  drawing this plot.
  This is useful if you  want to make inserts  and specify exactly where
  they should go and how big they should be (`SET X|Y MARGIN' and `SIZE'
  or `SET X|Y WMARGIN' and `WSIZE' commands). It can also be used if you
  make a plot with a pattern (or hatch -3), which obscures the scale. You
  can then say `PLOT/NOCLEAR id' for the 1st histogram again.

3 /EMPTY

  Draws an empty plot without giving an error message. This is useful
  if you want the frame of a plot for drawing in etc.

3 /NEXT

  Draws the next plot that is in memory. Useful for scanning a series of
  plots, following an `id' that you know.

3 /NTUPLE

  Draws the specified variables from an Ntuple. Use the `SET NTUPLE ...'
  command to specify which variables to put on which axis.

3 /SMOOTH

  Draws the plot as a smooth curve using a cubic spline interpolation
  between the points.

2 SURFACE
  Syntax: HIST SURFACE[/qual] id [&idb] theta phi (default theta=30, phi=30)
   where: qual  can be /C1|/C2|/CONT|/SHADE|/POL|/CYL|/SPH|/PSD|/NFB|/NBB
          id    is the plot identifier
          idb   is the (optional) secondary identifier
          theta is the viewling angle in theta
          phi   is the viewing angle in phi

  Make a surface plot of a 2-dimensional histogram.  `Theta' and `phi'
  are the angles from which you want to view the plot in degrees. They
  must lie between 0 and 90. This limit does not apply if the IGTABL
  interface is used.  The current surface plotting code will soon be
  replaced by that in the `2DIM SURFACE' command, which has no
  restrictions on the rotation angles and has a number of diffferent
  colour options.

  If you give one of the qualifiers, the HIGZ IGTABL routine will be
  used for the drawing. See HELP 2DIM SURFACE for more details.  The
  `2DIM' command can also be used to have many more options on how to
  plot 2-D histograms. See HELP 2DIM for more details.

  One of the qualifiers `/C1,/C2,/CONT,/SHADE' can be given and one of the
  coordinate system qualifiers `/POL,/CYL,/SPH,/PSD' can be given.
  The qualfiers `/NFB, /NBB' turn off the font and back boxes
  respectively.

2 2DIM
  Syntax: HIST 2DIM option id [&idb] [par1 par2 ...]
   where: id      is the histogram identifier
          idb     is the (optional) secondary identifier
          option  is the 2-D display option
          par     are parameters needed

  Interface to HIGZ IGTABL routine. The parameters needed can either
  be given on the command line or specified using the command
  `SET IGTABLE'. IGTABL allows you to display 2-dimensional histograms as
  contours, lego plots, surface plots with and without colour and in
  different coordinate systems. See HELP 2DIM for more details.

  If you omit the secondary identifier the default is used.

  The 2-D plotting options available are
  `SCATTER, BOX, ARROW, CONTOUR, COLOUR, TEXT, CHAR, LEGO' and
  `SURFACE', with extra options for the style and coordinate system
  for `CONTOUR', `COLOUR', `LEGO' and `SURFACE' plots.

