Created
October 21, 2011 14:32
-
-
Save cvr/1303988 to your computer and use it in GitHub Desktop.
Set a title on top of a colorbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fig=plt.figure() | |
## AXES HANDLE | |
ax=fig.add_axes(mpltr.Bbox([[ .14 , .14 ],[ .90 , .92 ]])) | |
## COLORBAR AXES HANDLE | |
cx=fig.add_axes(mpltr.Bbox([[ .91 , .14 ],[ .93 , .92 ]])) | |
... | |
## PLOT THE STUFF YOU WANT | |
ax.contourf(X, Y, Z, etc... ) | |
... | |
## COLORBAR | |
cb=plt.colorbar(cf, cax=cx) | |
plt.figtext(.91, .92, (r"Variable Z"), va='bottom', ha='left') | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment