Hi Derek, [Copying to matplotlib-users since an archive of this conversation could be helpful to others in the future.]
On 21.8.2006, at 13.34, Derek Hohls wrote: > Re the other suggestions you have made. While I appreciate the > "forming hypothesis" approach is good when venturing into the > unknown, it does seem a little strange when dealing with a known > item e.g. software. But it *is* unknown to the extent that the documentation is lacking! :-) Also, I think that the plot-customization possibilities of matplotlib are pretty nicely discoverable (once you know about getp/setp), and even if the pdf manual listed everything, it would be easier to use the introspective facilities than look things up in the manual. > In your example below, you go from line [21] > getp(recs[0]) > to line[22] > setp(recs[0], 'facecolor') > > Now, how did you know that there was 'facecolor' property that > could be set? How would one get a list of all these properties? The list you want is precisely the output of the getp command. I elided the output since it is quite long, but I guess I didn't make it sufficiently clear. > The other issue is the colour: > colour=['red', 'green', 'blue']) > implies I would write: > colour=['125','125','250'] In hindsight, it was a bad idea on my part to make a barchart of three bars and color them precisely red, green, and blue... let's try again: In [11]:bar(arange(10), cos(arange(10)), color= ['blanchedalmond', 'darkorchid', 'gainsboro', 'honeydew', 'hotpink', 'khaki', 'lavenderblush', 'mintcream', 'peachpuff', 'lemonchiffon']); So you can give a list of colors to make the bars different colors. (The color names are from matplotlib.colors.cnames.) If you want to make everything the same color, give just one color, not a list: In [12]:figure(); bar([0,1], [3,1], color='lightcoral'); The syntax for shades of gray happens to be a string representing a number from 0 to 1: In [13]:figure(); bar([0,1], [3,1], color='0.9'); If you want every bar to have the color with components 125, 125, 250 on a scale of 0..255, use hex notation: In [14]:figure(); bar([0,1], [3,1], color='#7d7dfa'); -- Jouni ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users