MCPcopy
hub / github.com/PyQt5/PyQt / addData

Method addData

QtDataVisualization/ScatterVisualization.py:102–125  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

100 self.addData()
101
102 def addData(self):
103 # 添加数据
104 self.m_graph.axisX().setTitle("X")
105 self.m_graph.axisY().setTitle("Y")
106 self.m_graph.axisZ().setTitle("Z")
107
108 dataArray = []
109
110 limit = math.sqrt(self.m_itemCount) / 2.0
111 i = -limit
112 while i < limit:
113 j = -limit
114 while j < limit:
115 itm = QScatterDataItem(
116 QVector3D(i + 0.5,
117 math.cos(
118 math.radians((i * j) / self.m_curveDivider)),
119 j + 0.5))
120 dataArray.append(itm)
121 j += 1.0
122
123 i += 1.0
124
125 self.m_graph.seriesList()[0].dataProxy().resetArray(dataArray)
126
127 def changeStyle(self, style):
128 comboBox = self.sender()

Callers 2

__init__Method · 0.95
toggleItemCountMethod · 0.95

Calls 1

setTitleMethod · 0.45

Tested by

no test coverage detected