[Matplotlib-users] matploltib use gpu ?

Michael Droettboom mdroettboom at continuum.io
Tue Jan 26 16:00:23 EST 2016


> with this example, moving in the graph is very slow. Is there a way to
have an intelligent zoom which removes invisible items on the eye?

We already do this kind of optimization for line plots as in your example,
so I'm surprised it's slow for you.  We don't do anything like that for
scatter plots though.

Mike

On Mon, Jan 25, 2016 at 12:35 PM, nice <sazearte at live.fr> wrote:

> My problem: I have about 10 million point to plot.
>
> with this example, moving in the graph is very slow.
> Is there a way to have an intelligent zoom which removes invisible items on
> the eye?
>
>
>
> import matplotlib
> matplotlib.use('TkAgg')
> import numpy
> from numpy import arange, sin, pi
> from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,
> NavigationToolbar2TkAgg
> from matplotlib.figure import Figure
> import tkinter as Tk
>
> root = Tk.Tk()
> root.wm_title("Embedding in TK")
>
>
> f = Figure(figsize=(5, 4), dpi=100)
> a = f.add_subplot(111)
>
>
> t = arange(0.0, 10000000, 1)
> s = arange(0.0, 10000000, 1)
> a.plot(t, s)
>
>
> canvas = FigureCanvasTkAgg(f, master=root)
> canvas.show()
> canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
>
> toolbar = NavigationToolbar2TkAgg(canvas, root)
> toolbar.update()
> canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
>
>
> def _quit():
>     root.quit()
>     root.destroy()
>
> button = Tk.Button(master=root, text='Exit', command=_quit)
> button.pack(side=Tk.BOTTOM)
>
> Tk.mainloop()
>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/matploltib-use-gpu-tp46633p46677.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>



-- 
Michael Droettboom
Continuum Analytics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160126/6128d071/attachment.html>


More information about the Matplotlib-users mailing list