From boris.schmid at gmail.com Sun Oct 12 07:06:39 2008 From: boris.schmid at gmail.com (Boris Schmid) Date: Sun, 12 Oct 2008 13:06:39 +0200 Subject: [Tioga-users] how to change the padding of whitespace around a figure? Message-ID: Hi all, Another tioga question (I've been looking at the documentation and web for an hour, but couldn't find an answer that worked). The graphs I am currently making do not have axis labels, titles or legends outside the figure. As a result, there seems to be quite a lot of whitespace around the figure itself. I am quite sure that one of the many options Tioga has allows me to reduce that whitespace, but although I meddled with pagewidth, framesize and bounds, I couldn't figure out how to. Please enlighten me :). -------------- next part -------------- An HTML attachment was scrubbed... URL: From paxton at kitp.ucsb.edu Sun Oct 12 11:12:51 2008 From: paxton at kitp.ucsb.edu (Bill Paxton) Date: Sun, 12 Oct 2008 08:12:51 -0700 Subject: [Tioga-users] how to change the padding of whitespace around a figure? In-Reply-To: References: Message-ID: <83113461-E5D6-4D9F-8A3F-962319F4C786@kitp.ucsb.edu> On Oct 12, 2008, at 4:06 AM, Boris Schmid wrote: > Another tioga question (I've been looking at the documentation and > web for an hour, but couldn't find an answer that worked). The > graphs I am currently making do not have axis labels, titles or > legends outside the figure. As a result, there seems to be quite a > lot of whitespace around the figure itself. I am quite sure that > one of the many options Tioga has allows me to reduce that > whitespace, but although I meddled with pagewidth, framesize and > bounds, I couldn't figure out how to. > Hi, This sort of thing is most easily done in your "enter_page" function. For example, in samples/plots/plots.rb, you'll find a defintion for "enter_page" which sets page width and height after first calling set_default_plot_style. The definition of set_default_plot_style is found in plot_styles.rb in the same directory. In that routine you'll find it setting page size and margins. # Page size and margins # these default values are used by the default_enter_page_function t.default_page_width = 72*5.5 # in big-points (1/72 inch) t.default_page_height = 72*4.25 # in big-points (1/72 inch) t.default_frame_left = 0.15 # as fraction of width from left edge t.default_frame_right = 0.85 # as fraction of width from left edge t.default_frame_top = 0.85 # as fraction of width from bottom edge t.default_frame_bottom = 0.15 # as fraction of width from bottom edge The frame_left/right/top/bottom values set the margins. Cheers, Bill