MathGroup Archive 2009

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

Search the Archive

Re: Graphics and DisplayFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98250] Re: Graphics and DisplayFunction
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Fri, 3 Apr 2009 04:39:31 -0500 (EST)
  • References: <gqsn9m$3tr$1@smc.vnet.net> <gr21l6$lq8$1@smc.vnet.net>

replicatorzed at gmail.com wrote:
> Thanks for the answer Szabolcs,
> 
> Ok, so if I understand it correctly then by using explicit
> DisplayFunctions, I display the *thing*, that is the side effect of
> the actual function. Obviously only things that are enclosed in Show
> can be thus displayed with DisplayFunctions, and - however it's just a
> guess - the various plot functions all utilize an internal Show which
> encloses their internal graphics. Thus - secondarily - DisplayFunction
> can be used with plotting functions as well. But then I simply don't
> understand why DisplayFunction is an option for Graphics? Neither
> 
I would forget about the DisplayFunction option - it is more or less 
obsolete. Just think of graphics as output - just like numbers or equations.

If you do a calculation, and then as the last step generate a graphical 
output (either explicitly with Graphics, or indirectly using Plot (say), 
then providing you don't terminate that command with a semicolon, you 
will get your graphical output, for example:

xx = 10;
yy = 20;
Graphics[{Line[{{-xx/2, 0}, {xx/2, 0}}],
   Line[{{0, -yy/2}, {0, yy/2}}]}]

If, however, you want to go on and calculate something else (or make 
another graph), simply print your graphical output (again, exactly as 
you would for text):

xx = 10;
yy = 20;
Print[Graphics[{Line[{{-xx/2, 0}, {xx/2, 0}}],
   Line[{{0, -yy/2}, {0, yy/2}}]}]];
Print["Something else ",Sqrt[xx]];


  • Prev by Date: Re: Can't figure out how to export Mathematica into Word
  • Next by Date: Re: Can't figure out how to export Mathematica into Word
  • Previous by thread: Re: Graphics and DisplayFunction
  • Next by thread: Re: Re: Graphics and DisplayFunction