示例#1
0
 def _createPlot(self,
                 title,
                 xTitle,
                 yTitle,
                 md,
                 mdLabelX,
                 mdLabelY,
                 color='g',
                 figure=None):
     xplotter = XmippPlotter(figure=figure)
     xplotter.plot_title_fontsize = 11
     xplotter.createSubPlot(title, xTitle, yTitle, 1, 1)
     xplotter.plotMdFile(md, mdLabelX, mdLabelY, color)
     return xplotter
    def _createPlot(self,
                    title,
                    xTitle,
                    yTitle,
                    fnOutput,
                    mdLabelX,
                    mdLabelY,
                    color='g',
                    figure=None):
        xplotter = XmippPlotter(figure=figure)
        xplotter.plot_title_fontsize = 11
        ax = xplotter.createSubPlot(title, xTitle, yTitle, 1, 1)
        ax.set_yscale('log')
        ax.set_xscale('log')

        #plot noise and related errorbar
        fnOutputN = self.protocol._defineResultsNoiseName()
        md = xmipp.MetaData(fnOutputN)
        xValueN = md.getColumnValues(xmipp.MDL_COUNT)
        yValueN = md.getColumnValues(xmipp.MDL_AVG)
        plt.plot(xValueN,
                 yValueN,
                 '--',
                 color='r',
                 label='Aligned gaussian noise')

        # putting error bar
        md = xmipp.MetaData(fnOutputN)
        yErrN = md.getColumnValues(xmipp.MDL_STDDEV)
        xValueNe = md.getColumnValues(xmipp.MDL_COUNT)
        yValueNe = md.getColumnValues(xmipp.MDL_AVG)
        plt.errorbar(xValueNe, yValueNe, yErrN, fmt='o', color='k')

        #plot real data-set
        fnOutput = self.protocol._defineResultsName()
        md = xmipp.MetaData(fnOutput)
        xValue = md.getColumnValues(xmipp.MDL_COUNT)
        yValue = md.getColumnValues(xmipp.MDL_AVG)
        plt.plot(xValue, yValue, color='g', label='Aligned particles')

        # putting error bar
        md = xmipp.MetaData(fnOutput)
        yErr = md.getColumnValues(xmipp.MDL_STDDEV)
        xValue = md.getColumnValues(xmipp.MDL_COUNT)
        yValue = md.getColumnValues(xmipp.MDL_AVG)
        plt.errorbar(xValue, yValue, yErr, fmt='o')

        plt.legend(loc='upper right', fontsize=11)

        return xplotter
 def _createPlot(self, title, xTitle, yTitle, fnOutput, mdLabelX,
                 mdLabelY, color = 'g', figure=None):        
     xplotter = XmippPlotter(figure=figure)
     xplotter.plot_title_fontsize = 11
     ax=xplotter.createSubPlot(title, xTitle, yTitle, 1, 1)
     ax.set_yscale('log')
     ax.set_xscale('log')
                     
     #plot noise and related errorbar
     fnOutputN = self.protocol._defineResultsNoiseName()
     md = xmipp.MetaData(fnOutputN)
     xValueN = md.getColumnValues(xmipp.MDL_COUNT)
     yValueN = md.getColumnValues(xmipp.MDL_AVG)
     plt.plot(xValueN, yValueN, '--', color='r',
             label='Aligned gaussian noise')
     
     # putting error bar
     md = xmipp.MetaData(fnOutputN)
     yErrN = md.getColumnValues(xmipp.MDL_STDDEV)
     xValueNe = md.getColumnValues(xmipp.MDL_COUNT)
     yValueNe = md.getColumnValues(xmipp.MDL_AVG)
     plt.errorbar(xValueNe, yValueNe, yErrN, fmt='o', color='k')
             
     #plot real data-set
     fnOutput = self.protocol._defineResultsName()
     md = xmipp.MetaData(fnOutput)
     xValue = md.getColumnValues(xmipp.MDL_COUNT)
     yValue = md.getColumnValues(xmipp.MDL_AVG)
     plt.plot(xValue, yValue, color='g', label='Aligned particles')
             
     # putting error bar 
     md = xmipp.MetaData(fnOutput)
     yErr = md.getColumnValues(xmipp.MDL_STDDEV)
     xValue = md.getColumnValues(xmipp.MDL_COUNT)
     yValue = md.getColumnValues(xmipp.MDL_AVG)
     plt.errorbar(xValue, yValue, yErr, fmt='o')        
         
     plt.legend(loc='upper right' , fontsize = 11)
     
     return xplotter
示例#4
0
 def _createPlot(self, title, xTitle, yTitle, md, mdLabelX, mdLabelY, color='g', figure=None):        
     xplotter = XmippPlotter(figure=figure)
     xplotter.plot_title_fontsize = 11
     xplotter.createSubPlot(title, xTitle, yTitle, 1, 1)
     xplotter.plotMdFile(md, mdLabelX, mdLabelY, color)
     return xplotter