File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,27 @@ idea).  When the figure is rendered, all of the artists are drawn to
114114the **canvas **.  Most Artists are tied to an Axes; such an Artist
115115cannot be shared by multiple Axes, or moved from one to another.
116116
117+ .. _input_types :
118+ 
119+ Types of inputs to plotting functions
120+ ===================================== 
121+ 
122+ All of plotting functions expect `np.array ` or `np.ma.masked_array ` as
123+ input.  Classes that are 'array-like' such as `pandas ` data objects
124+ and `np.matrix ` may or may not work as intended.  It is best to
125+ convert these to `np.array ` objects prior to plotting.
126+ 
127+ For example, to covert a `pandas.DataFrame ` ::
128+ 
129+   a = pandas.DataFrame(np.random.rand(4,5), columns = list('abcde')) 
130+   a_asndarray = a.values 
131+ 
132+ and to covert a `np.matrix ` ::
133+ 
134+   b = np.matrix([[1,2],[3,4]]) 
135+   b_asarray = np.asarray(b) 
136+ 
137+ 
117138
118139.. _pylab :
119140
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments