Skip to content

Commit

Permalink
Alpha on ROC plots
Browse files Browse the repository at this point in the history
  • Loading branch information
lmickes committed Apr 1, 2024
1 parent 786f862 commit adc7611
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pyWitness/DataProcessed.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ def comparePAUC(self, other):

return [D,p]

def plotROC(self, label = "ROC", relativeFrequencyScale = 800, errorType = 'bars', color = None) :
def plotROC(self, label = "ROC", relativeFrequencyScale = 800, errorType = 'bars', color = None, alpha = 1) :
'''
Plot the receiver operating characteristic (ROC) for the data. The symbol size is proportional to
relative frequency. If confidence limits are calculated using calculateConfidenceBootstrap they
Expand All @@ -665,7 +665,7 @@ def plotROC(self, label = "ROC", relativeFrequencyScale = 800, errorType = 'bars
scatter = _plt.scatter(self.data_rates.loc['targetAbsent', 'suspectId'],
self.data_rates.loc['targetPresent','suspectId'],
s = self.data_rates.loc['rf','']*relativeFrequencyScale,
label = label, color = color)
label = label, color = color, alpha = alpha)

# Plot errors if they have been calculated
try :
Expand All @@ -679,7 +679,7 @@ def plotROC(self, label = "ROC", relativeFrequencyScale = 800, errorType = 'bars
fmt='.',
color=scatter.get_facecolor()[0],
ecolor=scatter.get_facecolor()[0],
capsize=5)
capsize=5, alpha = alpha)
elif errorType == 'band' :
_plt.fill_between(self.data_rates.loc['targetAbsent', 'suspectId'],
self.data_rates.loc['targetPresent', 'suspectId_low'],
Expand Down

0 comments on commit adc7611

Please sign in to comment.