Skip to content

Commit

Permalink
fix angle display precision and matplotlib warning (#1354)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfardell authored Aug 26, 2022
1 parent 1fb12ad commit 5062f44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Wrappers/Python/cil/utilities/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ def __show2D(self,datacontainers, title=None, slice_list=None, fix_range=False,

ang = subplot.data.geometry.config.angles

labels_new = [str(i) for i in np.take(ang.angle_data, location_new)]
axes[i].set_yticklabels(labels_new)
labels_new = ["{:.2f}".format(i) for i in np.take(ang.angle_data, location_new)]
axes[i].set_yticks(location_new, labels=labels_new)

axes[i].set_ylabel('angle / ' + str(ang.angle_unit))

Expand Down

0 comments on commit 5062f44

Please sign in to comment.