From: John H. <jdh...@ac...> - 2005-04-04 20:48:41
|
>>>>> "David" == David Meggy <dav...@ya...> writes: David> Hi I'm trying to produce bar graphs with the format of 3 David> per page all sharing a common x-axis. I have done this and David> each graph properly has its own title, and y labels, while David> only the bottom graph has x labels. Have you seen examples/ganged_plots.py and examples/shared_axis_demo.py? These specifically address sharing of an axis (eg when navigating) and also illustrate some useful calls for controlling ticking, etc... David> My problem is that I would like to add a title to the David> entire page, and add a box of information (legend or key I David> guess) that applies to all 3 graphs, and not any in David> particular. I hope that made sense. If fig is a matplotlib.figure.Figure instance fig.text : add text in figure coords; see examples/figtext.py fig.legend : add a legend to the figure (rather than Axes); see examples/figlegend_demo.py See http://matplotlib.sf.net/matplotlib.figure.html for the Figure class documentation. David> the table function destroys my x-labels and doesn't format David> very well. The table can be placed in a number of different locations by passing in the "loc" code. This can be one of 'upper right' 'upper left' 'lower left' 'lower right' 'center left' 'center right' 'lower center' 'upper center' 'center' 'top right' 'top left' 'bottom left' 'bottom right' 'right' 'left' 'top' 'bottom' Also, try changing the size of your axes manually by using "axes" rather than "subplot". See also the advice at http://matplotlib.sourceforge.net/faq.html#TEXTOVERLAP David> <my ascii drawing representation of what I'm looking for> Now we just need to write an ascii backend to facilitate this kind of communication :-) JDH |