31
"data" : (AnyType, None, pychart_util.data_desc),
32
"label": (StringType, "???", pychart_util.label_desc),
33
"data_label_offset": (CoordType, (0, 5),
31
'data' : (AnyType, None, pychart_util.data_desc),
32
'label': (StringType, '???', pychart_util.label_desc),
33
'data_label_offset': (CoordType, (0, 5),
34
34
"""The location of data labels relative to the sample point. Meaningful only when data_label_format != None."""),
35
"data_label_format": (FormatType, None,
35
'data_label_format': (FormatType, None,
36
36
"""The format string for the label printed
37
37
beside a sample point.
38
38
It can be a `printf' style format string, or
39
39
a two-parameter function that takes the (x, y)
40
40
values and returns a string. """
41
41
+ pychart_util.string_desc),
42
"xcol" : (IntType, 0, pychart_util.xcol_desc),
43
"ycol": (IntType, 1, pychart_util.ycol_desc),
44
"y_error_minus_col": (IntType, 2,
42
'xcol' : (IntType, 0, pychart_util.xcol_desc),
43
'ycol': (IntType, 1, pychart_util.ycol_desc),
44
'y_error_minus_col': (IntType, 2,
45
45
"""The column (within "data") from which the depth of the errorbar is extracted. Meaningful only when error_bar != None. <<error_bar>>"""),
46
"y_error_plus_col": (IntType, -1,
46
'y_error_plus_col': (IntType, -1,
47
47
"""The column (within "data") from which the height of the errorbar is extracted. Meaningful only when error_bar != None. <<error_bar>>"""),
48
"y_qerror_minus_col": (IntType, -1, "<<error_bar>>"),
49
"y_qerror_plus_col": (IntType, -1, "<<error_bar>>"),
48
'y_qerror_minus_col': (IntType, -1, '<<error_bar>>'),
49
'y_qerror_plus_col': (IntType, -1, '<<error_bar>>'),
51
"line_style": (line_style.T, lambda: line_style_itr.next(), pychart_util.line_desc,
51
'line_style': (line_style.T, lambda: line_style_itr.next(), pychart_util.line_desc,
52
52
"By default, a style is picked from standard styles round-robin. <<line_style>>"),
54
"tick_mark": (tick_mark.T, None, pychart_util.tick_mark_desc),
55
"error_bar": (error_bar.T, None,
56
"The style of the error bar. <<error_bar>>"),
54
'tick_mark': (tick_mark.T, None, pychart_util.tick_mark_desc),
55
'error_bar': (error_bar.T, None,
56
'The style of the error bar. <<error_bar>>'),
59
59
class T(chart_object.T):
60
60
__doc__ = line_plot_doc.doc
62
62
def check_integrity(self):
63
assert chart_object.T.check_integrity(self)
65
65
##AUTOMATICALLY GENERATED
70
70
return pychart_util.get_data_range(self.data, self.xcol)
72
72
return pychart_util.get_data_range(self.data, self.ycol)
73
def get_legend_entry(self):
73
def get_legend_entry(self):
75
return legend.Entry(line_style=self.line_style,
75
line_style = self.line_style
76
if not line_style and self.error_bar:
77
line_style = getattr(self.error_bar, 'line_style', None) or \
78
getattr(self.error_bar, 'hline_style', None) or \
79
getattr(self.error_bar, 'vline_style', None)
81
raise Exception, 'Line plot has label, but an empty line style and error bar.'
82
return legend.Entry(line_style=line_style,
76
83
tick_mark=self.tick_mark,