Ejemplo n.º 1
0
def bin_test():
    print('normal distribution, 3 bins')
    out = audioplot.plot('histogram')
    data = np.random.normal(size=1000000, loc=0, scale=1)
    out.data(data)
    out.bins(3)
    out.play()
Ejemplo n.º 2
0
def duration_test():
    print('testing shorter duration of 2 seconds')
    out = audioplot.plot('line')
    data_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    out.data(data_array)
    out.duration(2)
    out.play()
Ejemplo n.º 3
0
def linear_range_test():
    print('a linear line with adjusted audio range')
    data_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    out = audioplot.plot('line')
    out.data(data_array)
    out.audio_range(200, 250)
    out.play()
Ejemplo n.º 4
0
def bar_test():
    print('bar chart with default settings')
    data_items = ['car','bicycle','bus']
    data_values=[20,10,5]
    out = audioplot.plot('bar')
    out.data(data_values,data_items)
    out.play()
Ejemplo n.º 5
0
def rate_test():
    print('a bar chart with increased speaking rate')
    data_items = ['car','bicycle','bus']
    data_values=[20,10,5]
    out = audioplot.plot('bar')
    out.data(data_values,data_items)
    out.rate('400' )
    out.play()
Ejemplo n.º 6
0
def range_test():
    print('normal distribution with adjusted frequencies')
    out = audioplot.plot('histogram')
    data = np.random.normal(size=1000000, loc=0, scale=1)
    out.data(data)
    out.bins(3)
    out.audio_range(200, 350)
    out.play()
Ejemplo n.º 7
0
def verbose_test():
    print('a bar chart with verbose output')
    data_items = ['car','bicycle','bus']
    data_values=[20,10,5]
    out = audioplot.plot('bar')
    out.data(data_values,data_items)
    out.verbosity(True)
    out.title('A bar chart of the number of people that take different modes of transport')
    out.play()
Ejemplo n.º 8
0
def verbose_test():
    out = audioplot.plot('histogram')
    print('normal distribution with verbose True')
    data = np.random.normal(size=1000000, loc=0, scale=1)
    out.data(data)
    out.bins(3)
    out.verbosity(True)
    out.title('A normal distribution with 1,000,000 data points')
    out.play()
Ejemplo n.º 9
0
def verbose_test():
    print('testing verbose output')
    out = audioplot.plot('line')
    data_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    out.data(data_array)
    out.verbosity(True)
    out.title('A linearly rising line')
    out.xlabel('time period')
    out.ylabel('amount of an item')
    out.play()
Ejemplo n.º 10
0
def single_array_input_test():
    out = audioplot.plot('line')
    data_array = [1, 3]
    out.data(data_array, smoothed=True)
    out.play()
Ejemplo n.º 11
0
def linear_test():
    print('a linear line with no smoothing')
    data_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    out = audioplot.plot('line')
    out.data(data_array)
    out.play()
Ejemplo n.º 12
0
def exponential_test():
    print('an exponential line')
    data_array = np.logspace(2, 9, dtype='int')
    out = audioplot.plot('line')
    out.data(data_array)
    out.play()
Ejemplo n.º 13
0
def straight_test():
    print('a straight line')
    data_array = [1, 1, 1, 1, 1]
    out = audioplot.plot('line')
    out.data(data_array)
    out.play()
Ejemplo n.º 14
0
def normal_test():
    print('normal distribution, default settings')
    out = audioplot.plot('histogram')
    data = np.random.normal(size=1000000, loc=0, scale=1)
    out.data(data)
    out.play()