Dear all,
I make a contourf plot but I think the colorbar is too wide. Can I make it narrower (slimmer)?
plt.contourf(data)
cbar=plt.colorbar()
??
thanks for any suggestions.
cheers,
Chao
···
–
Chao YUE
Laboratoire des Sciences du Climat et de l’Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
Dear all,
I make a contourf plot but I think the colorbar is too wide. Can I make
it narrower (slimmer)?
Yes, you can use the aspect kwarg. The default is 20. Try
cbar = plt.colorbar(aspect=40)
http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure.colorbar
Eric
···
On 03/29/2012 06:29 AM, Chao YUE wrote:
plt.contourf(data)
cbar=plt.colorbar()
??
thanks for any suggestions.
cheers,
Chao
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options