Please disregard this question, as a solution was found to this problem using the 'BoundaryNorm' function. P.Romero
---------------------------------------- > From: romero...@hotmail.com > To: matplotlib-users@lists.sourceforge.net > Date: Sun, 15 Mar 2009 13:37:04 -0700 > Subject: [Matplotlib-users] convert colormap to RGB color array > > > This is related to a previous question I had about colormaps; > Im looking for a method to evenly split up a colormap into an RGB colors > array. > something like: > > def cmap_to_array(cmap,N): > ... > > mycolors=cmap_to_array(cm.jet,20) > lev=np.arange(1,20,1) > cs=contourf(Z,lev,colors=mycolors) > > ... > > where 'mycolors' would be a 20x3 array with RGB values for 20 colors that > represent the cm.jet spectrum broken up evenly into 20 colors... > > I believe colors array can contain RGB tuples, something like > [[0.2,0.3,1],[0.3,0.5,1], ... ,[1,1,0]] should work. > > However, I dont know how to extract the tuples from an existing colormap. > How can this be done? > > > Please help... > Thanks, > > P.Romero > _________________________________________________________________ > Windows Live™ Groups: Create an online spot for your favorite groups to meet. > http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009 > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users _________________________________________________________________ Windows Live™ Contacts: Organize your contact list. http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009 ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users