MCPcopy Index your code
hub / github.com/rawpython/remi / main

Method main

examples/svgplot_app.py:165–193  ·  view source on GitHub ↗
(self, name='world')

Source from the content-addressed store, hash-verified

163 super(MyApp, self).__init__(*args)
164
165 def main(self, name='world'):
166 self.wid = gui.VBox(margin='0px auto')
167
168 self.svgplot = SvgPlot(600, 600)
169 self.svgplot.style['margin'] = '10px'
170 self.plotData1 = SvgComposedPoly(0,0,60,2.0, 'rgba(255,0,0,0.8)')
171 self.plotData2 = SvgComposedPoly(0,0,60,1.0, 'green')
172 self.plotData3 = SvgComposedPoly(0,0,30,3.0, 'orange')
173 self.svgplot.append_poly([self.plotData1, self.plotData2, self.plotData3])
174
175 scale_factor_x = 1.0
176 scale_factor_y = 200.0
177 self.plotData1.scale(scale_factor_x, scale_factor_y)
178 self.plotData2.scale(scale_factor_x, scale_factor_y)
179 self.plotData3.scale(scale_factor_x, scale_factor_y)
180
181 self.wid.append(self.svgplot)
182
183 self.stop_flag = False
184
185 self.count = 0
186 self.add_data()
187
188 bt = gui.Button("Zoom - ")
189 bt.onclick.do(self.zoom_out)
190 self.wid.append(bt)
191
192 # returning the root widget
193 return self.wid
194
195 def on_close(self):
196 self.stop_flag = True

Callers

nothing calls this directly

Calls 7

add_dataMethod · 0.95
SvgPlotClass · 0.85
SvgComposedPolyClass · 0.85
append_polyMethod · 0.80
scaleMethod · 0.80
appendMethod · 0.45
doMethod · 0.45

Tested by

no test coverage detected