comparison web/log.py @ 73:0a8639039453

Get rid of axes labels, tidy html
author Matt Johnston <matt@ucc.asn.au>
date Sun, 01 Jul 2012 00:09:50 +0800
parents 7d243ba2dd39
children ca08442635ca
comparison
equal deleted inserted replaced
71:7d243ba2dd39 73:0a8639039453
88 '-e', str(end), 88 '-e', str(end),
89 '-w', str(config.GRAPH_WIDTH), 89 '-w', str(config.GRAPH_WIDTH),
90 '-h', str(config.GRAPH_HEIGHT), 90 '-h', str(config.GRAPH_HEIGHT),
91 '--slope-mode', 91 '--slope-mode',
92 '--border', '0', 92 '--border', '0',
93 '--vertical-label', 'Voltage', 93 # '--vertical-label', 'Voltage',
94 '--y-grid', '0.1:1', 94 '--y-grid', '0.1:1',
95 '--dynamic-labels', 95 '--dynamic-labels',
96 '--grid-dash', '1:0', 96 '--grid-dash', '1:0',
97 '--color', 'GRID#00000000', 97 '--color', 'GRID#00000000',
98 '--color', 'MGRID#aaaaaa', 98 '--color', 'MGRID#aaaaaa',
103 + graph_args 103 + graph_args
104 args += ['--font', 'DEFAULT:12:%s' % config.GRAPH_FONT] 104 args += ['--font', 'DEFAULT:12:%s' % config.GRAPH_FONT]
105 args += ['--font', 'WATERMARK:10:%s' % config.GRAPH_FONT] 105 args += ['--font', 'WATERMARK:10:%s' % config.GRAPH_FONT]
106 if have_volts: 106 if have_volts:
107 args += ['--right-axis', '10:-20', # matches the scalevolts CDEF above 107 args += ['--right-axis', '10:-20', # matches the scalevolts CDEF above
108 '--right-axis-format', '%.2lf', 108 '--right-axis-format', '%.0lf',
109 '--right-axis-label', 'Temperature'] 109 # '--right-axis-label', 'Temperature'
110 ]
110 111
111 rrdtool.graph(*args) 112 rrdtool.graph(*args)
112 return tempf.read() 113 return tempf.read()
113 114
114 def sensor_update(sensor_id, measurements, first_real_time, time_step): 115 def sensor_update(sensor_id, measurements, first_real_time, time_step):