Re: [Matplotlib-users] Newbie Q re: Lorenz attractor
Yes, absolutely it will work... so long as you do not use blitting. Blitting for mplot3d is pretty much useless anyway (I think draws of the axes occur anyway regardless of the blit mode), but it is also broken for the macosx backend, anyway. Cheers! Ben Root On Sun, Mar 8, 2015 at 8:59 PM, Amit Saha wrote: > On Mon, Mar 9, 2015 at 7:31 AM, Prahas David Nafissian > wrote: > > Hi, > > > > I want to create an animation of the Lorenz attractor, > > plotting each new point as it is generated by the > > equations. So we see the graph "being drawn" > > over time. > > You will very likely need to use the animation API for this. I > recently tried to demonstrate the Henon function in a fashion that it > appears I am drawing it over time: > https://www.youtube.com/watch?v=76ll818RlpQ > > You can see the code linked from there: > > https://github.com/amitsaha/playground/blob/master/recipes/henon_animation.py > > That might give you a starting point of what you are trying to do. > > > > > Also, as it is being drawn, I want to be able to > > rotate the screen in 3 dimensions. > > Sorry, nothing much I can add here. > > Best, > Amit. > > -- > http://echorand.me > > > -- > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Newbie Q re: Lorenz attractor
On Mon, Mar 9, 2015 at 7:31 AM, Prahas David Nafissian wrote: > Hi, > > I want to create an animation of the Lorenz attractor, > plotting each new point as it is generated by the > equations. So we see the graph "being drawn" > over time. You will very likely need to use the animation API for this. I recently tried to demonstrate the Henon function in a fashion that it appears I am drawing it over time: https://www.youtube.com/watch?v=76ll818RlpQ You can see the code linked from there: https://github.com/amitsaha/playground/blob/master/recipes/henon_animation.py That might give you a starting point of what you are trying to do. > > Also, as it is being drawn, I want to be able to > rotate the screen in 3 dimensions. Sorry, nothing much I can add here. Best, Amit. -- http://echorand.me -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Newbie Q re: Lorenz attractor
Hi, I want to create an animation of the Lorenz attractor, plotting each new point as it is generated by the equations. So we see the graph "being drawn" over time. Also, as it is being drawn, I want to be able to rotate the screen in 3 dimensions. Will MatPlot do this on a Mac (10.8.5)? Thanks! PS -- here is code using MatPlot to create the "full" Lorenz: http://matplotlib.org/examples/mplot3d/lorenz_attractor.html -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Avoid circular references with format_coord and Qt?
My knee-jerk reaction is to move the definition of `format` outside of the `Visualize.__init__` method. If you need to have hooks back into the visualize method I would use a function factory + weak refs or a class (again with weakrefs) with a `__call__` method. Tom On Sun, Mar 8, 2015 at 3:35 PM Sebastian Berg wrote: > Hey, > > probably there is nothing to help me here, but I have a QtGui, using > matplotlib and basically end up in a circular reference hell that is not > resolvable by the gc. After removing almost all circular references, the > python inherited QWidget that embeds the figurecanvas is now deleted > fine. > > The thing I end up with however is something like > > class Visualize(object): > def __init__(self): > self.figure = Figure() > canvas = FigureCanvas(self.figure) > PythonInheritedQtWidget(self).element.setWidget(canvas) > > def format(*args): > # do stuff > return something > self.axis = self.figure.add_subplot(1, 1, 1) > self.axis.format_coord = format > > # This was completely drawn with canvas and all > # PythonInheritedQtWidget is deleted fine. > > I have not been able to get a minimal test case. But I have it pinned > down that everything can get cleaned up after: > > del Visualize.axes.format_coord > > so the circular reference that makes it not collectable is only the > format_coord which is a method pointing to the class owning the figure > and the axis. I am about to just use a weak reference wrapper function > to break the circle but it seems silly. > > Anyway, I do not expect that anyone can help, and I expect it is some Qt > stuff really, but this is seriously annoying me > > - Sebastian > > -- > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Avoid circular references with format_coord and Qt?
Hey, probably there is nothing to help me here, but I have a QtGui, using matplotlib and basically end up in a circular reference hell that is not resolvable by the gc. After removing almost all circular references, the python inherited QWidget that embeds the figurecanvas is now deleted fine. The thing I end up with however is something like class Visualize(object): def __init__(self): self.figure = Figure() canvas = FigureCanvas(self.figure) PythonInheritedQtWidget(self).element.setWidget(canvas) def format(*args): # do stuff return something self.axis = self.figure.add_subplot(1, 1, 1) self.axis.format_coord = format # This was completely drawn with canvas and all # PythonInheritedQtWidget is deleted fine. I have not been able to get a minimal test case. But I have it pinned down that everything can get cleaned up after: del Visualize.axes.format_coord so the circular reference that makes it not collectable is only the format_coord which is a method pointing to the class owning the figure and the axis. I am about to just use a weak reference wrapper function to break the circle but it seems silly. Anyway, I do not expect that anyone can help, and I expect it is some Qt stuff really, but this is seriously annoying me - Sebastian signature.asc Description: This is a digitally signed message part -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users