Re: [Matplotlib-users] Pareto diagram - align cumulative percentage marker in the middle of the bars

2009-08-26 Thread Werner F. Bruhin
Chris,

Christopher Barker wrote:
 Werner F. Bruhin wrote:
 The other problem I have is that the xtick_labels are cut off at the 
 bottom when the frame is resized below a certain size.  How can I 
 prevent this?

 I don't think MPL yet has a system for making things fit, so you need 
 to change the size/position of your axes object:

 axes.set_position(pos, which='both')

 
 Set the axes position with:

 pos = [left, bottom, width, height]
 

 these are in figure units which are relative to figure size, from 0 
 to 1. Unfortunately, what this means is that the amount of space for 
 the axis labels varies with the size of the figure, as you've discovered.


 The default for a single axes in a figure is:

 (0.125,  0.1,  0.9,  0.9)

 so you might try something like:

 axes.set_position((0.125,  0.15,  0.9,  0.85) )

 what is best depends on what size you want your figure to look good at.
Thanks for this tip, will play around with this a bit.  First try shifts 
the figure of the panel on the top left and right, so this will need a 
bit more digging on my part.

Werner



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Pareto diagram - align cumulative percentage marker in the middle of the bars

2009-08-25 Thread Werner F. Bruhin




I trying to create a Pareto diagram and would like that the percentage
marker is center aligned on the bars, i.e. the blue point should be
center aligned on the bar instead of to be aligned on the left edge in
the following image. 



The other problem I have is that the xtick_labels are cut off at the
bottom when the frame is resized below a certain size. How can I
prevent this?

Thanks for any tips on these problems.
Werner


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Pareto diagram - align cumulative percentage marker in the middle of the bars

2009-08-25 Thread Jouni K . Seppänen
Werner F. Bruhin werner.bru...@free.fr writes:

 I trying to create a Pareto diagram and would like that the percentage
 marker is center aligned on the bars,

Perhaps the easiest solution is to use bar(...,align='center').

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Pareto diagram - align cumulative percentage marker in the middle of the bars

2009-08-25 Thread Werner F. Bruhin
Jouni K. Seppänen wrote:
 Werner F. Bruhin werner.bru...@free.fr writes:

   
 I trying to create a Pareto diagram and would like that the percentage
 marker is center aligned on the bars,
 

 Perhaps the easiest solution is to use bar(...,align='center').
   
Thanks, that does the trick for me, after getting rid of some hack for 
the bar labels.

Werner





--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Pareto diagram - align cumulative percentage marker in the middle of the bars

2009-08-25 Thread Christopher Barker
Werner F. Bruhin wrote:
 The other problem I have is that the xtick_labels are cut off at the 
 bottom when the frame is resized below a certain size.  How can I 
 prevent this?

I don't think MPL yet has a system for making things fit, so you need to 
change the size/position of your axes object:

axes.set_position(pos, which='both')


 Set the axes position with:

 pos = [left, bottom, width, height]


these are in figure units which are relative to figure size, from 0 to 
1. Unfortunately, what this means is that the amount of space for the 
axis labels varies with the size of the figure, as you've discovered.


The default for a single axes in a figure is:

(0.125,  0.1,  0.9,  0.9)

so you might try something like:

axes.set_position((0.125,  0.15,  0.9,  0.85) )

what is best depends on what size you want your figure to look good at.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users