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 sample figure:
 
 http://www.flickr.com/photos/nahrenmascarenhas/6771369071/in/photostream
 
 Any help or trick will be very useful
 loads of thanks
 
 nahren
 

I took some of the code that I use regularly and came up with this minimal
example of fitting data very similar to the figure you showed above. I hope
the explanations in the code are clear enough.

https://sites.google.com/site/theodoregoetz/notes/fittingaprofilein2dhistogramdata
link to my website with code example 

Here is the code and the output figure. Hope this helps someone!
Johann.

http://old.nabble.com/file/p33231288/y_profile.py y_profile.py 
http://old.nabble.com/file/p33231288/y_profile.png 




-- 
View this message in context: 
http://old.nabble.com/histogram-plots-color-range-tp33215265p33231288.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[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/photos/nahrenmascarenhas/6771369071/in/photostream

Any help or trick will be very useful

loads of thanks

nahren--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] histogram plots color range

2012-01-27 Thread Tony Yu
On Fri, Jan 27, 2012 at 11:27 AM, nahren manuel meetnah...@yahoo.comwrote:

 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/photos/nahrenmascarenhas/6771369071/in/photostream

 Any help or trick will be very useful

 loads of thanks

 nahren


This plot seems similar to something I wanted to do (and asked the list
abouthttp://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18761.html).
I ended up getting something to work, but the code is a bit ugly. I've
attached my most recent version (which probably needs some cleaning up, but
it works).

If you want a continuous field instead of distinct bars (like you have in
your sample image), you may be able to write up something that's a little
simpler by sectioning out the columns an array into strips of equal width
and repeating histogram values across those columns (sorry, this is a bit
vague). Then use `imshow` to plot the array.

-Tony


histstrip.py
Description: Binary data
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] histogram plots color range

2012-01-27 Thread josef . pktd
On Fri, Jan 27, 2012 at 12:18 PM, Tony Yu tsy...@gmail.com wrote:


 On Fri, Jan 27, 2012 at 11:27 AM, nahren manuel meetnah...@yahoo.com
 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 sample figure:
 http://www.flickr.com/photos/nahrenmascarenhas/6771369071/in/photostream

 Any help or trick will be very useful

 loads of thanks

 nahren


 This plot seems similar to something I wanted to do (and asked the list
 about). I ended up getting something to work, but the code is a bit ugly.
 I've attached my most recent version (which probably needs some cleaning up,
 but it works).

 If you want a continuous field instead of distinct bars (like you have in
 your sample image), you may be able to write up something that's a little
 simpler by sectioning out the columns an array into strips of equal width
 and repeating histogram values across those columns (sorry, this is a bit
 vague). Then use `imshow` to plot the array.

Looks nice.

Given that it is too specialized for matplotlib, it would be an
interesting addition to violin and bean plots in scikits.statsmodels
if you don't mind that we borrow it (scikits.statsmodels is BSD
licensed).

Thanks,

Josef


 -Tony



 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] histogram plots color range

2012-01-27 Thread Tony Yu
On Fri, Jan 27, 2012 at 4:01 PM, josef.p...@gmail.com wrote:

 On Fri, Jan 27, 2012 at 12:18 PM, Tony Yu tsy...@gmail.com wrote:
 
 
  On Fri, Jan 27, 2012 at 11:27 AM, nahren manuel meetnah...@yahoo.com
  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 sample figure:
 
 http://www.flickr.com/photos/nahrenmascarenhas/6771369071/in/photostream
 
  Any help or trick will be very useful
 
  loads of thanks
 
  nahren
 
 
  This plot seems similar to something I wanted to do (and asked the list
  about). I ended up getting something to work, but the code is a bit ugly.
  I've attached my most recent version (which probably needs some cleaning
 up,
  but it works).
 
  If you want a continuous field instead of distinct bars (like you have in
  your sample image), you may be able to write up something that's a little
  simpler by sectioning out the columns an array into strips of equal width
  and repeating histogram values across those columns (sorry, this is a bit
  vague). Then use `imshow` to plot the array.

 Looks nice.

 Given that it is too specialized for matplotlib, it would be an
 interesting addition to violin and bean plots in scikits.statsmodels
 if you don't mind that we borrow it (scikits.statsmodels is BSD
 licensed).

 Thanks,

 Josef


Sure thing---I'm happy to contribute. The code probably needs to be cleaned
up, but unfortunately, I have little motivation since I don't use it
anymore. Feel free to do whatever you like with it.

Cheers,
-Tony
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users