""" -*- python -*-

This script tests that a scatter plot with only one point does not
mess up the range on the Y axis of the histogram.

Copyright (C) 2001, 2003  The Board of Trustees of 
The Leland Stanford Junior University.  All Rights Reserved.  

Author: Paul_Kunz@slac.stanford.edu

$Id: scatter_hist.py.in,v 1.1 2006/10/22 23:28:53 pfkeb Exp $

"""
import setPath
from load_hippo import hippo, app, canvas

from hippo import NTupleController
ntc = NTupleController.instance()

# Create NTuple with its's controller so that Inspector can see it.
nt = ntc.createNTuple ( '../../hippodraw/examples/aptuple.tnt' )

from hippo import Display

hist = Display ("Histogram", nt, ('Age', ) )
canvas.addDisplay( hist )

labels = [ 'x', 'y' ]
empty = hippo.NTuple ( labels )
empty.addRow ( [40., 0.1] )
hist.addDataRep ( 'Scatter Plot', empty, labels )

print "The low end of Y axis range should be zero."

