MCPcopy Index your code
hub / github.com/QuantFans/quantdigger / plot_line

Method plot_line

quantdigger/widgets/plotting.py:37–55  ·  view source on GitHub ↗

画线 :ivar data: 浮点数组。 :vartype data: list :ivar color: 画线颜色 :vartype color: str :ivar lw: 线宽 :vartype lw: int

(self, data, color, lw, style='line')

Source from the content-addressed store, hash-verified

35 self.qt_widget = QtWidget(name)
36
37 def plot_line(self, data, color, lw, style='line'):
38 """ 画线
39
40 :ivar data: 浮点数组。
41 :vartype data: list
42 :ivar color: 画线颜色
43 :vartype color: str
44 :ivar lw: 线宽
45 :vartype lw: int
46 """
47 # 区分向量绘图和逐步绘图。
48 if len(data) > 0:
49 # 区分绘图容器。
50 if isinstance(self.widget, Axes):
51 self.ax_widget.plot_line(self.widget, data, color, lw, style)
52 else:
53 self.qt_widget.plot_line(self.widget, data, color, lw, style)
54 else:
55 pass
56
57 def plot(self, widget):
58 """ 如需绘制指标,则需重载此函数。 """

Callers

nothing calls this directly

Calls 1

plot_lineMethod · 0.45

Tested by

no test coverage detected