status.i4.v = bpm_plot_data(plot_options.s.r [,horz_pos.r4a.r]
				    [,vert_pos.r4a.r] [,horz_status.i1a.r]
				    [,vert_status.i1a.r] [,timestamp.u4.r]
				    [,loss_data.r4a.r] [,loss_status.i1a.r] 
				    [,horz_int.r4a.r] [,vert_int.r4a.r]
				    [,time_in_cycle.r4a.r] [,bpm_title.i1a.r]
				    [,vert_int_stat.i1a.r] [,cycle.i4.v]
				    [,turn_numbers.i4a.r] [,timestamps.u4a.r]
				    [,nano_offsets.u4a.r] [,colors.i4a.r]

  	This function is called to plot BPM data.  Plotting options provide
	the choice of three types of plots; BPM position (1 to 10 frames),
	BPM position with data (single frame), or BPM position with either
	loss or intensity (single frame/two planes).  All plotting options
	are specified in the plot options structure (see below).

	plot_options	structure defining BPM plot options
			(structure of type BPM_PLT_OPT)
	[horz_pos]	horizontal position BPM data to be plotted
			(default is NULL)
	[vert_pos]	vertical position BPM data to be plotted
			(default is NULL)
	[horz_status]	horizontal BPM data status
			(default is NULL)
	[vert_status]	vertical BPM data status
			(default is NULL)
	[timestamp]	time of BPM data retrieval
			(default is NULL)
	[loss_data]	BLM (loss) data to be plotted
			(default is NULL)
	[loss_status]	BLM (loss) data status
			(default is NULL)
	[horz_int]	horizontal intensity data to be plotted
			(default is NULL)
	[vert_int]	vertical intensity data to be plotted
			(default is NULL)
	[time_in_cycle]	time-in-cycle of BPM frame(s)
			(default is NULL)
	[bpm_title]	null terminated window title for plot (39 chars max)
			(default is NULL)
	[horz_int_stat]	horizontal intensity data status
			(default is NULL)
	[vert_int_stat]	vertical intensity data status
			(default is NULL)
	[cycle]		cycle event that data was taken on
			(default is EVENT_NULL)
	[user_horz_pos]	user supplied horizontal position BPM data to be plotted
			(default is NULL)
	[user_vert_pos]	user supplied vertical position BPM data to be plotted
			(default is NULL)
	[turn_numbers]	turn numbers at which data was taken
			(default is NULL)
	[timestamps]	returned array of timestamps in clinks
			(default is NULL)
	[nano_offsets]	returned array of timestamp fractions of a second
			in nanoseconds (default is NULL)
	[colors]	individual detector plot colors  (If a negative
			value is passed, the absolute value of the argument
			will be used as the color for all detectors.)
			(constants are in 'cnsparam') (default is NULL)
	[metadata]	metadata to be displayed along with the data
			(default is NULL)

	BPM plot options structure breakdown:

	  int bpm_frm ....... frame type
			      (BPM_PROFILE -> profile frame,
			       BPM_SNAPSHOT -> snapshot frame,
			       BPM_DISPLAY_FRAME -> display frame,
			       BPM_FLASH -> flash frame,
			       BPM_BACKGROUND_FLASH -> background flash frame
						       (Recycler only),
			       BPM_RMS_FRAME -> RMS position frame
						(Recycler only),
			       BPM_DFG_FRAME -> closed orbit at DFG breakpoint
						(Booster only),
			       BPM_RF_TEST_FRAME -> RF test data
						    (Tevatron only),
			       BPM_SLOW_SNAPSHOT -> slow snapshot frame
						    (Tevatron only),
			       BPM_USER_FRAME -> user triggered closed orbit
						 (Tevatron only),
			       BPM_INJECTION_FRAME -> injection closed orbit
						      (Tevatron only))
	  int bpm_typ ....... plot type
			      (BPM_PLT_TYP_HV -> normal (HOR/VER 1-10 frames),
			       BPM_PLT_TYP_1P -> 1-plot (HOR/VER w/text data),
			       BPM_PLT_TYP_2P -> 2-plot (HOR + VER)
						 (Recycler only),
			       BPM_PLT_TYP_3P -> 3-plot (HOR + VER + LOSS/INT),
			       BPM_PLT_TYP_4P -> 4-plot (HOR + VER + RMS/INT)
						 (Recycler, R20 line, R30 line,
						  Accumulator, and Tev devl only))
	  int bpm_pln ....... plot plane
			      (BPM_PLT_PLN_HZ -> horizontal,
			       BPM_PLT_PLN_VT -> vertical)
	  int bpm_nof ....... number of frames (from 1 - 10)
	  int bpm_aux ....... intensity/loss plot flag
			      (BPM_PLT_AUX_LS -> loss,
			       BPM_PLT_AUX_IN -> intensity)
	  int bpm_plt ....... plot view
			      (BPM_PLT_PLT_RG -> plot full ring,
			       BPM_PLT_PLT_B0 -> plot B0 close-up (Tevatron),
			       BPM_PLT_PLT_D0 -> plot D0 close-up (Tevatron),
			       BPM_PLT_PLT_LINE -> plot entire line (8 GeV),
			       BPM_PLT_PLT_UPSTM -> plot upstream (8 GeV),
			       BPM_PLT_PLT_P1_ONLY -> P1 line only (P1 line),
			       BPM_PLT_PLT_P1_P2 -> P1 and P2 lines (P1 line),
			       BPM_PLT_PLT_P1_P2_M1 -> P1, P2, and M1 lines
						       (P1 line),
			       BPM_PLT_PLT_P1_P2_M1_M3 -> P1, P2, M1, and M3
							  lines (P1 line),
			       BPM_PLT_PLT_M1_ONLY -> M1 line only (M1 line),
			       BPM_PLT_PLT_M1_M3 -> M1 and M3 lines (M1 line))
	  int bpm_scr ....... plot screen
			      (BPM_PLT_SCR_G1 -> GxP1,
			       BPM_PLT_SCR_G2 -> GxP2)
	  int bpm_dsp ....... plot display type
			      (BPM_PLT_DSP_NM -> normal,
			       BPM_PLT_DSP_CN -> connected points,
			       BPM_PLT_DSP_FL -> filled vectors,
			       BPM_PLT_DSP_NMC -> normal (continuous),
			       BPM_PLT_DSP_CNC -> connected points (continuous),
			       BPM_PLT_DSP_FLC -> filled vectors (continuous),
			       BPM_PLT_DSP_NMO -> normal (overlay),
			       BPM_PLT_DSP_CNO -> connected points (overlay),
			       BPM_PLT_DSP_FLO -> filled vectors (overlay))
	  int bpm_opt ....... plotting options
			      (BPM_PLT_OPT_NO_LABELS -> don't want limits
							labels (default),
			       BPM_PLT_OPT_WANT_LABELS -> want limits labels,
			       BPM_PLT_OPT_SCALED_DATA -> scaled data (default),
			       BPM_PLT_OPT_CALIB_DATA -> calibration data)
	  int bpm_par ....... particle type
			      (BPM_MODE_PROTON -> proton data,
			       BPM_MODE_PBAR -> antiproton data)
	  int bpm_sam ....... sample mode
			      (BPM_MODE_BUNCH -> bunch mode,
			       BPM_MODE_BATCH -> batch mode)
	  float bpm_h_scl ... horizontal BPM plot range
	  float bpm_v_scl ... vertical BPM plot range
	  float bpm_l_scl ... loss monitor plot maximum
	  int bpm_i1_scl .... intensity plot minimum (exponent)
	  int bpm_i2_scl .... intensity plot maximum (exponent)
	  char **frm_title .. pointers to individual frame titles or NULL for
			      default title text (FR xxx)

	This function returns ACNET status values as follows:

	OK			success
	CBS_INVARG		invalid/missing argument
	CBS_MEMFAIL		failed to allocate dynamic memory
	CBS_INVID		window does not exist
	CBS_RANGE		invalid coordinates for scaling
	CBS_MATH_EXCEPTION	math exception occurred while calculating
				RMS or DP/P values
	CBS_NOTYET		plotting is not supported for the currently
				selected machine

	This function requires the following include files:

	ul_cbsaux/bpmuti.h, acnet_errors_h

	Related functions:

	bpm_get_data_c, blm_get_data_c, bpm_get_intensity_c, bpm_machine_c,
	bpm_data_source_c, bpm_calculate_rms_dpoverp_c,
	bpm_get_calculation_masks_c, bpm_set_calculation_masks_c

	C/C++ usage:

	char	horz_status[NUM_HORZ_POS];
	char	vert_status[NUM_VERT_POS];
	char	loss_status[NUM_LOSSES];
	char	*bpm_title = (char *) NULL;
	char	*horz_int_stat = (char *) NULL;
	char	*vert_int_stat = (char *) NULL;
	int	status;
	int	cycle = EVENT_NULL;
	int	*turn_numbers = (int *) NULL;
	int	*colors = (int *) NULL;
	unsigned int	*timestamp = (unsigned int *) NULL;
	unsigned int	timestamps = (unsigned int *) NULL;
	unsigned int	nano_offsets = (unsigned int *) NULL;
	float	horz_pos[NUM_HORZ_POS];
	float	vert_pos[NUM_VERT_POS];
	float	loss_data[NUM_LOSSES];
	float	*horz_int = (float *) NULL;
	float	*vert_int = (float *) NULL;
	float	*time_in_cycle = (float *) NULL;
	float	*user_horz_pos = (float *) NULL;
	float	*user_vert_pos = (float *) NULL;
	void	*metadata = (void *) NULL;
	BPM_PLT_OPT	plot_options;

	status = bpm_plot_data(&plot_options,horz_pos,vert_pos,horz_status,