File: test_plot_basic.pro

package info (click to toggle)
gnudatalanguage 0.9.2-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 15,212 kB
  • sloc: cpp: 114,857; sh: 11,170; makefile: 362; awk: 18; python: 6; ansic: 4
file content (56 lines) | stat: -rw-r--r-- 1,076 bytes parent folder | download | duplicates (5)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
pro TEST_AUTOSCALE
;
a=findgen(20)
;
!p.multi=[0,2,2]
plot, a, title='positive only'
plot, a-4, title='positive and negative'
plot, a+4, title='positive only, no fit'
plot, -a, title='negative only, fit'
!p.multi=0
end
;
pro TEST_YNOZERO
;
a=findgen(20)
;
!p.multi=[0,2,2]
plot, a+10, title='positive only, no fit'
plot, a+10, /ynozero, title='positive + /Ynozero'
plot, a-40, title='negative only, no fit'
plot, a-40, title='negative only,  + /Ynozero'
!p.multi=0
;
end
;
pro TEST_ALL_EQUAL, scale=scale
;
if N_ELEMENTS(scale) EQ 0 then scale=1.
;
!p.multi=[0,2,2]
a=replicate(1., 5)*scale
plot,a, title='default positive'
plot, a, /ynozero, title='positive and /Ynozero'
;
plot,-a, title='default negative'
plot, -a, /ynozero, title='negative and /Ynozero'
;
!p.multi=0
end

pro TEST_PLOT_BASIC
;
window, 0, title='basic plotting tests'
TEST_AUTOSCALE
;
window, 1, title='/Ynozero plotting tests'
TEST_YNOZERO
;
window, 2, title='Equal data and /ynozero (scale 1)'
TEST_ALL_EQUAL
window, 3, title='Equal data and /ynozero (scale 1e-12)'
TEST_ALL_EQUAL, scale=1.e-12
;
end