Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: The Principle "Everything is an expression"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101270] Re: The Principle "Everything is an expression"
  • From: Armand Tamzarian <mike.honeychurch at gmail.com>
  • Date: Sun, 28 Jun 2009 23:27:28 -0400 (EDT)
  • References: <h2295n$hou$1@smc.vnet.net> <h24qoe$re9$1@smc.vnet.net>

On Jun 28, 5:08 am, Alexey <lehi... at gmail.com> wrote:
> On 27 Jun, 14:02, David Reiss <dbre... at gmail.com> wrote:
>
> > This example does not violate the principle.  FullGraphics is acting
> > on the graphics expression to generate a new expression.  Both are
> > valid expressions and both will render as, visually, entities that are
> > perceived as the same.  
>
> Hello,
>
> The Documentation says:
>
> "FullGraphics generates explicit graphics primitives for objects
> specified by options such as Axes, Ticks, etc."
>
> and more:
>
> "FullGraphics[g] should display the same as g, though it may have a
> different internal structure."
>
> It is clear that FullGraphics does not do this:
>
> g = Plot[Sin[x], {x, 0.2, 10}]
> FullGraphics[g]
> Show[FullGraphics[g], AspectRatio -> 1/GoldenRatio]
>
> So, my question remains: how we may get the real expression-
> representation of Plot in terms of graphics primitives?

That is a different question to the original one you asked about
everything being an expression. FullForm[g] shows that g is an
expression and can be "manipulated".

To get FullGraphics to reproduce something that looks like your
original plot I had to explicitly set options in Plot rather than rely
on defaults. eg.

g = Plot[Sin[x], {x, 0.2, 10},
  Ticks -> {{0, Pi, 2 Pi, 3 Pi}, {-1, 1}},
  AspectRatio -> 1/GoldenRatio,
  PlotRange -> {{0, 4 \[Pi]}, {-1.5, 1.5}}]

But even then it was not perfect. Incidentally when you evaluate the
Out[1] and Out[2] in the FullGraphics documentation, the output is not
identical (V7.0.1 OS X 10.5.7). But this has nothing to do with the
concept of everything being an expression. Rather it appears that
FullGraphics, which doesn't appear to have been updated since V2, is
not working optimally.

Mike


  • Prev by Date: Re: The Principle "Everything is an expression"
  • Next by Date: Adding Colorfunction causing poor plot quality
  • Previous by thread: Re: The Principle "Everything is an expression"
  • Next by thread: Re: The Principle "Everything is an expression"