¡@

Home 

python Programming Glossary: canvas

Embedding a matplotlib figure inside a WxPython panel

http://stackoverflow.com/questions/10737459/embedding-a-matplotlib-figure-inside-a-wxpython-panel

This is a minimal example for a Panel with a matplotlib canvas from numpy import arange sin pi import matplotlib matplotlib.use.. Figure self.axes self.figure.add_subplot 111 self.canvas FigureCanvas self 1 self.figure self.sizer wx.BoxSizer wx.VERTICAL.. self.sizer wx.BoxSizer wx.VERTICAL self.sizer.Add self.canvas 1 wx.LEFT wx.TOP wx.GROW self.SetSizer self.sizer self.Fit def..

Add text to Existing PDF using Python

http://stackoverflow.com/questions/1180115/add-text-to-existing-pdf-using-python

to answer the question below packet StringIO.StringIO can canvas.Canvas packet pagesize letter do something with canvas can.save.. can canvas.Canvas packet pagesize letter do something with canvas can.save packet.seek 0 input PdfFileReader packet From here..

Mutli-threading python with Tkinter

http://stackoverflow.com/questions/14379106/mutli-threading-python-with-tkinter

python with Tkinter I'm drawing little circle on a canvas with these functions This is the function who draw the circles.. self.ny self.can.after 10 self.move this one create the canvas and the circles class App Frame def __init__ self self.root.. 400 height 300 self.width self.height width height self.canvas Tkinter.Canvas width width height height bg 'black' self.canvas.pack..

how to use matplotlib in django?

http://stackoverflow.com/questions/1874642/how-to-use-matplotlib-in-django

'Raining Hogs and Dogs' bbox 'facecolor' '0.8' 'pad' 5 canvas FigureCanvasAgg f response HttpResponse content_type 'image.. f response HttpResponse content_type 'image png' canvas.print_png response return response python django matplotlib..

Python- Reportlabs - save 2 different graphs in 2 different pages?

http://stackoverflow.com/questions/20343382/python-reportlabs-save-2-different-graphs-in-2-different-pages

pages of the PDF. I saw that it can be done using c canvas.Canvas hello.pdf hello c c.showPage c.save But instead of using.. pdf reportlab share improve this question Make a canvas and render your drawings on it from reportlab.pdfgen import.. render your drawings on it from reportlab.pdfgen import canvas from reportlab.graphics import renderPDF c canvas.Canvas 'hi.pdf'..

Adding a scrollbar to a grid of widgets in Tkinter

http://stackoverflow.com/questions/3085696/adding-a-scrollbar-to-a-grid-of-widgets-in-tkinter

python tkinter share improve this question Create a canvas widget and associate the scrollbars with that widget. Then into.. associate the scrollbars with that widget. Then into that canvas embed the frame that contains your label widgets. Compute the.. the width height of the frame and feed that into the canvas scrollregion option so that the scrollregion exactly matches..

Cross-platform gui toolkit for deploying Python applications

http://stackoverflow.com/questions/520015/cross-platform-gui-toolkit-for-deploying-python-applications

no built in table widget. On the other hand Tkinter's canvas and text widgets are extremely powerful and easy to use. For..

board-drawing code to move an oval

http://stackoverflow.com/questions/6740855/board-drawing-code-to-move-an-oval

board j 0 while j len board i if board i j 2 lst2.append canvas.create_oval i 1 width width 2 15 j 1 height height 2 15 i 1.. 15 fill Red outline 'Black' elif board i j 4 lst2.append canvas.create_oval i 1 width width 2 15 j 1 height height 2 15 i 1.. 15 fill Red outline 'Black' elif board i j 1 lst2.append canvas.create_oval i 1 width width 2 15 j 1 height height 2 15 i 1..

why is plotting with Matplotlib so slow?

http://stackoverflow.com/questions/8955869/why-is-plotting-with-matplotlib-so-slow

x i 10.0 line6.set_ydata sin 6 x i 10.0 draw # redraw the canvas print 'FPS ' 200 time.time tstart python matplotlib share.. lines start 1 line.set_ydata np.sin j x i 10.0 fig.canvas.draw print 'FPS ' 20 time.time tstart With the above example.. main reasons why this is as slow as it is. 1 Calling fig.canvas.draw redraws everything . It's your bottleneck. In your case..

How do you create a Button on a tkinter Canvas?

http://stackoverflow.com/questions/11980812/how-do-you-create-a-button-on-a-tkinter-canvas

do you create a Button on a tkinter Canvas I created a Frame and then a Canvas. What I want to do next.. a Button on a tkinter Canvas I created a Frame and then a Canvas. What I want to do next is to add a Button on the Canvas. However.. a Canvas. What I want to do next is to add a Button on the Canvas. However when I packed the Button I cannot see the Canvas Here..

Mutli-threading python with Tkinter

http://stackoverflow.com/questions/14379106/mutli-threading-python-with-tkinter

class App Frame def __init__ self self.root Tk self.can Canvas self.root width 800 height 600 bg black self.can.pack self.create.. self.width self.height width height self.canvas Tkinter.Canvas width width height height bg 'black' self.canvas.pack fill 'none'..

Python Tkinter scrollbar for frame

http://stackoverflow.com/questions/16188420/python-tkinter-scrollbar-for-frame

am a beginner I have to create a Frame first then create a Canvas inside that frame and stick the scroll bar to that frame as.. width 50 height 100 bd 1 myframe.place x 10 y 10 canvas Canvas myframe frame Frame canvas myscrollbar Scrollbar myframe orient..

Python- Reportlabs - save 2 different graphs in 2 different pages?

http://stackoverflow.com/questions/20343382/python-reportlabs-save-2-different-graphs-in-2-different-pages

pages of the PDF. I saw that it can be done using c canvas.Canvas hello.pdf hello c c.showPage c.save But instead of using Canvas.. hello.pdf hello c c.showPage c.save But instead of using Canvas I'm using Drawing object in which showPage method does not exist... canvas from reportlab.graphics import renderPDF c canvas.Canvas 'hi.pdf' # your drawing # drawing Drawing 400 200 x y 0 0 #..

Adding a scrollbar to a grid of widgets in Tkinter

http://stackoverflow.com/questions/3085696/adding-a-scrollbar-to-a-grid-of-widgets-in-tkinter

out. The documentation implies that only the List Textbox Canvas and Entry widgets support the scrollbar interface. None of these.. of widgets. It's possible to put arbitrary widgets in a Canvas widget but you appear to have to use absolute co ordinates so.. self root tk.Frame.__init__ self root self.canvas tk.Canvas root borderwidth 0 background #ffffff self.frame tk.Frame self.canvas..

Matplotlib: interactive plot on a web server

http://stackoverflow.com/questions/3354883/matplotlib-interactive-plot-on-a-web-server

toward web interactivity. Take a look at the new HTML5 Canvas backend. http code.google.com p mplh5canvas It's not quite finished..

How to update a plot with python and Matplotlib

http://stackoverflow.com/questions/5160558/how-to-update-a-plot-with-python-and-matplotlib

as plt from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas class Plot wx.Panel def __init__ self parent.. import FigureCanvasWxAgg as Canvas class Plot wx.Panel def __init__ self parent id 1 dpi None kwargs.. mpl.figure.Figure dpi dpi figsize 2 2 self.canvas Canvas self 1 self.figure sizer wx.BoxSizer wx.VERTICAL sizer.Add self.canvas..

How to display picture and get mouse click coordinate on it

http://stackoverflow.com/questions/5501192/how-to-display-picture-and-get-mouse-click-coordinate-on-it

frame yscroll.grid row 0 column 1 sticky N S canvas Canvas frame bd 0 xscrollcommand xscroll.set yscrollcommand yscroll.set..

How to redirect the url after logging into Facebook?

http://stackoverflow.com/questions/5730545/how-to-redirect-the-url-after-logging-into-facebook

URL http localhost 8080 redirect_url Site Domain localhost Canvas Page http apps.facebook.com registrationforms Canvas URL http.. Canvas Page http apps.facebook.com registrationforms Canvas URL http apps.facebook.com registrationforms Secure Canvas URL.. Canvas URL http apps.facebook.com registrationforms Secure Canvas URL Canvas FBML iframe iframe The code for login This piece..

Is there an interactive graphing library for python

http://stackoverflow.com/questions/5759878/is-there-an-interactive-graphing-library-for-python

written a simple prototype of my program using Tkinter Canvas but I need a more serious graphing library to expand the program...