Debian Codegraph @

pltestsuite/colorgrid.htm

raw symbols SCIP
1 <html><h1>colorgrid</h1><img src="colorgrid.gif"><p>
2 <a href="gall.using.html">How to download and try this example</a><br>
3
4 <pre><b>Usage: pl -gif colorgrid.htm
5
6 This demonstrates a color grid rendered directly from a data matrix.
7
8 <hr></b>
9
10 // the following may be modified to change point shapes, sizes, etc.
11 #set SYM = "shape=nicecircle radius=0.1 style=filled"
12 #setifnotgiven CGI = "http://ploticus.sourceforge.net/cgi-bin/showcgiargs"
13
14 // set black background..
15 #proc page
16 backgroundcolor: black
17 color: white
18
19 // get data..
20 #proc getdata
21 //showresults: yes
22 data:
23 "Mammary gland" 7 23 12 8 3
24 Skin 6 12 7 4 2
25 Lymph 9 21 18 15 9
26 Lung 22 15 12 3 6
27 Digestive 5 11 14 7 9
28 "Female reproductive" 2 4 19 2 4
29 "Male reproductive" 1 3 8 7 1
30 "Soft tissues" 0 2 1 0 0
31 Endocrine 0 3 4 11 0
32
33 // set up plotting area..
34 #proc areadef
35 rectangle: 3 1 5 4
36 yscaletype: categories
37 ycategories: datafield=1
38 yaxis.stubs: usecategories
39 yaxis.tics: none
40 yaxis.axisline: none
41 yaxis.stubdetails: adjust=0.25,0
42 xrange: 0 6
43 xaxis.location: max+0.08
44 xaxis.stubs: list A\nB\nC\nD\nE
45 xaxis.tics: none
46 xaxis.axisline: none
47 xaxis.label: Test Group
48 xaxis.labeldetails: adjust=0,0.4
49
50
51 // set up legend entries for color gradients..
52 #proc legendentry
53 sampletype: symbol
54 details: fillcolor=orange @SYM
55 label: >20
56 tag: 21
57
58 #proc legendentry
59 sampletype: symbol
60 details: fillcolor=red @SYM
61 label: 11-20
62 tag: 11
63
64 #proc legendentry
65 sampletype: symbol
66 details: fillcolor=lightpurple @SYM
67 label: 6-10
68 tag: 6
69
70 #proc legendentry
71 sampletype: symbol
72 details: fillcolor=blue @SYM
73 label: 1-5
74 tag: 1
75
76 #proc legendentry
77 sampletype: symbol
78 details: fillcolor=black @SYM style=outline linecolor=gray(0.8)
79 label: None
80 tag: 0
81
82
83
84 // loop through the 5 groups (data fields), doing a legend-driven scatterplot
85 // for each, using a fixed X location..
86
87 #set FLD = 2
88 #for GROUP in A,B,C,D,E
89
90 #set XLOC = $arith(@FLD-1)
91 // #set SELECT = "@" @FLD " > 0"
92
93 #proc scatterplot
94 xlocation: @XLOC(s)
95 yfield: 1
96 symrangefield: @FLD
97 clickmapurl: @CGI?group=@GROUP&site=@@1&
98 // select: @SELECT
99
100 // increment..
101 #set FLD = $arith( @FLD+1 )
102
103 #endloop
104
105
106 #proc legend
107 location: min-1 min-0.2
108 format: singleline
109 sep: 0.5
110 outlinecolors: yes