1919
2020# FIXME - make this return the figure object in the future, so several views
2121# can be composed.
22- def plotPDFs (pairlist , labels = [] , offset = 'auto' , rmin = None , rmax = None ):
22+ def plotPDFs (pairlist , labels = None , offset = 'auto' , rmin = None , rmax = None ):
2323 """Plots several PDFs on top of one another.
2424
2525 pairlist -- iterable of (r, gr) pairs to plot
@@ -36,6 +36,8 @@ def plotPDFs(pairlist, labels = [], offset = 'auto', rmin = None, rmax = None):
3636 upper bound of the PDF is not altered.
3737
3838 """
39+ if labels is None :
40+ labels = []
3941 if offset is 'auto' :
4042 offset = _findOffset (pairlist )
4143
@@ -59,8 +61,8 @@ def plotPDFs(pairlist, labels = [], offset = 'auto', rmin = None, rmax = None):
5961 pylab .show ()
6062 return
6163
62- def comparePDFs (pairlist , labels = [] , rmin = None , rmax = None , show = True ,
63- maglim = None , mag = 5 , rw = None , legend = True ):
64+ def comparePDFs (pairlist , labels = None , rmin = None , rmax = None , show = True ,
65+ maglim = None , mag = 5 , rw = None , legend = True ):
6466 """Plot two PDFs on top of each other and difference curve.
6567
6668 pairlist -- iterable of (r, gr) pairs to plot
@@ -82,6 +84,8 @@ def comparePDFs(pairlist, labels = [], rmin = None, rmax = None, show = True,
8284 line. The difference curve will be in green and offset for clarity.
8385
8486 """
87+ if labels is None :
88+ labels = []
8589 rfit , grfit = pairlist [0 ]
8690 rdat , grdat = pairlist [1 ]
8791 labeldata = labels [1 ]
0 commit comments