File: test_plotting_ranges.pro

package info (click to toggle)
gnudatalanguage 0.9.9-13
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 17,892 kB
  • sloc: cpp: 167,389; ansic: 9,358; sh: 566; python: 472; makefile: 252; f90: 28
file content (26 lines) | stat: -rw-r--r-- 571 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
; testing axis range-selection in various plotting routines
; TODO:
; - repeat the tests for SURFACE, CONTOUR, etc, and for X/Y axes
; - repeat the tests for autoscaling, different !*.STYLEs, and *RANGE keywords
; - test /[XY]LOG cases
pro test_plotting_ranges

  err = 0

  set_plot, 'z'

  print, '1'
  plot, [1948, 2006], [0,1]
  if !X.CRANGE[1] gt 2100 then err += 1

  print, '2'
  plot, [1, 10], /ylog
  if !Y.CRANGE[0] ne 0 then err += 1

  print, '3'
  plot, [0], yrange=[400,1500] 
  if !Y.CRANGE[1] lt 1600 then err += 1

  if err ne 0 then exit, status=1

end