|
From: Tony S Yu <ts...@gm...> - 2010-08-12 14:37:47
|
On Aug 12, 2010, at 1:08 AM, Russell E. Owen wrote:
> I'm making a strip chart widget (which I plan to make publicly available
> when finished). The basics are working fine, but the automatic sizing is
> not doing so well. Strip charts are typically short, and when suitably
> short the X axis annotations are partially truncated.
>
> So...can I convince the automatic sizer to always show the full X (time)
> axis annotations and put all the variable sizing into the data area? Or
> do I have to manually set them somehow?
As far as I know, there's nothing to automatically resize the padding around the the axes. (The manual way to do it is to call `fig.subplots_adjust`). I wrote a helper script (attached below) to adjust the layout so that there's a specified amount of padding around the axes.
Unfortunately, this resizer doesn't function correctly when using the GTK backend. It apparently works fine with TkAgg, MacOSX, and Qt4Agg backends.
> Also, is there a way from my software (not a .matplotlibrc file) to
> globally make the default background color white for axis annotation
> areas? Right now the background is gray for annotations and while for
> plot area and I'd prefer it was all white.
>
> -- Russell
Just set plt.rc('figure', facecolor='w') in your code (assuming you've imported matplotlib.pyplot as plt).
Best,
-Tony
|