Skip to content

Commit afdeae8

Browse files
iosbandcopybara-github
authored andcommitted
Fix to radar plot following change in matplotlib.
... we should maybe add some tests to our plotting. PiperOrigin-RevId: 394083898 Change-Id: Ic7b1cd03a537f2612b26eec08c0bb5a65f77c77e
1 parent 0faf684 commit afdeae8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bsuite/experiments/summary_analysis.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,10 @@ def _radar(
324324
ax.plot(angles, values, '-', linewidth=5, label=label,
325325
c=color, alpha=edge_alpha, zorder=zorder, linestyle=edge_style)
326326
ax.fill(angles, values, alpha=alpha, color=color, zorder=zorder)
327+
# TODO(iosband): Necessary for some change in matplotlib code...
328+
axis_angles = angles[:-1] * 180/np.pi
327329
ax.set_thetagrids(
328-
angles * 180/np.pi, map(_tag_pretify, all_tags), fontsize=18)
330+
axis_angles, map(_tag_pretify, all_tags), fontsize=18)
329331

330332
# To avoid text on top of gridlines, we flip horizontalalignment
331333
# based on label location

0 commit comments

Comments
 (0)