File: symlog_demo.py

package info (click to toggle)
matplotlib 1.1.1~rc2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 66,076 kB
  • sloc: python: 90,600; cpp: 69,891; objc: 5,231; ansic: 1,723; makefile: 171; sh: 7
file content (28 lines) | stat: -rwxr-xr-x 429 bytes parent folder | download | duplicates (4)
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
27
28
#!/usr/bin/env python
from pylab import *

dt = 0.01
x = arange(-50.0, 50.0, dt)
y = arange(0, 100.0, dt)

subplot(311)
plot(x, y)
xscale('symlog')
ylabel('symlogx')
grid(True)
gca().xaxis.grid(True, which='minor')  # minor grid on too

subplot(312)
plot(y, x)
yscale('symlog')
ylabel('symlogy')


subplot(313)
plot(x, np.sin(x / 3.0))
xscale('symlog')
yscale('symlog', linthreshy=0.015)
grid(True)
ylabel('symlog both')

show()