Skip to content

Commit

Permalink
[pyband] set colorbar ticklabel positiosn top when using horizontal c…
Browse files Browse the repository at this point in the history
…olorbar
  • Loading branch information
QijingZheng committed Sep 22, 2020
1 parent 9a6ae94 commit b46f70b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyband
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@ def bandplot(kpath, bands, efermi, kpt_bounds, opts, whts=None):
cbar = plt.colorbar(s_m, cax=ax_cbar,
# ticks=[0.0, 1.0],
orientation=ori)
if ori == 'horizontal':
cbar.ax.xaxis.set_ticks_position('top')
else:
cbar.ax.yaxis.set_ticks_position('right')

# cbar.ax.set_xticklabels([])
# cbar.ax.set_yticklabels([])

Expand Down

0 comments on commit b46f70b

Please sign in to comment.