MathGroup Archive 2009

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

Search the Archive

Graphics and DisplayFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98154] Graphics and DisplayFunction
  • From: replicatorzed at gmail.com
  • Date: Tue, 31 Mar 2009 04:21:15 -0500 (EST)

Does anyone know why the following code fails to return the second
Graphics object?

ListPlot[{1, 2, 3}, DisplayFunction -> Print];
Graphics[{Circle[]}, DisplayFunction -> Print];

Even the coloring of the syntax differs for the two: after ListPlot
[...], the semicolon is red indicating its unnecessary presence, while
the one after Graphics[...] is left black. I would think that with the
generalized input of Mathematica 6, the two would behave the same way,
but apparently they do not.
I know how to solve this with Show. I just simply don't understand why
these two behave differently, if both produce (without specifying
DisplayFunction) Graphics objects:


In[104]:= Print[InputForm[ListPlot[{1, 2, 3}]]];
Print[InputForm[Graphics[{Circle[]}]]];

During evaluation of In[104]:= Graphics[{Hue[0.67, 0.6, 0.6], Point
[{{1., 1.}, {2., 2.}, {3., 3.}}]}, {AspectRatio -> GoldenRatio^(-1),
Axes -> True, AxesOrigin -> {0, Automatic}, PlotRange -> Automatic,
PlotRangeClipping -> True}]

During evaluation of In[104]:= Graphics[{Circle[{0, 0}]}]

In[106]:= Head[ListPlot[{1, 2, 3}]]
Head[Graphics[{Circle[]}]]

Out[106]= Graphics

Out[107]= Graphics



Any idea?


  • Prev by Date: Plots, Lists, and line colors (Was: What's going on here (Table-generated lists)?)
  • Next by Date: Re: Importing data with comma as decimal separator
  • Previous by thread: Plots, Lists, and line colors (Was: What's going on here (Table-generated lists)?)
  • Next by thread: Interpolation -> segfault?