Skip to content

Commit

Permalink
Added labels to plot_pdf functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbellis committed Feb 16, 2014
1 parent 9775a1c commit 5c0fc2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lichen/plotting_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
################################################################################
# Plotting code for pdf
################################################################################
def plot_pdf(x,ypts,bin_width=1.0,scale=1.0,efficiency=1.0,axes=None,fmt='-',subranges=None,linewidth=1,linecolor=None):
def plot_pdf(x,ypts,bin_width=1.0,scale=1.0,efficiency=1.0,axes=None,fmt='-',subranges=None,linewidth=1,linecolor=None,label=None):

y = None
plot = None
Expand Down Expand Up @@ -48,9 +48,9 @@ def plot_pdf(x,ypts,bin_width=1.0,scale=1.0,efficiency=1.0,axes=None,fmt='-',sub
y *= (scale*bin_width)

if linecolor is not None:
plot = axes.plot(x,y,fmt,linewidth=linewidth,color=linecolor)
plot = axes.plot(x,y,fmt,linewidth=linewidth,color=linecolor,label=label)
else:
plot = axes.plot(x,y,fmt,linewidth=linewidth)
plot = axes.plot(x,y,fmt,linewidth=linewidth,label=label)
#ytot += y
#ax0.plot(x,ytot,'b',linewidth=3)

Expand All @@ -60,7 +60,7 @@ def plot_pdf(x,ypts,bin_width=1.0,scale=1.0,efficiency=1.0,axes=None,fmt='-',sub
################################################################################
# Plotting code for pdf
################################################################################
def plot_pdf_from_lambda(func,bin_width=1.0,scale=1.0,efficiency=None,axes=None,fmt='-',linewidth=1,subranges=None):
def plot_pdf_from_lambda(func,bin_width=1.0,scale=1.0,efficiency=None,axes=None,fmt='-',linewidth=1,subranges=None,label=None):

y = None
plot = None
Expand Down Expand Up @@ -106,7 +106,7 @@ def plot_pdf_from_lambda(func,bin_width=1.0,scale=1.0,efficiency=None,axes=None,
ypts *= eff

#print "norm*scale: ",norm*scale
ytemp,plottemp = plot_pdf(srx,ypts,bin_width=bin_width,scale=norm*scale,fmt=fmt,axes=axes,linewidth=linewidth)
ytemp,plottemp = plot_pdf(srx,ypts,bin_width=bin_width,scale=norm*scale,fmt=fmt,axes=axes,linewidth=linewidth,label=label)
y.append(ytemp)
plot.append(plottemp)
#tot_sry += y
Expand Down

0 comments on commit 5c0fc2b

Please sign in to comment.