Skip to content

Commit

Permalink
-Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onufer committed May 8, 2020
1 parent f69f2f4 commit 51b3537
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions armi/tests/tutorials/data_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@
"metadata": {},
"outputs": [],
"source": [
"core.plotFaceMap(\"power\")"
"from armi.utils import plotting\n",
"plotting.plotFaceMap(core, \"power\")"
]
},
{
Expand Down Expand Up @@ -424,7 +425,7 @@
"metadata": {},
"outputs": [],
"source": [
"core.plotFaceMap(\"power\")"
"plotting.plotFaceMap(core, \"power\")"
]
},
{
Expand Down
7 changes: 6 additions & 1 deletion armi/utils/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ def plotFaceMap(
colbar.ax.tick_params(labelsize=16)

if legendMap is not None:
legend = _createFaceMapLegend(legendMap, cmapName, collection.norm)
legend = _createFaceMapLegend(
legendMap, matplotlib.cm.get_cmap(cmapName), collection.norm
)
else:
legend = None

Expand Down Expand Up @@ -430,6 +432,9 @@ def _setPlotValText(ax, texts, core, data, labels, labelFmt, fontSize):
text = ax.text(
x, y, label, zorder=1, ha="center", va="center", fontsize=fontSize
)
else:
# labelFmt was none, so they don't want any text plotted
continue
texts.append(text)


Expand Down

0 comments on commit 51b3537

Please sign in to comment.