Download this file
    
      
        27 lines (19 with data), 408 Bytes
      
      
         1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26  | #!/usr/bin/env python
 from matplotlib.matlab import *
 
 dt = 0.01
 t = arange(dt, 20.0, dt)
 
 subplot(311)
 semilogy(t, exp(-t/5.0))
 ylabel('semilogy')
 grid(True)
 
 subplot(312)
 semilogx(t, sin(2*pi*t))
 ylabel('semilogx')
 
 
 
 grid(True)
 gca().xaxis.grid(True, which='minor')  # minor grid on too
 
 subplot(313)
 loglog(t, 20*exp(-t/10.0), basex=4)
 grid(True)
 ylabel('loglog base 4 on x')
 #savefig('log_demo')
 show()
 
  | 
 
      
     
  
                     
                    
                    
                 
            
         
    
      
    
    
    
    
    
        
            ×
        
        Want the latest updates on software, tech news, and AI?
        
            
            Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.