def _build_frames(self, *args, **kwargs): # Function automatically called at initialization, thanks to the # decorator. It will be called after "_init_data" given that it is # declared after # create a graph frame self.mygraph = self.add_frame( jk.GraphMulti(name="test", size=(500, 500), pos=(50, 50), xnpts=15, freq_up=7, bgcol="w", nlines=2, xlabel='t', ylabel='rnd')) # create a text frame self.mytext = self.add_frame( jk.Text(name="Y-overflow", size=(500, 250), pos=(600, 50), freq_up=1)) self.myscatter = self.add_frame( jk.Scatter(name="scatter", size=(500, 500), pos=(600, 350), xnpts=15, freq_up=7, bgcol="k", cmap='Reds', s=80, xylim=(0, 10, 0, 1), grid='w'))
def _init(self, *args, **kwargs): """ Function called at initialization, don't bother why for now """ self._t0 = time.time() # initialize time self.xdata = np.array([self._t0]) # time x-axis self.ydata = np.array([0.0]) # fake data y-axis # create a graph frame self.mygraph = self.add_frame( jk.Graph(name="test", size=(500, 500), pos=(50, 50), fmt="go-", xnpts=15, freq_up=7, bgcol="y", xylim=(0, 10, 0, 1))) # create a text frame self.mytext = self.add_frame( jk.Text(name="Y-overflow", size=(500, 250), pos=(600, 50), freq_up=2)) self.myimg = self.add_frame( jk.Image(name="IMG", size=(0.5, 0.5), pos=(0.2, 0.2), screen_relative=True, axrect=(0, 0, 1, 1), freq_up=3, cm_bounds=(0, 1)))
def _build_frames(self, *args, **kwargs): if core.SHOWANDORBIGIMAGE: self.img = self.add_frame( jk.Image(name="Andor", pos=(50, 100), size=[self.camsize[1], self.camsize[0]], #size=[self.camsize[0], self.camsize[1]], freq_up=7, cmap='gist_earth')) self.subimg = self.add_frame( jk.Image(name="Segments", pos=(650, 50), size=[self._subsize[1]*core.ZOONFACTORSUBIMG, self._subsize[0]*core.ZOONFACTORSUBIMG], freq_up=7, cmap='gist_earth', axrect=[0,0,1,1], centerorig=False)) self.cts = self.add_frame( jk.Text(name="Counts", size=(350, 230), pos=(10, 10), freq_up=10, rev=True, mark_line=False, scrollbar=False)) for idx, seg in enumerate(core.FIRSTSEGS): sby, sbx = self._subimgboxes[idx] self.subimg.ax.text(sbx.start + core.MARGIN, sby.stop, "#"+str(seg))
def _build_frames(self, *args, **kwargs): # Function automatically called at initialization, thanks to the # decorator. It will be called after "_init_data" given that it is # declared after # create a graph frame self.mygraph = self.add_frame( jk.Graph(name="test", size=(500, 500), pos=(50, 50), fmt="go-", xnpts=15, freq_up=7, bgcol="y", xylim=(0, 10, 0, 1), xlabel='t', ylabel='random')) # create a text frame self.mytext = self.add_frame( jk.Text(name="Y-overflow", size=(500, 250), pos=(600, 50), freq_up=1))