MCPcopy Index your code
hub / github.com/csev/py4e / plot

Method plot

code/graphics/graphics.py:300–306  ·  view source on GitHub ↗

Set pixel (x,y) to the given color

(self, x, y, color="black")

Source from the content-addressed store, hash-verified

298 _tkCall(_root.update)
299
300 def plot(self, x, y, color="black"):
301 """Set pixel (x,y) to the given color"""
302 self.__checkOpen()
303 xs,ys = self.toScreen(x,y)
304 #self.create_line(xs,ys,xs+1,ys, fill=color)
305 _tkExec(self.create_line,xs,ys,xs+1,ys,fill=color)
306 self.__autoflush()
307
308 def plotPixel(self, x, y, color="black"):
309 """Set pixel raw (independent of window coordinates) pixel

Callers

nothing calls this directly

Calls 4

__checkOpenMethod · 0.95
toScreenMethod · 0.95
__autoflushMethod · 0.95
_tkExecFunction · 0.85

Tested by

no test coverage detected