Ejemplo n.º 1
0
import numpy as np
import matplotlib.pyplot as plt
import database, query, tuple_gen
import pprint
import numpy as np
import matplotlib.pyplot as plt

result = database.query(query.signalstrength_scatter_over_day())

data = tuple_gen.group_by(result, 0)

plt.figure(1)

for key in data.keys():
    #plt.subplot(3,2,axisNum)
    #plt.ylim(0,31)
    plt.title(key)

    x_ticks = tuple_gen.hour_minute_in_mins(data[key], 1, 2)
    y_vals = (tuple_gen.base_float(data[key], 3))

    heatmap, xedges, yedges = np.histogram2d(y_vals, x_ticks, bins=(100, 100))

    extent = [90, 100, 0, 100]
    #plt.clf()
    #fig.add_axes([0, 1, 0.5, 0.5])
    plt.imshow(heatmap, extent=extent)
    plt.colorbar()
    plt.show()

    #plt.plot(x_ticks,y_vals)
import numpy as np
import matplotlib.pyplot as plt
import database,query,tuple_gen
import pprint
import numpy as np
import matplotlib.pyplot as plt


result = database.query(query.signalstrength_over_hour_of_day())


data = tuple_gen.group_by(result,0)

plt.figure(1)                # the first figure

subplot_count = 511

for key in data.keys():
	plt.subplot(subplot_count)
	#plt.ylim(0,31)
	plt.title(key)
	x_ticks = tuple_gen.hour_minute_period(data[key],1,2,10)
	y_vals = (tuple_gen.base_float(data[key],3))

	plt.plot(x_ticks,y_vals)
	subplot_count+=1
	
plt.show()


Ejemplo n.º 3
0
import matplotlib.pyplot as plt
import database, query, tuple_gen
import pprint
import numpy as np
import matplotlib.pyplot as plt


result = database.query(query.ping_over_time_finegrain())


data = tuple_gen.group_by(result, 0)

plt.figure(1)                # the first figure

axisNum = 0
row = 0
col = 0
for key in data.keys():
	
	data2 = tuple_gen.group_by(data[key], 1)
	list_keys = data2.keys()
	row += 1
	col = 0
	for key2 in sorted(list_keys):
		axisNum += 1
		col += 1
		ax = plt.subplot(len(data), len(data2), axisNum)

		if row == 1 :
			plt.title(key2)
		if col == 1 :