Re: Glitch with having Graphics along with printouts dynamically
- To: mathgroup at smc.vnet.net
- Subject: [mg114953] Re: Glitch with having Graphics along with printouts dynamically
- From: John Fultz <jfultz at wolfram.com>
- Date: Fri, 24 Dec 2010 04:10:59 -0500 (EST)
- Reply-to: jfultz at wolfram.com
Wow. This behavior is truly bizarre and unexpected. All the more so if you add Axes->True to the graphic to see what's *really* going on. I can give you two options. First, upgrade to v8. I could not reproduce the problem in v8. Second, prevent the Circle[] from dynamically updating. For example, p = {1, 0}; Grid[{{ Graphics[{Circle[{0, 0}, 1], Dynamic[v = Normalize[p]; Line[{{0, 0}, v}]], Locator[Dynamic[p]]}, PlotRange -> {{-2, 2}, {-2, 2}}, ImageSize -> 500]}, {Dynamic[ArcTan[v[[2]]/v[[1]]]]}}] This is good practice, anyway, so it's not at all what I'd call a hacky solution (and maybe the fact that I and many of my colleagues would automatically do something like this is the reason I hadn't seen this behavior before). I also came up with versions where the Circle was part of the dynamic update and it worked, but it's not clear to me what the pattern is. And given the fact that it's been fixed in v8, I'm not overly motivated to go back and investigate the details of the issue. Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc. On Thu, 23 Dec 2010 03:53:03 -0500 (EST), Dims wrote: > I have the following code > > p = {1, 0}; > Dynamic[ > Grid[{ > { > v = Normalize[p]; > Graphics[{ > Circle[{0, 0}, 1], > Line[{{0, 0}, v}], > Locator[Dynamic[p]] > }, > PlotRange -> {{-2, 2}, {-2, 2}}, ImageSize -> 500] > }, > {ArcTan[v[[2]]/v[[1]]]} > }] > ] > > to display both some dynamic graphics and information about it. But I > noticed, that the circle becomes ellipse somethimes. Why?