[Matplotlib-users] Animation of a scatter plot with a large number of points

2013-08-06 Thread German Ocampo
Good afternoon.

I have a list of 2 points with coordinates x,y and category in three
lists.

x_coordinate=[3000,3100,3234,.]
x_coordinate=[15678,16768,14590,.]
category=[1,3,5,]

The categories values are between [1 and 10]

I need to make a 2D animation of this in matplotlib, starting showing the
first element and finalizing showing all elements in the graph, showing the
color points cording to the category.

I tried modifying the example of animatedScatter, but I can see that the
number of points in the scatter plot is constant from the beginning. is
there any way to make the program, for example show in the first time step
one element one point in the second time step, two points, etc? and also
one important thing is could cop with a big list of points with the minimum
lag of time in the animation?

Many thanks for your help

German
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib interactive application

2011-08-08 Thread German Ocampo
Good afternoon Experts:

Do you know if there is an py application where I can build a
matplotlib  plot interactively for data series, and then when it
finished, the source code could be exported to be used in a python
application?


Many thanks for your help,

German

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Case stories of software including Matplotlib

2010-07-27 Thread German Ocampo
Benjamin

In my case, I'm in the process of "selling" Matplotlib at the interior
of the company for that I work, and it will be a strong point if I
could get references or recommendations from  commercial software or
institutions that had success using Matplotlib.

In my point of view, the idea to add this to the webpage will be a
very good first impression of the software.

regards,

German



On Tue, Jul 27, 2010 at 3:05 PM, Benjamin Root  wrote:
> On Tue, Jul 27, 2010 at 6:01 AM, German Ocampo  wrote:
>>
>> Good morning
>>
>> Do you know where I could get examples of case stories about
>> commercial or open source software that has been developed using the
>> Matplotlib library?
>>
>> Many Thanks
>>
>> German
>>
>
> German,
>
> Interesting idea.  Might be something nice to add to the project page,
> maybe?
>
> Ben Root
>
>

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Case stories of software including Matplotlib

2010-07-27 Thread German Ocampo
Good morning

Do you know where I could get examples of case stories about
commercial or open source software that has been developed using the
Matplotlib library?

Many Thanks

German

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Zoom event assigned to a Push button in QT

2010-07-08 Thread German Ocampo
Good afternoon

I'm working in an application with a simple figure embbebed in a QT
Dialog. I want to instead of use the navigation toolbar of matplotlib,
have some Qt push buttons in the form, that allow to perform the  Zoom
and Pan. Is it possible to do it?

Many thanks for your help

German

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Animation with an image in the backgroud

2010-07-06 Thread German Ocampo
Benjamin

Thanks for your advice. I Modified the example in the way that you say
and now is working well. Basically I load the image before
copy_from_bbox and also I take out the self.ax.clear() in the
timerEvent. I'm including the program example with the animation of a
dot following a circle path with lena.png in the background.

Also I import this program in a Qt4 application and works well

Best regards

German

# For detailed comments on animation and the techniqes used here, see
# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations

import os
import sys


from matplotlib.figure import Figure
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas

from PyQt4 import QtCore, QtGui

ITERS = 5

import Image
import time
import numpy as np

class BlitQT(FigureCanvas):

def __init__(self):
FigureCanvas.__init__(self, Figure())

self.ax = self.figure.add_subplot(111)

self.draw()

file_image="lena.png"
#The size of Lena png is 480x480
self.im = Image.open(file_image)

self.im1 = self.ax.imshow(self.im, origin='lower')

self.old_size = self.ax.bbox.width, self.ax.bbox.height
self.ax_background = self.copy_from_bbox(self.ax.bbox)

self.cnt = 0
self.acum_cnt=0
self.angle = np.arange(0,2*np.pi,(2*np.pi)/100.)
self.x=240+200*np.sin(self.angle)
self.y=240+200*np.cos(self.angle)

self.circle_line, = self.ax.plot(self.x[0],self.y[0],"o",
animated=True)
self.draw()

self.tstart = time.time()
self.startTimer(10)

def timerEvent(self, evt):
current_size = self.ax.bbox.width, self.ax.bbox.height
if self.old_size != current_size:
self.old_size = current_size
self.draw()
self.ax_background = self.copy_from_bbox(self.ax.bbox)
self.restore_region(self.ax_background)

# update the data
self.circle_line.set_xdata(self.x[self.cnt:self.cnt+1])
self.circle_line.set_ydata(self.y[self.cnt:self.cnt+1])

self.ax.draw_artist(self.circle_line)

# just redraw the axes rectangle
self.blit(self.ax.bbox)

if self.cnt==99:
self.acum_cnt+=1
self.cnt=0

else:
self.cnt += 1

if self.acum_cnt==ITERS:
# print the timing info and quit
print 'FPS:' , (ITERS*100)/(time.time()-self.tstart)
sys.exit()


app = QtGui.QApplication(sys.argv)
widget = BlitQT()
widget.show()

sys.exit(app.exec_())






On Mon, Jul 5, 2010 at 6:09 PM, Benjamin Root  wrote:
> I should first note that the way to do animations in matplotlib will
> probably be improved soon, the current methods should still be valid.
>
> Ok, the way how I understand how blitting works is that a copy of the static
> background is made before any of the "sprites" are drawn.  That static
> background is then redrawn at each frame to avoid having to do a complete
> re-render of it.
>
> So, if you can display a particular image to a plot before calling
> copy_from_bbox(), but after the canvas.draw() call, then the animation
> should work as you would like with blitting, and you won't need to repeat
> the function call to plot the background in the animation.
>
> Note, I have not tried this, so please let us know how this works for you.
> Ben Root
>
>
> On Mon, Jul 5, 2010 at 5:45 AM, German Ocampo  wrote:
>>
>> Good morning
>>
>> I have a question regarding to animation in matplotlib using Blit.How
>> can I modify the example animation_blit_qt4.py that is in the
>> matplotlib website, in order to animate data, but instead of a white
>> background I want to have an image (tif or jpg)?
>>
>> Many thanks for your help
>>
>> German
>>
>>
>> --
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Animation with an image in the backgroud

2010-07-05 Thread German Ocampo
Good morning

I have a question regarding to animation in matplotlib using Blit.How
can I modify the example animation_blit_qt4.py that is in the
matplotlib website, in order to animate data, but instead of a white
background I want to have an image (tif or jpg)?

Many thanks for your help

German

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] scatter plot with discrete colorbar

2010-06-25 Thread German Ocampo
Hi

 I'm using the following code for insert a scatter plot in a figure in Qt.

vmin=min(r_time[:])
vmax=max(r_time[:])
valores=np.arange(vmin,vmax+1)
a1=self.ui.axes4.scatter(r_east,r_nort,vmin=vmin,vmax=vmax,c=r_time,edgecolors="none")
b1=self.ui.fig2.colorbar(a1,values=valores,format="%.3f",spacing="uniform")

The plot is ok and and the colors in the colorbar are ok, but for
some reason the  ticks are missing. I tried

b1=self.ui.fig2.colorbar(a1,values=valores,ticks=valores,format="%.3f",spacing="uniform")

but still the ticks doesn't appear.

How can I get the ticks in the colorbar?

Thanks

German

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Axes3D - size of the Z axe

2009-10-02 Thread German Ocampo
Hello

After search  in google, I found a solution changing the initial point
of view of the plot, using a  function which control the angle and
elevation of the initial view:

ax.view_init(elevation, azimuth) and tried and works

ax = Axes3D(fig)
ax.view_init(64, -30)

Question: Is it possible to include this function in the Axes3D
documentation web page? or where I could find it in the webpage?

http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/api.html?highlight=axes3d#module-mpl_toolkits.mplot3d.axes3d

Thanks

German


On Fri, Oct 2, 2009 at 1:24 PM, German Ocampo  wrote:
> Hello everybody
>
> How can I control the size of the Z axis in a 3D plot using Axes3D in
> matplotlib?
>
> regards
>
> german
>

--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Axes3D - size of the Z axe

2009-10-02 Thread German Ocampo
Hello everybody

How can I control the size of the Z axis in a 3D plot using Axes3D in
matplotlib?

regards

german

--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mplot3D plot_surface colors

2009-08-26 Thread German Ocampo
Mike

thanks for your answer. I will wait  for this option.

regards

german

On Wed, Aug 26, 2009 at 3:45 PM, Michael Droettboom wrote:
> Smooth Gouraud shading on surface plots is being worked on, but is not yet
> implemented.
>
> Mike
>
> German Ocampo wrote:
>>
>> Hello
>>
>> Are there some way to take out the gridlines from a surface in mplot3D
>> and get a smooth colour change?
>>
>> Thanks
>>
>> German
>>
>>
>> --
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day trial. Simplify your report design, integration and deployment - and
>> focus on what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
>

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] mplot3D plot_surface colors

2009-08-26 Thread German Ocampo
Hello

Are there some way to take out the gridlines from a surface in mplot3D
and get a smooth colour change?

Thanks

German

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Axplot3D in Qt4

2009-08-23 Thread German Ocampo
Good morning
I'm working in a project in QT4 and I need to create a 3D graph embedded in
a Widget form. Is it possible to do it? and where I could get an example?


Thanks

German
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] mplot3D and QT4

2009-08-22 Thread German Ocampo
I'm new in Python and QT, Do you  know where I could find an example of a
mplot3d plot embebed in QT4?
Thanks for your help

german
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users