Changeset 939 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jun 2, 2013 11:07:35 PM (10 years ago)
Author:
toby
Message:

fix & cleanup unit tests; add/change doc strings for sphinx; add all G2 py files to sphinx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r936 r939  
    11# -*- coding: utf-8 -*-
    2 #GSASII plotting routines
     2'''
     3*GSASIIplot: plotting routines*
     4===============================
     5
     6'''
    37########### SVN repository information ###################
    48# $Date$
     
    6064   
    6165class G2PlotMpl(wx.Panel):   
     66    'needs a doc string'
    6267    def __init__(self,parent,id=-1,dpi=None,**kwargs):
    6368        wx.Panel.__init__(self,parent,id=id,**kwargs)
     
    7580       
    7681class G2PlotOgl(wx.Panel):
     82    'needs a doc string'
    7783    def __init__(self,parent,id=-1,dpi=None,**kwargs):
    7884        self.figure = wx.Panel.__init__(self,parent,id=id,**kwargs)
     
    8894       
    8995class G2Plot3D(wx.Panel):
     96    'needs a doc string'
    9097    def __init__(self,parent,id=-1,dpi=None,**kwargs):
    9198        wx.Panel.__init__(self,parent,id=id,**kwargs)
     
    102109                             
    103110class G2PlotNoteBook(wx.Panel):
     111    'create a tabbed window for plotting'
    104112    def __init__(self,parent,id=-1):
    105113        wx.Panel.__init__(self,parent,id=id)
     
    118126           
    119127    def addMpl(self,name=""):
     128        'Add a tabbed page with a matplotlib plot'
    120129        page = G2PlotMpl(self.nb)
    121130        self.nb.AddPage(page,name)
     
    126135       
    127136    def add3D(self,name=""):
     137        'Add a tabbed page with a 3D plot'
    128138        page = G2Plot3D(self.nb)
    129139        self.nb.AddPage(page,name)
     
    134144       
    135145    def addOgl(self,name=""):
     146        'Add a tabbed page with an openGL plot'
    136147        page = G2PlotOgl(self.nb)
    137148        self.nb.AddPage(page,name)
     
    142153       
    143154    def Delete(self,name):
     155        'delete a tabbed page'
    144156        try:
    145157            item = self.plotList.index(name)
     
    150162               
    151163    def clear(self):
     164        'clear all pages from plot window'
    152165        while self.nb.GetPageCount():
    153166            self.nb.DeletePage(0)
     
    156169       
    157170    def Rename(self,oldName,newName):
     171        'rename a tab'
    158172        try:
    159173            item = self.plotList.index(oldName)
     
    163177            return     
    164178       
    165     def OnPageChanged(self,event):       
     179    def OnPageChanged(self,event):
     180        'respond to someone pressing a tab on the plot window'
    166181        if self.plotList:
    167182            self.status.SetStatusText('Better to select this from GSAS-II data tree',1)
     
    169184       
    170185class GSASIItoolbar(Toolbar):
     186    'needs a doc string'
    171187    ON_MPL_HELP = wx.NewId()
    172188    ON_MPL_KEY = wx.NewId()
     
    183199        wx.EVT_TOOL(self,self.ON_MPL_HELP,self.OnHelp)
    184200    def OnHelp(self,event):
     201        'needs a doc string'
    185202        Page = self.GetParent().GetParent()
    186203        pageNo = Page.GetSelection()
     
    189206        G2gd.ShowHelp(bookmark,self.TopLevelParent)
    190207    def OnKey(self,event):
     208        'needs a doc string'
    191209        parent = self.GetParent()
    192210        if parent.Choice:
     
    857875           
    858876def PlotDeltSig(G2frame,kind):
     877    'needs a doc string'
    859878    try:
    860879        plotNum = G2frame.G2plotNB.plotList.index('Error analysis')
     
    17031722           
    17041723def PlotCovariance(G2frame,Data):
     1724    'needs a doc string'
    17051725    if not Data:
    17061726        print 'No covariance matrix available'
     
    17881808
    17891809def PlotTorsion(G2frame,phaseName,Torsion,TorName,Names=[],Angles=[],Coeff=[]):
     1810    'needs a doc string'
    17901811   
    17911812    global names
     
    18451866
    18461867def PlotRama(G2frame,phaseName,Rama,RamaName,Names=[],PhiPsi=[],Coeff=[]):
     1868    'needs a doc string'
    18471869
    18481870    global names
     
    19401962           
    19411963def PlotSeq(G2frame,SeqData,SeqSig,SeqNames,sampleParm):
     1964    'needs a doc string'
    19421965   
    19431966    def OnKeyPress(event):
Note: See TracChangeset for help on using the changeset viewer.