Re: How to change graph options?
- To: mathgroup at smc.vnet.net
- Subject: [mg126152] Re: How to change graph options?
- From: A Retey <awnl at gmx-topmail.de>
- Date: Sat, 21 Apr 2012 00:30:40 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jmri7r$la4$1@smc.vnet.net>
Am 20.04.2012 13:44, schrieb James Stein: > This code fails to achieve its purpose: > > ClearAll [ g ] ; > g = Graph [ { 1, 2 } , { 1 -> 2 } , ImageSize -> Tiny] > Options [ g ] > SetOptions [ g, ImagePadding -> 10 ] ; > > The reason, I assume, is that 'g' is neither a user-defined nor built-in > function. > The only work-around I can think of is too ugly to describe. > Is there any clean way to change or append the option settings of a Graph? > Sorry, my last answer was probably not exactly what you need, for Graphs there is SetProperty, which will return the changed graph object, while Show will convert to a Graphics, which is probably not what you wanted. This should be better: SetProperty[g, ImagePadding -> 10] hth, albert