def _figure_drift_default(self): plot = Plot(self.plot_data_drift, width=70, height=40, padding=8, padding_left=64, padding_bottom=32) plot.plot(('t','x'), type='line', color='blue', name='x') plot.plot(('t','y'), type='line', color='red', name='y') plot.plot(('t','z'), type='line', color='green', name='z') bottom_axis = PlotAxis(plot, orientation="bottom", tick_generator=ScalesTickGenerator(scale=CalendarScaleSystem())) plot.index_axis=bottom_axis plot.index_axis.title = 'time' plot.value_axis.title = 'drift [um]' plot.legend.visible=True return plot
def _bar_default(self): index = np.arange(0, len(self.current_weight)) bar_data = ArrayPlotData(index=index, value=self.current_weight) self.bar_data = bar_data bar = Plot(data=bar_data) bar.plot(('index', 'value'), type='bar', bar_width=0.8, color='auto') label_axis = LabelAxis(bar, orientation='bottom', title='components', tick_interval=1, positions=index, labels=self.header, small_haxis_style=True) bar.underlays.remove(bar.index_axis) bar.index_axis = label_axis bar.range2d.y_range.high = 1.0 return bar