Name:

asciiplot plots a function in a range using ASCII characters

Usage:

asciiplot(function, range) : (function, range) -> void

Parameters:

Description:

Example 1:

   > asciiplot(exp(x),[1;2]);
                                                                              x
                                                                            xx
                                                                         xxx   
                                                                       xx      
                                                                     xx        
                                                                  xxx          
                                                                xx             
                                                             xxx               
                                                           xx                  
                                                        xxx                    
                                                     xxx                       
                                                  xxx                          
                                               xxx                             
                                            xxx                                
                                         xxx                                   
                                     xxxx                                      
                                 xxxx                                          
                              xxx                                              
                          xxxx                                                 
                     xxxxx                                                     
                xxxxx                                                          
            xxxx                                                               
       xxxxx                                                                   
   xxxx                                                                        

Example 2:

   > asciiplot(expm1(x),[-1;2]);
                            |                                                 x
                            |                                                x
                            |                                               x  
                            |                                              x   
                            |                                             x    
                            |                                           xx     
                            |                                          x       
                            |                                         x        
                            |                                       xx         
                            |                                     xx           
                            |                                   xx             
                            |                                 xx               
                            |                                x                 
                            |                             xxx                  
                            |                           xx                     
                            |                        xxx                       
                            |                     xxx                          
                            |                 xxxx                             
                            |             xxxx                                 
                            |         xxxx                                     
                            |   xxxxxx                                         
   ---------------------xxxxxxxx-----------------------------------------------
            xxxxxxxxxxxx    |                                                  
   xxxxxxxxx                |                                                  

Example 3:

   > asciiplot(5,[-1;1]);
   5

Example 4:

   > asciiplot(exp(x),[1;1]);
   2.71828182845904523536028747135266249775724709369998
See also: plot, externalplot
Go back to the list of commands