From: Alex P. <al...@al...> - 2007-08-21 12:15:24
|
Hello, I've recently been working with matplotlib to create some charts of some data I've gathered. I've been impressed with how easy it is to use, but I have a few questions. I'd appreciate any help you can offer me with the following: 1. Just what does axes() do with pie charts, anyway? I've tried varying the parameters, but haven't quite grasped what it's for. 2. How do I make the pie of the pie chart smaller, leaving more room for the labels? Consider http://www.ethicsgirls.com/stuff/report/cameras_used.png (which I may well move to a bar chart anyway). Some of the labels are clipped at the sides. What's the best way to avoid this? 3. When plotting a chart with plot(), can I vary the alpha value of the markers? If so, how? 4. I need to stick a footnote in the bottom corner of my charts. Can I do this natively in matplotlib or will I have to do it with a separate library afterwards? 5. Can I have my xtick labels oriented vertically? I'm trying to avoid an X axis that looks like this: http://www.ethicsgirls.com/stuff/report/date_taken.png Thanks, -- Alex Pounds (Creature) .~. http://www.alexpounds.com/ /V\ http://www.ethicsgirls.com/ // \\ "Variables won't; Constants aren't" /( )\ ^`~'^ |
From: Alex P. <al...@al...> - 2007-08-23 23:31:52
|
On Tue, Aug 21, 2007 at 01:14:44PM +0100, Alex Pounds wrote: > 4. I need to stick a footnote in the bottom corner of my charts. Can I do > this natively in matplotlib or will I have to do it with a separate library > afterwards? For the sake of others searching the archives, here are the answers I've found out for myself so far: 4. You can do this with matplotlib: figtext(0.98, 0.05, u'©2007 Alexpounds.com', ha='right') This puts a copyright notice in the bottom right of a chart. > 5. Can I have my xtick labels oriented vertically? Yep. Just pass rotation="vertical" in to xticks(). Easy. Though this may overlap with the figtext above - I haven't got that bit sorted yet... -- Alex Pounds (Creature) .~. http://www.alexpounds.com/ /V\ http://www.ethicsgirls.com/ // \\ "Variables won't; Constants aren't" /( )\ ^`~'^ |