Skip to content

Commit

Permalink
Add text labels for CAC (oldLabels and newLabels, default None)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmickes committed Jan 28, 2024
1 parent 56dfcc8 commit 0e2aa8e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pyWitness/DataProcessed.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def plotROC(self, label = "ROC", relativeFrequencyScale = 800, errorType = 'bars
# Tight layout for plot
_plt.tight_layout()

def plotCAC(self, label = "CAC", relativeFrequencyScale = 800, errorType = 'bars', color = None) :
def plotCAC(self, label = "CAC", relativeFrequencyScale = 800, errorType = 'bars', color = None, oldLabels = None, newLabels = None) :
'''
Plot the confidence accuracy characteristic (CAC) for the data. The symbol size is proportional to
relative frequency. If confidence limits are calculated using calculateConfidenceBootstrap they
Expand Down Expand Up @@ -781,7 +781,10 @@ def plotCAC(self, label = "CAC", relativeFrequencyScale = 800, errorType = 'bars

ax.set_xlim(xmin-xdif*0.1, xmax+xdif*0.1)
ax.set_ylim(ymin-ydif*0.1, ymax+ydif*0.1)


if newLabels and oldLabels :
ax.set_xticks(oldLabels,labels=newLabels)

# Tight layout for plot
_plt.tight_layout()

Expand Down Expand Up @@ -923,4 +926,4 @@ def writePivotExcel(self, fileName, engine = 'openpyxl') :
'''

self.data_pivot.to_excel(fileName, engine = engine)
self.data_pivot.to_excel(fileName, engine = engine)

0 comments on commit 0e2aa8e

Please sign in to comment.