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

[Matplotlib-users] Histogram appearance

2014-12-03 Thread Amit Saha
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? Thanks, Amit. -- Download BIRT

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

[Matplotlib-users] Histogram with overlapping bins

2012-10-20 Thread Steven Boada
Let's say I generate a bunch of random numbers from 0-1. Then, I'd like to make a histogram of it. But here's the clincher. I'd like my bins to overlap a bit. For example, if the first bin is from 0 - 0.1, centered on 0.05, I'd like the next (second) bin to be centered on 0.1 and range from 0.0

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

[Matplotlib-users] histogram withx axis dates

2012-07-14 Thread Mark Lawrence
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. Mark Lawrence. -

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

[Matplotlib-users] histogram scaling

2012-07-12 Thread Alan G Isaac
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 of comparison. http://www.stata.com/help.cgi?hist The types are density,

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

[Matplotlib-users] histogram plots color range

2012-01-27 Thread nahren manuel
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 sample figure: http://www.flickr.com/p

[Matplotlib-users] Histogram of categorical values

2011-07-09 Thread Brendan Barnwell
Does matplotlib have a convenient way to produce a histogram of categorical (possibly non-numeric) values? I can do it with bar(), but there's a fair amount of boilerplate involved (calculating the frequencies, counting the number of distinct values, etc.). This seems like it would be

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

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

2011-02-22 Thread Victor Hooi
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 be yellow, and the 5% either side beyond that could be red. I cou

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

[Matplotlib-users] histogram for discrete data

2011-02-15 Thread Bala subramanian
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 (test.png), i see a bar (gray) placed between values 1 and 2

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,

[Matplotlib-users] Histogram - dots/circle markers

2011-02-08 Thread Curiouslearn
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, is there a way to get circle markers, where each marker represents

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

[Matplotlib-users] Histogram without binning

2011-01-08 Thread OKB (not okblacke)
A straightforward question: 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? -- --OKB (not okblacke) Brendan Barnwell "Do not follow where the path may lead. Go, instead, where ther

[Matplotlib-users] histogram bin widths

2010-05-06 Thread Michael Hoenig
Hi All, I am having trouble converting some histogram (hist) code written for an earlier version of matplotlib. It uses the "width" keyword to set up fixed-width bins. However, I can't seem to recreate the exact plots, which is what I am trying to do - and the new rwidth parameter appears to be

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

[Matplotlib-users] Histogram without probability

2009-12-14 Thread nbv4
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 matplotlib.use

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

[Matplotlib-users] histogram of mean & SD

2009-08-18 Thread questions anon
Can anyone explain how I could: -Open two shapefiles -Open a raster -Plot a histogram of the values within each shapefile on the same plot and display the mean and Standard Deviation of each plot. Thanks -- Let Crystal

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__ >    

[Matplotlib-users] Histogram example doesn't run

2009-08-07 Thread Bernd Eggink
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 "simple_plot.py", line 5, in plot(t

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

[Matplotlib-users] Histogram with logarithmic x-axis

2009-08-03 Thread Thomas Robitaille
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) and to change the tick formatter to a Log formatter, or is there a m

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

[Matplotlib-users] histogram with "ready" data

2009-07-13 Thread Davide Setti
Hi all, i need to plot an histogram from already calculated data. I think an example can be helpful :-) I have a list: [ (22, 0), (19, 1), (15, 0), ... ] while in each tuple the first number is the height of the bar (the first bar has value 22, the second has value 19...) the second is the

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]

[Matplotlib-users] Histogram with multiple data

2009-05-29 Thread Yves-Alexandre
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], bins=25, histtype='bar', alpha=0.75,rwidth=0.85,label=['A','B','C']) I got an error: "AttributeError: 'tuple' object has no attr

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

[Matplotlib-users] histogram colors

2009-05-06 Thread Guâno
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/html64_user/r_surf_gauss_hist.png thanks -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot

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

[Matplotlib-users] Histogram of 2D Data

2009-04-29 Thread marcog
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 function, stacking them next to one another in a single 3D plot. For

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

[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
Hi, we got this Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503148 Citing: " the following python code creates a histogram with an x-axis range of 0.1 min to 0.3 max (based on the mins and maxes of the x rather than bin). the bins should be used to size the axis since the user

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

[Matplotlib-users] Histogram Examples

2008-11-19 Thread Ron Brennan
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 am struggling to understand the math behind the magic. Can anyone help? Thanks, Ron ---

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: > > >>>

[Matplotlib-users] histogram examples?

2008-11-11 Thread Michael Hannon
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: >>> from pylab import randn, hist >>> x =

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

[Matplotlib-users] Histogram question

2008-07-26 Thread aditya shukla
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 that i get. (array([2, 0, 0, 1, 0, 0, 1, 0, 3, 5]), array([ 0.5 , 0.549, 0.598,

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

[Matplotlib-users] histogram hatching

2008-06-25 Thread izak marais
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 differentiating hatched fills? Regards Izak

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 --

[Matplotlib-users] histogram

2008-02-04 Thread jlu
Are there any plans to add to hist() the ability to do non-bar style histograms? I mean something like the following: <> Right now, all histograms have lines on the side of each "bar" going all the way to the base of the plot. I had to write some custom code to make this figure, but I us

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:

  1   2   >