[Matplotlib-users] font size on DateFormatter

2007-09-05 Thread Frank Singleton
Hi , I am plotting some date based data (dates/values). Seems to work ok. The code snippet is below. But what I am trying to do is set the font size of the (%b) month labels (Jan,Feb etc) as they are too big for my small graph and they run into each other .. ax.xaxis.set_major_formatter( DateF

Re: [Matplotlib-users] Vector magnitude?

2007-09-05 Thread Steve Schmerler
Robert Dailey wrote: > Hi, > > I have two questions: > > 1) Is there any way to represent vectors? Currently I'm using 'array' for > vectors. > I suppose you mean vectors in the Matlab way? Then you should have a look at http://scipy.org/NumPy_for_Matlab_Users#head-e9a492daa18afcd86e84e07cd2824

Re: [Matplotlib-users] NameError: global name '__loader__' is not defined

2007-09-05 Thread Eric Firing
Hal Huntley wrote: > I'm a sys admin trying to install the matplotlib python package for someone > on our staff. I'm not overly familar with python. > > We are trying to use matplotlib with pylab. > > uname -a > Linux andromeda 2.6.13-1.1532_FC4smp #1 SMP Thu Oct 20 01:51:51 EDT 2005 > i686 i68

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread Eric Firing
C M wrote: > > > > x = [1,2,3] > > y = [10,20,30] > > self.subplot.plot(x, y) > > I don't understand--where did "self" come from? > > > Sorry--"self" here refers to an instance of a wxPanel class in my > wxPython app. > It is the parent window for the mpl subplot which is

[Matplotlib-users] NameError: global name '__loader__' is not defined

2007-09-05 Thread Hal Huntley
I'm a sys admin trying to install the matplotlib python package for someone on our staff. I'm not overly familar with python. We are trying to use matplotlib with pylab. uname -a Linux andromeda 2.6.13-1.1532_FC4smp #1 SMP Thu Oct 20 01:51:51 EDT 2005 i686 i686 i386 GNU/Linux The python versio

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread C M
> x = [1,2,3] > > y = [10,20,30] > > self.subplot.plot(x, y) > > I don't understand--where did "self" come from? Sorry--"self" here refers to an instance of a wxPanel class in my wxPython app. It is the parent window for the mpl subplot which is meant to be a child of it. The subplot is itself a

Re: [Matplotlib-users] table data type and plot functions?

2007-09-05 Thread Eric Firing
Ping Yeh wrote: > 2007/9/5, Eric Firing <[EMAIL PROTECTED]>: >> Ping Yeh wrote: >> [snip] >>> If there is no existing modules for this I'll go ahead write one. :) >> There is nothing quite like this. As a starting point, though, you >> should become familiar with the ability of numpy to handle re

[Matplotlib-users] Vector magnitude?

2007-09-05 Thread Robert Dailey
Hi, I have two questions: 1) Is there any way to represent vectors? Currently I'm using 'array' for vectors. 2) Is there a way to calculate the magnitude (length) of a vector? Thanks. - This SF.net email is sponsored by: Sp

Re: [Matplotlib-users] table data type and plot functions?

2007-09-05 Thread Ping Yeh
Hello, Thanks to quick hints/tips from Eric and Lionel, I have a module for conditional plotting and histogramming without defining a table type! It works with numerical arrays quite well, but does not work on string arrays in conditions. I paste the code below since they are quite short. Hope th

Re: [Matplotlib-users] How to set the colorbar ticks fontsize.

2007-09-05 Thread Xavier Gnata
Eric Firing wrote: > Xavier Gnata wrote: >> Hi all, >> >> I looking for a way to modify the colorbar ticks font size. >> a=rand(100,100) >> imshow(a) >> colorbar() >> and then?? >> >> For instance, xticks(fontsize=20) works well to modify the ticks >> fontsize along the X-axis but colorbar(fontsiz

[Matplotlib-users] [Fwd: simple animation question]

2007-09-05 Thread Andres Luhamaa
Hi all! I'm new to matplotlib so please excuse me, if this is a bit too simple problem. I'm trying to animate simple plot using example anim.py It works well when I just write functions as follows: def joonista(x): line, = p.plot(ala, x) p.draw() time.sleep(0.1) def lpc(x): x2=emp

Re: [Matplotlib-users] table data type and plot functions?

2007-09-05 Thread Ping Yeh
Hi Lionel, Thanks for the tips. The histogram plot I need can be done by hist(x). :) I tried your commands and I like the find() function! However, xi = x[ind] failed with an "IndexError: invalid index". The same operation can be done with xi = array([x[i] for i in ind]) but if a numpy function c

Re: [Matplotlib-users] table data type and plot functions?

2007-09-05 Thread Ping Yeh
2007/9/5, Eric Firing <[EMAIL PROTECTED]>: > Ping Yeh wrote: > [snip] > > > > If there is no existing modules for this I'll go ahead write one. :) > > There is nothing quite like this. As a starting point, though, you > should become familiar with the ability of numpy to handle record > arrays; y

Re: [Matplotlib-users] table data type and plot functions?

2007-09-05 Thread Lionel Roubeyrie
Hi Ping, don't know if it could help you : from pylab import * > d = Table("xyt.dat") x,y,t = load("xyt.dat", unpack=true) > d.plot("x", "t")# make a plot of x vs. t, N points are drawn plot(t, x) > d.plot("x") # make a histogram plot of x, N entries in the histogram bar(range(len(x)),

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread Eric Firing
C M wrote: [...] > So basically I need to use plot_date but in a figure embedded in a > wxPython app. > Still not sure how this should be written. To make it simple, this > plot() command > works in my app already: > > x = [1,2,3] > y = [10,20,30] > self.subplot.plot(x, y) I don't understand--

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread Mark Bakker
Hey Che - If you include your graphs in a wxPython app, you shouldn't use pylab. Pylab is a wrapper to (quickly) generate graphs, and is very useful, especially in interactive mode, as it saves a lot of typing and is much easier to understand (indeed, a lot like matlab plotting). But for inclusion

Re: [Matplotlib-users] table data type and plot functions?

2007-09-05 Thread Eric Firing
Ping Yeh wrote: > Hi, > > I checked the manual and briefly searched the mailing list but did not > find this... Is there a table-like data type with rows as events and > columns as attributes that I can make plots with? This is called > "ntuple" in the high energy physics community. > > Let me il

[Matplotlib-users] table data type and plot functions?

2007-09-05 Thread Ping Yeh
Hi, I checked the manual and briefly searched the mailing list but did not find this... Is there a table-like data type with rows as events and columns as attributes that I can make plots with? This is called "ntuple" in the high energy physics community. Let me illustrate with an example. Assume

Re: [Matplotlib-users] basic understanding of plotting dates

2007-09-05 Thread C M
On 9/4/07, Eric Firing <[EMAIL PROTECTED]> wrote: > > C M wrote: > > I realize that the clearer question (and one which ties into my original > > thread) is: do I need pylab to do plot_date()? > > No, plot_date is available as an axes method. Most pylab plotting > commands are thin wrappers for a