def plot(self,event,image=None): _xlab,_ylab,_title,_xmin,_ymin,_xmax,_ymax = self.fetch_labels() data = self.data args = rdict({'xlab':_xlab, 'ylab':_ylab, 'main':_title }) if _xmin and _xmax: args['xlim']=rsession.translate_to_vector([_xmin,_xmax]) if _ymin and _ymax: args['ylim']=rsession.translate_to_vector([_ymin,_ymax]) args['col'] = self.get_fill_color() args['bty'] = self.get_frame_style() args['pch'] = self.get_point_style() plotwindow = rsession.RPlotThread(data=data, args=args, type='boxplot', export=image) plotwindow.start() self.active_threads.append(plotwindow)
def plot(self,event,image=None): _xlab,_ylab,_title,_xmin,_ymin,_xmax,_ymax = self.fetch_labels() data = {'x':self.x} args = rdict({'xlab':_xlab, 'ylab':_ylab, 'main':_title }) if _xmin and _xmax: args['xlim']=rsession.translate_to_vector([_xmin,_xmax]) if _ymin and _ymax: args['ylim']=rsession.translate_to_vector([_ymin,_ymax]) #One or the other args['breaks'] = self.parameters['Bin Algorithm'].get() if self.parameters['Number of Bins']: args['breaks'] = self.parameters['Number of Bins'].get() args['col'] = self.get_fill_color() args['density'] = self.parameters['Fill Density'].get() args['freq'] = self.parameters['Frequency'].get() args['labels'] = self.parameters['Count Labels'].get() plotwindow = rsession.RPlotThread(data=data, args=args, type='histogram', export=image) plotwindow.start() self.active_threads.append(plotwindow)
def plot(self,event,image=None): _xlab,_ylab,_title,_xmin,_ymin,_xmax,_ymax = self.fetch_labels() data = {'x':self.x} args = rdict({'xlab':_xlab, 'ylab':_ylab, 'main':_title }) if _xmin and _xmax: args['xlim']=rsession.translate_to_vector([_xmin,_xmax]) if _ymin and _ymax: args['ylim']=rsession.translate_to_vector([_ymin,_ymax]) plotwindow = rsession.RPlotThread(data=data, args=args, type='bar', export=image) args['col'] = self.get_fill_color() args['density'] = self.parameters['Fill Density'].get() plotwindow.start() self.active_threads.append(plotwindow)
def plot(self,event,image=None): _xlab,_ylab,_title,_xmin,_ymin,_xmax,_ymax = self.fetch_labels() data = {'x':self.x, 'y':self.y} #We use an rdict so that any keys with empty values get thrown out and avoid conflicts with R args = rdict({'xlab':_xlab, 'ylab':_ylab, 'main':_title, }) if _xmin and _xmax: args['xlim']=rsession.translate_to_vector([_xmin,_xmax]) if _ymin and _ymax: args['ylim']=rsession.translate_to_vector([_ymin,_ymax]) #Normal Parameters args['asp'] = self.parameters['Aspect Ratio'].get() args['col'] = self.get_point_color() args['bty'] = self.get_frame_style() #R takes the first character of the type as an argument i.e 'o' = overplot args['type'] = self.parameters['Type'].get()[0].lower() args['pch'] = self.get_point_style() args['lty'] = self.get_line_style()+1 plotwindow = rsession.RPlotThread(data=data, args=args, type='scatter', export=image) plotwindow.start() self.active_threads.append(plotwindow)
def plot(self,event,image=None): _xlab,_ylab,_title,_xmin,_ymin,_xmax,_ymax = self.fetch_labels() data = {'x':self.x, 'y':self.y} args = rdict({'xlab':_xlab, 'ylab':_ylab, 'main':_title }) if _xmin and _xmax: args['xlim']=rsession.translate_to_vector([_xmin,_xmax]) if _ymin and _ymax: args['ylim']=rsession.translate_to_vector([_ymin,_ymax]) args['col'] = self.get_point_color() args['bty'] = self.get_frame_style() args['pch'] = self.get_point_style() if self.x and self.y: plotwindow = rsession.RPlotThread(data=data, args=args, type='qqplot', export=image) elif self.x: #info('qnorm') plotwindow = rsession.RPlotThread(data=data, type='qqnorm', export=image) else: error('Required variables are not set.') return plotwindow.start() self.active_threads.append(plotwindow) if self.parameters['Show Line'].get(): plotwindow.add_cmd(rsession.r['qqline'],self.x,col=self.get_line_color(),lty=self.get_line_style())