1 | object histogram -extends base { |
---|
2 | palettes "Outputs" |
---|
3 | help http://rappture.org/wiki/rp_xml_ele_histogram |
---|
4 | attr xlabel -title "X-axis Label" -type string -path xaxis.label |
---|
5 | attr xdesc -title "X-axis Description" -type string -path xaxis.description |
---|
6 | attr xunits -title "X-axis Units" -type units -path xaxis.units |
---|
7 | attr ylabel -title "Y-axis Label" -type string -path yaxis.label |
---|
8 | attr ydesc -title "Y-axis Description" -type string -path yaxis.description |
---|
9 | attr yunits -title "Y-axis Units" -type units -path yaxis.units |
---|
10 | |
---|
11 | check label { |
---|
12 | if {[string length [string trim $attr(label)]] == 0} { |
---|
13 | return [list warning "Should set a label that describes this value."] |
---|
14 | } |
---|
15 | } |
---|
16 | check description { |
---|
17 | set desc [string trim $attr(description)] |
---|
18 | if {[string length $desc] == 0} { |
---|
19 | return [list warning "Should include a description of what this value represents, typical settings, etc."] |
---|
20 | } elseif {[string equal $desc $attr(label)]} { |
---|
21 | return [list warning "Description should be different from the label and give additional information about the value."] |
---|
22 | } |
---|
23 | } |
---|
24 | |
---|
25 | check xlabel { |
---|
26 | if {[string length [string trim $attr(xlabel)]] == 0} { |
---|
27 | return [list warning "Should set a label that describes the x-axis of this plot."] |
---|
28 | } |
---|
29 | } |
---|
30 | check xdesc { |
---|
31 | if {[string length [string trim $attr(xdesc)]] == 0} { |
---|
32 | return [list warning "Should include a description of what the x-axis represents, physical meaning, expected range, etc."] |
---|
33 | } |
---|
34 | } |
---|
35 | |
---|
36 | check ylabel { |
---|
37 | if {[string length [string trim $attr(ylabel)]] == 0} { |
---|
38 | return [list warning "Should set a label that describes the y-axis of this plot."] |
---|
39 | } |
---|
40 | } |
---|
41 | check ydesc { |
---|
42 | if {[string length [string trim $attr(ydesc)]] == 0} { |
---|
43 | return [list warning "Should include a description of what the y-axis represents, physical meaning, expected range, etc."] |
---|
44 | } |
---|
45 | } |
---|
46 | } |
---|