Re: [Matplotlib-users] Histogram appearance

2014-12-15 Thread Amit Saha
Hi, On Thu, Dec 4, 2014 at 7:01 AM, Dino Bektešević wrote: > Hello, > > try doing: > > import matplotlib.pyplot as plt > import random > > rolls = list() > for i in range(1000): > rolls.append(random.randint(1,6)) > > > plt.hist(rolls, bins=6) > plt.show() > > Reason why your histogram is wei

Re: [Matplotlib-users] Histogram appearance

2014-12-03 Thread Dino Bektešević
Hello, try doing: import matplotlib.pyplot as plt import random rolls = list() for i in range(1000): rolls.append(random.randint(1,6)) plt.hist(rolls, bins=6) plt.show() Reason why your histogram is weird is because you only can have 6 bins in your example. But the default bin number for

Re: [Matplotlib-users] Histogram appearance

2014-12-03 Thread Amit Saha
On Thu, Dec 4, 2014 at 6:45 AM, Brendan Barnwell wrote: > On 2014-12-03 12:39, Amit Saha wrote: >> >> Hi, >> >> Please find attached a simple histogram created using the hist() >> function. Any idea why the last two bars are squeezed into each other? >> Is there a simple way to fix this while plot

Re: [Matplotlib-users] Histogram appearance

2014-12-03 Thread Brendan Barnwell
On 2014-12-03 12:39, Amit Saha wrote: > Hi, > > Please find attached a simple histogram created using the hist() > function. Any idea why the last two bars are squeezed into each other? > Is there a simple way to fix this while plotting? It looks like the bins are set up so that there are

Re: [Matplotlib-users] Histogram with overlapping bins

2012-10-22 Thread fiolj
Hi, some time ago I needed the same thing and hacked the function histogram (from numpy or matplo. Here goes my function ## Calculates the histogram allowing for overlapping bins, which are given by # # @param a # @param bins a sequence of pairs (left,right), limits for each bin # # @return hist (

Re: [Matplotlib-users] Histogram with overlapping bins

2012-10-21 Thread fiolj
Hi, some time ago I needed the same thing and hacked the function histogram (from numpy). Here goes my function, I hope it will result useful Cheers, Juan ## Calculates the histogram allowing for overlapping bins, which are given by # # @param a # @param bins a sequence of pairs (left,rig

Re: [Matplotlib-users] Histogram with overlapping bins

2012-10-20 Thread Damon McDougall
On Sat, Oct 20, 2012 at 11:37 PM, Benjamin Root wrote: > > > On Saturday, October 20, 2012, Damon McDougall wrote: >> >> On Sat, Oct 20, 2012 at 10:25 PM, Steven Boada >> wrote: >> > It'd be cool if we could do something like >> > >> > bins = [(0.0,0.05,0.1),(0.05,0.1,0.15)...] >> > >> > Where I

Re: [Matplotlib-users] Histogram with overlapping bins

2012-10-20 Thread Benjamin Root
On Saturday, October 20, 2012, Damon McDougall wrote: > On Sat, Oct 20, 2012 at 10:25 PM, Steven Boada > > > wrote: > > It'd be cool if we could do something like > > > > bins = [(0.0,0.05,0.1),(0.05,0.1,0.15)...] > > > > Where I have specified the left edge, center and right edge of each > > bin

Re: [Matplotlib-users] Histogram with overlapping bins

2012-10-20 Thread Damon McDougall
On Sat, Oct 20, 2012 at 10:25 PM, Steven Boada wrote: > It'd be cool if we could do something like > > bins = [(0.0,0.05,0.1),(0.05,0.1,0.15)...] > > Where I have specified the left edge, center and right edge of each > bin. Yeah, that'd be pretty slick. > > S > > On Sat Oct 20 16:21:41 2012, Stev

Re: [Matplotlib-users] Histogram with overlapping bins

2012-10-20 Thread Steven Boada
It'd be cool if we could do something like bins = [(0.0,0.05,0.1),(0.05,0.1,0.15)...] Where I have specified the left edge, center and right edge of each bin. Yeah, that'd be pretty slick. S On Sat Oct 20 16:21:41 2012, Steven Boada wrote: > Let's say I generate a bunch of random numbers from

Re: [Matplotlib-users] histogram withx axis dates

2012-07-29 Thread Mark Lawrence
On 15/07/2012 04:04, William R. Wing (Bill Wing) wrote: > On Jul 14, 2012, at 8:57 AM, Mark Lawrence wrote: > >> On 14/07/2012 13:41, William R. Wing (Bill Wing) wrote: >>> On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote: >>> Sorry if I've missed this in the docs but is it possible to directl

Re: [Matplotlib-users] histogram withx axis dates

2012-07-14 Thread William R. Wing (Bill Wing)
On Jul 14, 2012, at 8:57 AM, Mark Lawrence wrote: > On 14/07/2012 13:41, William R. Wing (Bill Wing) wrote: >> On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote: >> >>> Sorry if I've missed this in the docs but is it possible to directly >>> plot a histogram with a date x axis or do I have to roll

Re: [Matplotlib-users] histogram withx axis dates

2012-07-14 Thread Damon McDougall
On Sat, Jul 14, 2012 at 01:57:13PM +0100, Mark Lawrence wrote: > On 14/07/2012 13:41, William R. Wing (Bill Wing) wrote: > > On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote: > > > >> Sorry if I've missed this in the docs but is it possible to directly > >> plot a histogram with a date x axis or do

Re: [Matplotlib-users] histogram withx axis dates

2012-07-14 Thread Mark Lawrence
On 14/07/2012 13:41, William R. Wing (Bill Wing) wrote: > On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote: > >> Sorry if I've missed this in the docs but is it possible to directly >> plot a histogram with a date x axis or do I have to roll my own? This >> is critical as I'm on a diet and trying

Re: [Matplotlib-users] histogram withx axis dates

2012-07-14 Thread William R. Wing (Bill Wing)
On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote: > Sorry if I've missed this in the docs but is it possible to directly > plot a histogram with a date x axis or do I have to roll my own? This > is critical as I'm on a diet and trying to plot my weight loss against > date :) > > -- > Cheers.

Re: [Matplotlib-users] histogram withx axis dates

2012-07-14 Thread Mark Lawrence
On 14/07/2012 13:05, Damon McDougall wrote: > On Sat, Jul 14, 2012 at 12:49:29PM +0100, Mark Lawrence wrote: >> Sorry if I've missed this in the docs but is it possible to directly >> plot a histogram with a date x axis or do I have to roll my own? This > > I'm assuming you have weight data AND da

Re: [Matplotlib-users] histogram withx axis dates

2012-07-14 Thread Damon McDougall
On Sat, Jul 14, 2012 at 12:49:29PM +0100, Mark Lawrence wrote: > Sorry if I've missed this in the docs but is it possible to directly > plot a histogram with a date x axis or do I have to roll my own? This I'm assuming you have weight data AND date data. That is, a list of dates and associated

Re: [Matplotlib-users] histogram scaling

2012-07-12 Thread Benjamin Root
On Thu, Jul 12, 2012 at 1:58 PM, Daπid wrote: > I don't know if there is any reason for not having it, but as a > workaround, you could use np.hist to get the data (syntax is the same > as mpl.hist and returns the same numbers, but without drawing) and > then renormalise and plot with mpl.bars. >

Re: [Matplotlib-users] histogram scaling

2012-07-12 Thread Eric Firing
On 2012/07/12 7:20 AM, Damon McDougall wrote: > On Thu, Jul 12, 2012 at 10:42:59AM -0400, Alan G Isaac wrote: >> This is essentially a query about why certain histogram types >> are not offered. I can see two possible answers: haven't gotten >> to them, or, don't want to offer them (e.g., they're

Re: [Matplotlib-users] histogram scaling

2012-07-12 Thread Daπid
I don't know if there is any reason for not having it, but as a workaround, you could use np.hist to get the data (syntax is the same as mpl.hist and returns the same numbers, but without drawing) and then renormalise and plot with mpl.bars. On Thu, Jul 12, 2012 at 4:42 PM, Alan G Isaac wrote: >

Re: [Matplotlib-users] histogram scaling

2012-07-12 Thread Damon McDougall
On Thu, Jul 12, 2012 at 10:42:59AM -0400, Alan G Isaac wrote: > This is essentially a query about why certain histogram types > are not offered. I can see two possible answers: haven't gotten > to them, or, don't want to offer them (e.g., they're bad practice). > > I will choose Stata as a point

Re: [Matplotlib-users] histogram and a line

2012-03-12 Thread Jerzy Karczmarczuk
Mic : Thank you for your solutions. However, with my dataset it did not work out with the following code: ... Please find attached the histogram. The dataset I am sending with next email. 1. You haven'sent *in.small.txt*, but *in.txt*, 70 MB, several millions lines. Please, be g

Re: [Matplotlib-users] histogram and a line

2012-03-11 Thread Mic
Thank you for your solutions. However, with my dataset it did not work out with the following code: import numpy as np import matplotlib.pyplot as plt with open('in.small.txt') as f: data = list(int(no.rstrip()) for no in f) mean = np.mean(data) print 'mean', mean std = np.std(data) print 'std',

Re: [Matplotlib-users] histogram and a line

2012-03-08 Thread Paul Hobson
Jerzy et al, Check out the axvline method (of pyplot or an axes object). You'll only have to specify the x-value, and it'll won't rescale your y-axis. -paul On Thu, Mar 8, 2012 at 4:50 AM, Jerzy Karczmarczuk wrote: > Nicolas Rougier, (to Mic, who can't see a histogram and a line > simultaneously

Re: [Matplotlib-users] histogram and a line

2012-03-08 Thread Jerzy Karczmarczuk
Nicolas Rougier, (to Mic, who can't see a histogram and a line simultaneously): > You need to specify the ylim because your height may be larger than your > histogram and then you cannot see it. I suspect something similar. The height of matplot_hist.png is 0.040. The line goes from 0 to 300. T

Re: [Matplotlib-users] histogram and a line

2012-03-08 Thread Nicolas Rougier
You need to specify the ylim because your height may be larger than your histogram and then you cannot see it. Here is a script that reproduce your screenshot (with random data). import numpy as np import matplotlib.pyplot as plt plt.rc('xtick', direction = 'out') plt.rc('ytick', direction =

Re: [Matplotlib-users] histogram and a line

2012-03-07 Thread Jerzy Karczmarczuk
Mic: Hello, I am able to draw a histogram with the following code: /.../ /h.hist(hist_data, bins=50, normed=True)/ However, I don't know how to draw a line for median at 249 position like in attachment. Are your axes really matplotlib axes? (I have doubts, since the vertical is not normed, al

Re: [Matplotlib-users] histogram plots color range

2012-01-30 Thread johanngoetz
nahren manuel wrote: > > Hello , > I have a two dimensional array, 40X20(rowsXcolumns). Each of the 40 rows > themselves hold values of the bins of a distribution (which is not always > normal, can expect a bimodal curve as well) > > It is little difficult to explain to I actually created a sam

Re: [Matplotlib-users] histogram plots color range

2012-01-27 Thread Tony Yu
On Fri, Jan 27, 2012 at 4:01 PM, wrote: > On Fri, Jan 27, 2012 at 12:18 PM, Tony Yu wrote: > > > > > > On Fri, Jan 27, 2012 at 11:27 AM, nahren manuel > > wrote: > >> > >> Hello , > >> I have a two dimensional array, 40X20(rowsXcolumns). Each of the 40 rows > >> themselves hold values of the bi

Re: [Matplotlib-users] histogram plots color range

2012-01-27 Thread josef . pktd
On Fri, Jan 27, 2012 at 12:18 PM, Tony Yu wrote: > > > On Fri, Jan 27, 2012 at 11:27 AM, nahren manuel > wrote: >> >> Hello , >> I have a two dimensional array, 40X20(rowsXcolumns). Each of the 40 rows >> themselves hold values of the bins of a distribution (which is not always >> normal, can exp

Re: [Matplotlib-users] histogram plots color range

2012-01-27 Thread Tony Yu
On Fri, Jan 27, 2012 at 11:27 AM, nahren manuel wrote: > Hello , > I have a two dimensional array, 40X20(rowsXcolumns). Each of the 40 rows > themselves hold values of the bins of a distribution (which is not always > normal, can expect a bimodal curve as well) > It is little difficult to explain

Re: [Matplotlib-users] Histogram with single series - colour coding different ranges?

2011-06-14 Thread Victor Hooi
Goyo, Aha, so I can call .set_facecolor() on the Patch objects, and then force the graph to re-draw(). I've tested it - it works when I do savefig(). And if I'm running it interactive, I just run matplotlib.draw() after modifying the patch list. I suppose I can combine that technique with the ca

Re: [Matplotlib-users] Histogram with single series - colour coding different ranges?

2011-06-14 Thread Victor Hooi
Ben, Awesome - thanks for the sample code. I had to make a slight change - multiplying 'y' by a float doesn't work: TypeError: can't multiply sequence by non-int of type 'float' I just did a cast to int, and it worked - not sure if this is a bad practice in Python though?: cs = (['y'] * int(

Re: [Matplotlib-users] Histogram with single series - colour coding different ranges?

2011-02-24 Thread Goyo
2011/2/22 Benjamin Root : > > Admittedly, this isn't using matplotlib's hist() function because it only > allows for one color per dataset.  However, you can use numpy's histogram > function to get the bins and counts yourself, and then use bar() to make the > bars.  bar() will allow you to color t

Re: [Matplotlib-users] Histogram with single series - colour coding different ranges?

2011-02-22 Thread Benjamin Root
On Tue, Feb 15, 2011 at 11:07 PM, Victor Hooi wrote: > heya, > > Is there an easy way to colour-code a Matplotlib histogram with a single > set of data? > > So for example, you'd have a bell-shaped histogram, and the middle 50% > might be green, the regions 20% to the left and right of that might

Re: [Matplotlib-users] histogram for discrete data

2011-02-15 Thread Paul Ivanov
Bala subramanian, on 2011-02-15 16:06, wrote: > Friends, > I created a histogram plot using data files that have discrete values > (sample file attached 'test.dat').However when i view the plot, i see that > the bars are not located exactly over the values. For example in the > attached figure (te

Re: [Matplotlib-users] Histogram - dots/circle markers

2011-02-08 Thread Benjamin Root
On Tue, Feb 8, 2011 at 6:53 AM, Curiouslearn wrote: > Hello, > > Matplotlib is so cool. I wish I had spent time learning it earlier. > Better late than never. Thanks so much to all who have worked on > developing it. > > I had a question on histograms. Instead of the bars in case of > histograms,

Re: [Matplotlib-users] Histogram without binning

2011-01-08 Thread Jose Gomez-Dans
Hi, On 8 January 2011 18:57, OKB (not okblacke) wrote: > Is there a simple way to get a > histogram that does not bin any values together at all, but simply > creates one bar for each distinct value in the dataset? You can just use the bins keyword to plt.hist (or np.hist): plt.hist ( x, bins=np

Re: [Matplotlib-users] Histogram without probability

2009-12-14 Thread Eric Firing
nbv4 wrote: > The histogram example in the matpolotlib gallery is just what I want, except > instead of "probility" shown on the Y-axis, I want the number of items that > fall into each bin to be plotted. How do I do this? Here is my code: > > import numpy as np > import matplotlib

Re: [Matplotlib-users] Histogram without probability

2009-12-14 Thread Ryan May
On Mon, Dec 14, 2009 at 7:22 PM, nbv4 wrote: > > The histogram example in the matpolotlib gallery is just what I want, except > instead of "probility" shown on the Y-axis, I want the number of items that > fall into each bin to be plotted. How do I do this? Here is my code: > >        import numpy

Re: [Matplotlib-users] Histogram example doesn't run

2009-09-02 Thread Eric O LEBIGOT (EOL)
monoped wrote: > > Hi, > > being a complete newbie, I tried to run the simple_plot example from the > website with matplotlib-0.99.0. However, I get the error message: > > > Traceback (most recent call last): >File "simp

Re: [Matplotlib-users] Histogram example doesn't run

2009-08-07 Thread Bernd Eggink
John Hunter schrieb: > On Fri, Aug 7, 2009 at 10:34 AM, John Hunter wrote: > >> Unfortunately, the exception glib.GError is gtk version dependent so I >> can't easily catch it. I am loathe to do a blanket except catch, but >> I am not sure what the alternative is here. > > I committed a change t

Re: [Matplotlib-users] Histogram example doesn't run

2009-08-07 Thread John Hunter
On Fri, Aug 7, 2009 at 10:34 AM, John Hunter wrote: > Unfortunately, the exception glib.GError is gtk version dependent so I > can't easily catch it.  I am loathe to do a blanket except catch, but > I am not sure what the alternative is here. I committed a change to the release branch (I did not

Re: [Matplotlib-users] Histogram example doesn't run

2009-08-07 Thread John Hunter
On Fri, Aug 7, 2009 at 7:47 AM, Bernd Eggink wrote: >> Christoph, is GTKAgg the default backend in the win32 installers?  It >> should be TkAgg.  Are you creating a setp.cfg when you build your >> installer, as described at Reminder to self: do not post before morning coffee. For some reason I t

Re: [Matplotlib-users] Histogram example doesn't run

2009-08-07 Thread Bernd Eggink
John Hunter schrieb: > On Fri, Aug 7, 2009 at 4:10 AM, Bernd Eggink wrote: > >> being a complete newbie, I tried to run the simple_plot example from the >> website with matplotlib-0.99.0. However, I get the error message: > >> "/usr/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py",

Re: [Matplotlib-users] Histogram example doesn't run

2009-08-07 Thread John Hunter
On Fri, Aug 7, 2009 at 4:10 AM, Bernd Eggink wrote: > being a complete newbie, I tried to run the simple_plot example from the > website with matplotlib-0.99.0. However, I get the error message: > "/usr/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py", > line 443, in __init__ >    

Re: [Matplotlib-users] Histogram with logarithmic x-axis

2009-08-05 Thread Thomas Robitaille
Matthias Michler wrote: > > > # > import numpy as np > import matplotlib.pyplot as plt > > # generate some data on log-scale > x = 10**np.random.uniform(size=1000) > # histogram with log-bining > plt.hist(x, bins=10**np.linspace(0, 1, 10)) > plt.xscale('log') > plt.show

Re: [Matplotlib-users] Histogram with logarithmic x-axis

2009-08-05 Thread Matthias Michler
On Monday 03 August 2009 20:48:52 Thomas Robitaille wrote: > Hi, > > What is the easiest way to plot a histogram with a logarithmic x-axis? The > Axes.hist() method takes a log=True/False argument, but this applies only > to the y axis. > > Is the only solution to plot a histogram of np.log10(array

Re: [Matplotlib-users] histogram with "ready" data

2009-07-13 Thread Davide Setti
ehm ehm... maybe bar() ? :-) -- Davide Setti blog: http://blog.flatlandia.eu home: http://www.flatlandia.eu -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limit

Re: [Matplotlib-users] Histogram with multiple data

2009-06-26 Thread Jae-Joon Lee
I guess you're providing an input data with a wrong shape. aa = np.transpose([listA, listB, listC]) plt.hist(aa, bins=4, histtype='bar', alpha=0.75,rwidth=0.85,label=['A','B','C']) Regards, -JJ On Thu, Jun 25, 2009 at 1:37 AM, Uma S wrote: > > Hi, > I have the same problem. If you found the

Re: [Matplotlib-users] Histogram with multiple data

2009-06-26 Thread Uma S
Hi, I have the same problem. If you found the solution could you please post? Thanks uma Yves-Alexandre wrote: > > Hi, > > I'm trying to add label to a histogram with multiple data. The doc says > "label can also be a sequence of strings" but when I try: > > plt.hist([listA, listB, listC]

Re: [Matplotlib-users] histogram colors

2009-05-06 Thread Ryan May
2009/5/6 Carlos "Guâno" Grohmann > Dears, I was wondering if I can use a custom colortable in a > histogram, to get something like this: > > http://grass.itc.it/grass64/manuals/htm/r_surf_gauss_hist.png Not directly, but you

Re: [Matplotlib-users] Histogram of 2D Data

2009-04-30 Thread Marco Gallotta
Thanks, this works well. My current result can be seen at [1]. The x data is real numbers, while the y data is integers; so I set the number of y-bins to the range of the y data. What I'd like to do now is scale the plot such that for every y value the sum of the intensities are equal. Let count[j

Re: [Matplotlib-users] Histogram of 2D Data

2009-04-29 Thread John Hunter
On Wed, Apr 29, 2009 at 9:59 AM, marcog wrote: > > Hi > > I have a set of 2 dimensional data that I would like to form a histogram > of. > Each data point is defined by an x and y variable. So essentially what I > would like to obtain is a "row" of histograms as produced by the plot.hist > functi

Re: [Matplotlib-users] histogram

2009-03-30 Thread Roban Hultman Kramer
As Darren said, normed=1 means that the integral of the histogram is normalized to one, not the height. In other words, the total area under the histogram curve is set to one. Imagine a histogram with a single bin. If the width of the bin is less than one, the height must be greater than one in or

Re: [Matplotlib-users] histogram

2009-03-30 Thread Bala subramanian
There was a typo in my previous mail. y axis goes scale is more than one when i use normed=1. I am not getting why this happens. On Mon, Mar 30, 2009 at 6:10 PM, Bala subramanian wrote: > > > > Darren, >> But y axis goes scale is than one when i use normed=1. I am not getting >> why this happen

Re: [Matplotlib-users] histogram

2009-03-30 Thread Bala subramanian
Darren, > But y axis goes scale is than one when i use normed=1. I am not getting why > this happens. > > > On Mon, Mar 30, 2009 at 5:39 PM, Darren Dale wrote: > >> On Mon, Mar 30, 2009 at 11:25 AM, Bala subramanian < >> bala.biophys...@gmail.com> wrote: >> >>> Friends, >>> >>> I tried to plot a h

Re: [Matplotlib-users] histogram

2009-03-30 Thread Darren Dale
On Mon, Mar 30, 2009 at 11:25 AM, Bala subramanian < bala.biophys...@gmail.com> wrote: > Friends, > > I tried to plot a histogram and pdf of my data (data file attached 1.dat). > When i see the figure (attached file test.png) , i see y axis more than 1 > (although it should not when i use normed=1

Re: [Matplotlib-users] histogram(x, bin): x-axis range should be based on bin.min() and bin.max() when bin is a sequence

2008-12-19 Thread Sandro Tosi
On Fri, Dec 19, 2008 at 18:47, Ondrej Certik wrote: > On Fri, Dec 19, 2008 at 6:34 PM, Sandro Tosi wrote: >> This is fixed in the latest release (0.98.4 or in 0.98.5); I'm working >> on uploading it Debian, together with John and Michael (and all dev >> team), to have a feasable release. > > Ah,

Re: [Matplotlib-users] histogram(x, bin): x-axis range should be based on bin.min() and bin.max() when bin is a sequence

2008-12-19 Thread Ondrej Certik
On Fri, Dec 19, 2008 at 6:34 PM, Sandro Tosi wrote: > Hello Ondrej, > > On Fri, Dec 19, 2008 at 18:18, Ondrej Certik wrote: >> we got this Debian bug: >> >> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503148 > ... >> I tested that this applies to 0.98.3. Is this a bug? > > This is fixed in

Re: [Matplotlib-users] histogram(x, bin): x-axis range should be based on bin.min() and bin.max() when bin is a sequence

2008-12-19 Thread Sandro Tosi
Hello Ondrej, On Fri, Dec 19, 2008 at 18:18, Ondrej Certik wrote: > we got this Debian bug: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503148 ... > I tested that this applies to 0.98.3. Is this a bug? This is fixed in the latest release (0.98.4 or in 0.98.5); I'm working on uploading

Re: [Matplotlib-users] Histogram Examples

2008-11-24 Thread Michael Droettboom
Can you be more specific about what you would like to know? I'm happy to help. Mike Ron Brennan wrote: > Hello, > > Does anyone know where I can find some histogram examples. The ones > with the documentation are not as self-explanatory as I would have liked. > > I'm not a mathematician and I

Re: [Matplotlib-users] histogram examples?

2008-11-12 Thread Michael Hannon
On Tue, Nov 11, 2008 at 08:52:15AM -1000, Eric Firing wrote: . . . > >Hi, Eric. I'm using the packages provided by Fedora: > > > >numpy.x86_64 1.2.0-1.fc9 > >python-matplotlib.x86_64 0.91.4-1.fc9 > > > >It appears that numpy is reasonably up-to-d

Re: [Matplotlib-users] histogram examples?

2008-11-11 Thread Eric Firing
Michael Hannon wrote: > On Tue, Nov 11, 2008 at 07:13:46AM -1000, Eric Firing wrote: >> Michael Hannon wrote: >>> Greetings. I need to make some histograms from within a Python program, >>> and I noticed that Matplotlib, which I've never used before, appears to >>> have that capability. >>> >>> At

Re: [Matplotlib-users] histogram examples?

2008-11-11 Thread Michael Hannon
On Tue, Nov 11, 2008 at 07:13:46AM -1000, Eric Firing wrote: > Michael Hannon wrote: > >Greetings. I need to make some histograms from within a Python program, > >and I noticed that Matplotlib, which I've never used before, appears to > >have that capability. > > > >At: > >http://matplotlib.so

Re: [Matplotlib-users] histogram examples?

2008-11-11 Thread Eric Firing
Michael Hannon wrote: > Greetings. I need to make some histograms from within a Python program, > and I noticed that Matplotlib, which I've never used before, appears to > have that capability. > > At: > http://matplotlib.sourceforge.net/ > > I see the following simple example: > > >>>

Re: [Matplotlib-users] histogram hatching

2008-08-15 Thread izak marais
the help, Izak - Original Message From: Michael Droettboom <[EMAIL PROTECTED]> To: izak marais <[EMAIL PROTECTED]> Cc: matplotlib-users@lists.sourceforge.net Sent: Thursday, June 26, 2008 2:33:11 PM Subject: Re: [Matplotlib-users] histogram hatching Thanks for pointing

Re: [Matplotlib-users] Histogram question

2008-07-26 Thread John Hunter
On Sat, Jul 26, 2008 at 3:47 PM, aditya shukla <[EMAIL PROTECTED]> wrote: > I am trying to plot a histogram of some values in an array: > eg:- > input_hist=[0.5,0.5,0.66,0.83,0.92,0.92,0.93,0.97,0.98,0.98,0.98,0.99] > after issuing the pylab.hist(input_hist) statement these are the return > values

Re: [Matplotlib-users] histogram hatching

2008-06-26 Thread Michael Droettboom
rtical patterns. The reaming styles > appear to work correctly. > > > - Original Message > From: John Hunter <[EMAIL PROTECTED]> > To: izak marais <[EMAIL PROTECTED]> > Cc: matplotlib-users@lists.sourceforge.net > Sent: Wednesday, June 25, 2008 3:49:56 PM > S

Re: [Matplotlib-users] histogram hatching

2008-06-26 Thread izak marais
IL PROTECTED]> To: izak marais <[EMAIL PROTECTED]> Cc: matplotlib-users@lists.sourceforge.net Sent: Wednesday, June 25, 2008 3:49:56 PM Subject: Re: [Matplotlib-users] histogram hatching On Wed, Jun 25, 2008 at 6:05 AM, izak marais <[EMAIL PROTECTED]> wrote: > Hi, > > I see

Re: [Matplotlib-users] histogram hatching

2008-06-25 Thread izak marais
lt;[EMAIL PROTECTED]> Cc: matplotlib-users@lists.sourceforge.net Sent: Wednesday, June 25, 2008 3:49:56 PM Subject: Re: [Matplotlib-users] histogram hatching On Wed, Jun 25, 2008 at 6:05 AM, izak marais <[EMAIL PROTECTED]> wrote: > Hi, > > I see there is a "hatch: unkn

Re: [Matplotlib-users] histogram hatching

2008-06-25 Thread John Hunter
On Wed, Jun 25, 2008 at 6:05 AM, izak marais <[EMAIL PROTECTED]> wrote: > Hi, > > I see there is a "hatch: unknown" kwarg mentioned in the hist() > documentation. Can anyone shed some light on how to use this please? I > assume it might be used to generate monochrome rectangles with > differentiati

Re: [Matplotlib-users] histogram

2008-02-04 Thread jlu
linestyle='steps' only works for plot() not hist(). To use that, I have to generate points at the edges of each histogram step... this is what my custom code does now. IDL's histogram code does this automatically. Linewidth=0 doesn't work because it removes ALL lines. I also need fill=None

Re: [Matplotlib-users] histogram

2008-02-04 Thread Pierre GM
On Monday 04 February 2008 12:28:21 jlu wrote: > Are there any plans to add to hist() the ability to do non-bar style > histograms? I mean something like the following: What about using plot w/ linestyle='steps' ? Or change the linewidth to 0 in bar --

Re: [Matplotlib-users] Histogram on shared axis

2007-11-25 Thread Tom Johnson
>histogram of f(x) is plotted horizontally (on the right) sharing > the y-axis of axis 1 Typo: histogram of f(x) is plotted horizontally (on the LEFT) sharing the y-axis of axis 1 - This SF.net email is sponsored by:

Re: [Matplotlib-users] histogram question

2007-09-24 Thread Eric Firing
Perry Greenfield wrote: > On Sep 24, 2007, at 2:32 PM, Tommy Grav wrote: > >> I need to generate a set of histograms, but would like to plot only >> the "skyline" >> of the histogram, and leave out the vertical lines where adjencent >> bars touch. >> I have looked at the docs, but nothing jumped o

Re: [Matplotlib-users] histogram question

2007-09-24 Thread Matthew Auger
I wrote the following code to do this for me...it is not entirely general (in the sense that it doesn't accept all kwargs beyond bins and hatch) and also allows me to do my own normalization But you should be able to use it pretty easily. def open_hist(arr,bins=10,norm=None,hatch=None):

Re: [Matplotlib-users] histogram question

2007-09-24 Thread Perry Greenfield
On Sep 24, 2007, at 2:32 PM, Tommy Grav wrote: > I need to generate a set of histograms, but would like to plot only > the "skyline" > of the histogram, and leave out the vertical lines where adjencent > bars touch. > I have looked at the docs, but nothing jumped out at me as the right > keyword

Re: [Matplotlib-users] Histogram orientation

2007-04-30 Thread Scott Sinclair
I see. I only checked that the code in hist() hadn't changed. I guess it pays to be thorough. Hope this didn't waste too much time. Cheers, Scott >>> Eric Firing <[EMAIL PROTECTED]> 4/30/2007 20:02 >>> Scott, In svn, barh does accept the 'log' kwarg via **kwargs, and your example works corr

Re: [Matplotlib-users] Histogram orientation

2007-04-30 Thread Eric Firing
Scott, In svn, barh does accept the 'log' kwarg via **kwargs, and your example works correctly. Here is the relevant CHANGELOG entry, after 0.90 was released: 2007-03-03 Change barh to take a kwargs dict and pass it to bar. Fixes sf bug #1669506. I think it was just a matter of c

Re: [Matplotlib-users] Histogram align 'edge' or 'center' bug?

2007-04-12 Thread David Fokkema
On Tue, 2007-04-10 at 19:03 +0300, Jouni K. Seppänen wrote: > David Fokkema <[EMAIL PROTECTED]> writes: > > > I can't think of an application where you have bins of different > > widths and you want to center the values... > > Actually, now that I think about it, there is not enough information >

Re: [Matplotlib-users] Histogram align 'edge' or 'center' bug?

2007-04-10 Thread Jouni K . Seppänen
David Fokkema <[EMAIL PROTECTED]> writes: > I can't think of an application where you have bins of different > widths and you want to center the values... Actually, now that I think about it, there is not enough information in the bin centers to know the widths of the bins if they may vary. For e

Re: [Matplotlib-users] Histogram align 'edge' or 'center' bug?

2007-04-10 Thread David Fokkema
On Tue, 2007-04-10 at 16:13 +0300, Jouni K. Seppänen wrote: > David Fokkema <[EMAIL PROTECTED]> writes: > > > I fixed the bug, I think. At least it's working on my system and I think > > it is not invasive. Comments please? I'll send it upstream otherwise... > > Does this handle the case where th

Re: [Matplotlib-users] Histogram align 'edge' or 'center' bug?

2007-04-10 Thread Jouni K . Seppänen
David Fokkema <[EMAIL PROTECTED]> writes: > I fixed the bug, I think. At least it's working on my system and I think > it is not invasive. Comments please? I'll send it upstream otherwise... Does this handle the case where the user has specified bins of different widths? It looks like you are onl

Re: [Matplotlib-users] Histogram align 'edge' or 'center' bug?

2007-04-10 Thread David Fokkema
On Sun, 2007-04-08 at 19:25 +0200, David Fokkema wrote: > On Fri, 2007-04-06 at 18:32 +0300, Jouni K. Seppänen wrote: > > David Fokkema <[EMAIL PROTECTED]> writes: > > > > > If I choose center, the result is that my histogram is calculated > > > for edge values but the bars are placed at center va

Re: [Matplotlib-users] Histogram align 'edge' or 'center' bug?

2007-04-08 Thread David Fokkema
On Fri, 2007-04-06 at 18:32 +0300, Jouni K. Seppänen wrote: > David Fokkema <[EMAIL PROTECTED]> writes: > > > If I choose center, the result is that my histogram is calculated > > for edge values but the bars are placed at center values which is > > completely misleading and wrong! I'd say this is

Re: [Matplotlib-users] Histogram align 'edge' or 'center' bug?

2007-04-06 Thread Jouni K . Seppänen
David Fokkema <[EMAIL PROTECTED]> writes: > If I choose center, the result is that my histogram is calculated > for edge values but the bars are placed at center values which is > completely misleading and wrong! I'd say this is a bug, but I may be > overlooking something here... Looks like a bug

Re: [Matplotlib-users] Histogram align 'edge' or 'center' bug?

2007-04-04 Thread David Fokkema
On Wed, 2007-04-04 at 16:26 +0200, David Fokkema wrote: > Hi group, > > I have the following ipython 'session': > > In [23]: data = [0, 0.4, 0.6, 1, 2, 3] > > In [24]: bins = [0, 1, 2, 3] > > In [25]: hist(data, bins, align='edge') > Out[25]: (array([3, 1, 1, 1]), [0, 1, 2, 3], objects>) > >

Re: [Matplotlib-users] histogram bug

2006-12-29 Thread Eric Firing
John Hunter wrote: >> "Eric" == Eric Firing <[EMAIL PROTECTED]> writes: > Eric> either, indistinguishably from the way it does now. The > Eric> problem is that with a linear axis we want the axis to start > Eric> at zero by default, but with a log axis we want it to start > > With

Re: [Matplotlib-users] histogram bug

2006-12-28 Thread John Hunter
> "Eric" == Eric Firing <[EMAIL PROTECTED]> writes: Eric> either, indistinguishably from the way it does now. The Eric> problem is that with a linear axis we want the axis to start Eric> at zero by default, but with a log axis we want it to start With ymin at 1e-100, the default (

Re: [Matplotlib-users] histogram bug

2006-12-28 Thread Eric Firing
Diwaker Gupta wrote: >> Examples: >> >> This makes a sensible plot that behaves well under zooming and panning: >> hist(randn(1000), log=True) >> show() > > Thanks! However... > >> The following still generates an exception: >> hist(randn(1000)) >> gca().set_yscale('log') >> show() > > I think t

Re: [Matplotlib-users] histogram bug

2006-12-28 Thread Diwaker Gupta
> Examples: > > This makes a sensible plot that behaves well under zooming and panning: > hist(randn(1000), log=True) > show() Thanks! However... > The following still generates an exception: > hist(randn(1000)) > gca().set_yscale('log') > show() I think this makes the API more confusing. As an

Re: [Matplotlib-users] histogram bug

2006-12-28 Thread Eric Firing
John, Thank you for your thorough and thoughtful reply. OK, I am convinced. I had not realized that the present line-drawing code actually is omitting nonpositive points, but now I see the Line.get_plottable() method. I have committed changes to svn that I think will be helpful--maybe good en

Re: [Matplotlib-users] histogram bug

2006-12-28 Thread John Hunter
> "Eric" == Eric Firing <[EMAIL PROTECTED]> writes: Eric> Adjusting zero and negative values (or maybe just zero) Eric> would be unacceptable in a numerics library, but in the Eric> context of our graphical transforms it is analogous to Eric> clipping, and this we do all the

Re: [Matplotlib-users] histogram bug

2006-12-27 Thread Eric Firing
John Hunter wrote: >> "Eric" == Eric Firing <[EMAIL PROTECTED]> writes: > > Eric> Oops, I replied to your previous message before seeing this > Eric> one. Still, the larger question remains: maybe we should do > Eric> something to make it easier for users to understand what is >

Re: [Matplotlib-users] histogram bug

2006-12-27 Thread John Hunter
> "Eric" == Eric Firing <[EMAIL PROTECTED]> writes: Eric> Oops, I replied to your previous message before seeing this Eric> one. Still, the larger question remains: maybe we should do Eric> something to make it easier for users to understand what is Eric> going on when the tra

Re: [Matplotlib-users] histogram bug

2006-12-27 Thread Eric Firing
Oops, I replied to your previous message before seeing this one. Still, the larger question remains: maybe we should do something to make it easier for users to understand what is going on when the transform chokes on log(0). Changing numbers <=0 to a small positive number and issuing a warnin

Re: [Matplotlib-users] histogram bug

2006-12-27 Thread Eric Firing
John Hunter wrote: >> "Diwaker" == Diwaker Gupta <[EMAIL PROTECTED]> writes: > > >> >> The following minimal script reveals a rendering problem > >> with >> displaying a histogram on a log vertical axis. > > Diwaker> Has this been resolved yet? I'm running Matplotlib > Diwaker

Re: [Matplotlib-users] histogram bug

2006-12-27 Thread John Hunter
> "John" == John Hunter <[EMAIL PROTECTED]> writes: John> You have to make sure your yaxis limits are strictly John> positive, eg John> ax.set_ylim(1e-3, 1e3) ax.set_yscale('log') No that won't quite do it, sorry for the noise. The problem is that the histogram bottom of the r

Re: [Matplotlib-users] histogram bug

2006-12-27 Thread John Hunter
> "Diwaker" == Diwaker Gupta <[EMAIL PROTECTED]> writes: >> >> The following minimal script reveals a rendering problem >> with >> displaying a histogram on a log vertical axis. Diwaker> Has this been resolved yet? I'm running Matplotlib Diwaker> 0.87.5-2.2 on Debian Unstable.

  1   2   >