[Matplotlib-users] Legend Bug in Pie chart with shadow=True

2007-03-18 Thread Michael
1.please compare figure 1 and figure 2

2 How to change text color on Pie chart ?
(If fragment of Pie chart is black text is unreadable )

3. Text 0.5% in figure 2 is unreadable, how correct this?
( i try use pctdistance= 1.1 but if value is format autopct='%1.4f%%' 
some text is unreadable )


#!/usr/bin/env python

from pylab import *

# make a square figure and axes
figure(1, figsize=(8,8))
ax = axes([0.1, 0.1, 0.8, 0.8])

labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
fracs = [50,25,24.5, 0.5]

figure(1)
pie(fracs, labels=labels)
legend( loc='best', shadow=True)

# figure(2) show a some optional features.  autopct is used to label
# the percentage of the pie, and can be a format string or a function
# which takes a percentage and returns a string.  explode is a
# len(fracs) sequence which gives the fraction of the radius to
# offset that slice.

figure(2, figsize=(8,8))
explode=(0, 0.05, 0, 0)
pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True)
legend( loc='best', shadow=True)
savefig('pie_demo')
show()




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] xticklabels question

2007-03-18 Thread Allan Noriel Estrella

I have an array of data that were sampled with a sampling rate of
1.5625samples/sec . I want to plot these data with the x axis showing
time in
terms of hours for the major ticks and minutes for the minor ticks in my
custom made wx App. I have been fiddling around with the HourLocator and
MinuteLocator classes but it seems I can't get them to work. Do you know an
easy way to do this? I just want to plot my data in terms of the actual
time/duration of logging they represent (in hours and/or in minutes when the
plot is zoomed in or there is less than an hour's worth of samples)
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cumulative distribution function

2007-03-18 Thread John Hunter
On 3/17/07, Simson Garfinkel [EMAIL PROTECTED] wrote:
 Hi. I haven't been active for a while, but now I have another paper
 that I need to get out...

Glad to have you back...

 Anyway, I need to draw a cumulative distribution function, as the
 reviewers of my last paper really nailed me to the wall for including
 histograms instead of CDFs. Is there any way to plot a CDF with
 matplotlib?

For analytic cdfs, see scipy.stats.  I assume you need an empirical
cdf.  You can use matplotlib.mlab.hist to compute the empirical pdf
(use normed=True to return a PDF rather than a frequency count).  Then
use numpy.cumsum to do the cumulative sum of the pdf, multiplying by
the binsize so it approximates the integral.

import matplotlib.mlab
from pylab import figure, show, nx

x = nx.mlab.randn(1)
p,bins = matplotlib.mlab.hist(x, 50, normed=True)
db = bins[1]-bins[0]
cdf = nx.cumsum(p*db)

fig = figure()
ax = fig.add_subplot(111)
ax.bar(bins, cdf, width=0.8*db)
show()

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] xticklabels question

2007-03-18 Thread John Hunter
On 3/18/07, Allan Noriel Estrella [EMAIL PROTECTED] wrote:
 I have an array of data that were sampled with a sampling rate of 1.5625
 samples/sec . I want to plot these data with the x axis showing time in
 terms of hours for the major ticks and minutes for the minor ticks in my
 custom made wx App. I have been fiddling around with the HourLocator and
 MinuteLocator classes but it seems I can't get them to work. Do you know an
 easy way to do this? I just want to plot my data in terms of the actual
 time/duration of logging they represent (in hours and/or in minutes when the
 plot is zoomed in or there is less than an hour's worth of samples)

Well, the HourLocator, MiinuteLocator, etc are for times and not
durations.  If you want durations, just use plot and not plot_date.
Does that help?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cumulative distribution function

2007-03-18 Thread Simson Garfinkel

On Mar 18, 2007, at 12:41 PM, John Hunter wrote:

 On 3/17/07, Simson Garfinkel [EMAIL PROTECTED] wrote:
 Hi. I haven't been active for a while, but now I have another paper
 that I need to get out...

 Glad to have you back...

Thanks.  I've taken a new job, moved to california, and have been  
flying between the two coasts every week. It doesn't leave much time  
for mailing lists...


 Anyway, I need to draw a cumulative distribution function, as the
 reviewers of my last paper really nailed me to the wall for including
 histograms instead of CDFs. Is there any way to plot a CDF with
 matplotlib?

 For analytic cdfs, see scipy.stats.  I assume you need an empirical
 cdf.  You can use matplotlib.mlab.hist to compute the empirical pdf
 (use normed=True to return a PDF rather than a frequency count).  Then
 use numpy.cumsum to do the cumulative sum of the pdf, multiplying by
 the binsize so it approximates the integral.

 import matplotlib.mlab
 from pylab import figure, show, nx

 x = nx.mlab.randn(1)
 p,bins = matplotlib.mlab.hist(x, 50, normed=True)
 db = bins[1]-bins[0]
 cdf = nx.cumsum(p*db)

 fig = figure()
 ax = fig.add_subplot(111)
 ax.bar(bins, cdf, width=0.8*db)
 show()


Thanks! I'll try it out and see what happens.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Ipython and python2.5

2007-03-18 Thread Fernando Perez
On 1/26/07, Fernando Perez [EMAIL PROTECTED] wrote:
 On 1/25/07, Alan G Isaac [EMAIL PROTECTED] wrote:
  On Wed, 24 Jan 2007, Fernando Perez apparently wrote:
   Let us know if this is not enough or if you have any other issues.
 
  How about for Windows users?  You list as dependencies:

[...]

 We obviously need to update the windows documentation...

Done in SVN, thanks for reporting this.

regards,

f

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] PDF Backend problem still unresolved

2007-03-18 Thread kc106_2005-matplotlib
Thanks for the reply, Jouni.

I am running Python 2.3 on Windows XP, latest version of MPL.

I'll see if I can reproduce the problem using standard examples.



Regards,

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Jouni K Seppänen
 Sent: Saturday, March 17, 2007 1:06 PM
 To: matplotlib-users@lists.sourceforge.net
 Subject: Re: [Matplotlib-users] PDF Backend problem still unresolved
 
 
  [EMAIL PROTECTED] writes:
 
   Starting with the 9th page, MPL chokes at line 1084 in 
   backend_pdf.py
  Jouni posted a couple of responses witih suggestions in CVS 
 syntax but 
  I was unable to use that information.
 
 I had to take my laptop to be to be repaired, so I can't do 
 much work on Matplotlib right now. In the meantime, please 
 post some more information: what version of Python and 
 Matplotlib is this, on which platform, can you reduce your 
 code to a small example that exhibits the bug, what output do 
 you get with verbose.level: debug?
 
 --
 Jouni
 
 
 
 --
 ---
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the 
 chance to share your opinions on IT  business topics through 
 brief surveys-and earn cash 
 http://www.techsay.com/default.php?page=join.phpp=sourceforge
CID=DEVDEV
___
Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

 
--
John Henry



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users