Beispiel #1
0
# Overlay strip chart with an XY plot.
strip.addDataRep ( "XY Plot", nt2, ['Energy', 'Sigma', 'nil', 'error'] )

#
# Get the second data representation to set its symbol and size
#
reps = strip.getDataReps ()
from hippo import Symbol
print "The available symbols are ..."
print Symbol.values
print ""
print "about to try"
try :
    reps[1].set ( Symbol.opencircle )
    print "set symbol"
    reps[1].setSize ( 8. )
except RuntimeError, detail :
    print detail

# Create 2D histogram as contour plot.
color = Display ( "Contour Plot", nt, ('Age', 'Cost' ))
color.setBinWidth ( 'x', 1.0 )
canvas.addDisplay ( color )
print "created contour display"
# Overlay it with 1D profile plot.
color.addDataRep ( 'Profile', nt, [ 'Age', 'Cost' ] )

print "Overlayed various kinds of data representations"

Beispiel #2
0
canvas.addDisplay(strip)

# Overlay strip chart with an XY plot.
strip.addDataRep("XY Plot", nt2, ['Energy', 'Sigma', 'nil', 'error'])

#
# Get the second data representation to set its symbol and size
#
reps = strip.getDataReps()
from hippo import Symbol
print "The available symbols are ..."
print Symbol.values
print ""
print "about to try"
try:
    reps[1].set(Symbol.opencircle)
    print "set symbol"
    reps[1].setSize(8.)
except RuntimeError, detail:
    print detail

# Create 2D histogram as contour plot.
color = Display("Contour Plot", nt, ('Age', 'Cost'))
color.setBinWidth('x', 1.0)
canvas.addDisplay(color)
print "created contour display"
# Overlay it with 1D profile plot.
color.addDataRep('Profile', nt, ['Age', 'Cost'])

print "Overlayed various kinds of data representations"
 @author Paul F. Kunz <*****@*****.**>

"""
import random
from time import sleep

from load_hippo import app, canvas

from hippo import Display, NTuple, NTupleController

# Create static histogram and add it to canvas.
sthist = Display ( "Static Histogram" )
sthist.setTitle ( "Gaussian Distribution (static hist)" )
sthist.setLabel ( 'x', 'X' )
sthist.setRange ( 'x', 0, 100)
sthist.setBinWidth ( 'x', 1. )
canvas.addDisplay ( sthist )

# Create second static histogram and add it to canvas
sthists = Display ( "Static Histogram" )
sthists.setTitle ( "Gaussian Distribution (low statistics)" )
sthists.setLabel ( 'x', 'X' )
sthists.setRange ( 'x', 0, 100)
sthists.setBinWidth ( 'x', 1. )
canvas.addDisplay ( sthists )

# Create empty NTuple and set the column label.
# Setting the column labels sets the number of columns
ntuple = NTuple ( )
ntuple.setTitle ( 'Gaussian Distribution' )
ntuple.setLabels ( ('X value', ) )