<div dir="ltr">> <span style="font-size:12.8px">with this example, moving in the graph is very slow. </span><span style="font-size:12.8px">Is there a way to have an intelligent zoom which removes invisible items on </span><span style="font-size:12.8px">the eye?</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">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.</span></div><div><br></div><div>Mike</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 25, 2016 at 12:35 PM, nice <span dir="ltr"><<a href="mailto:sazearte@live.fr" target="_blank">sazearte@live.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">My problem: I have about 10 million point to plot.<br>
<br>
with this example, moving in the graph is very slow.<br>
Is there a way to have an intelligent zoom which removes invisible items on<br>
the eye?<br>
<br>
<br>
<br>
import matplotlib<br>
matplotlib.use('TkAgg')<br>
import numpy<br>
from numpy import arange, sin, pi<br>
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,<br>
NavigationToolbar2TkAgg<br>
from matplotlib.figure import Figure<br>
import tkinter as Tk<br>
<br>
root = Tk.Tk()<br>
root.wm_title("Embedding in TK")<br>
<br>
<br>
f = Figure(figsize=(5, 4), dpi=100)<br>
a = f.add_subplot(111)<br>
<br>
<br>
t = arange(0.0, 10000000, 1)<br>
s = arange(0.0, 10000000, 1)<br>
a.plot(t, s)<br>
<br>
<br>
canvas = FigureCanvasTkAgg(f, master=root)<br>
canvas.show()<br>
canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)<br>
<br>
toolbar = NavigationToolbar2TkAgg(canvas, root)<br>
toolbar.update()<br>
canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)<br>
<br>
<br>
def _quit():<br>
    root.quit()<br>
    root.destroy()<br>
<br>
button = Tk.Button(master=root, text='Exit', command=_quit)<br>
button.pack(side=Tk.BOTTOM)<br>
<br>
Tk.mainloop()<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://matplotlib.1069221.n5.nabble.com/matploltib-use-gpu-tp46633p46677.html" rel="noreferrer" target="_blank">http://matplotlib.1069221.n5.nabble.com/matploltib-use-gpu-tp46633p46677.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the matplotlib - users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Michael Droettboom<div>Continuum Analytics</div></div></div>
</div>