MathGroup Archive 2008

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

Search the Archive

Re: Print[Plot] vs Print[text,Plot]?

  • To: mathgroup at
  • Subject: [mg88064] Re: Print[Plot] vs Print[text,Plot]?
  • From: AES <siegman at>
  • Date: Wed, 23 Apr 2008 04:09:27 -0400 (EDT)
  • Organization: Stanford University
  • References: <fueep7$bai$> <fuhqvc$rh5$>

My original post said:

> > I've just executed a test cell containing
> > 
> >    Print[Plot[---]];
> >    Print["Some text\n", Plot[---]];
> > 
> > Result from first line is expected plot; result from second line is a 
> > miniaturized plot about 1/4 the size of the first one.
> > 
> > ******  This is sensible or useful?  ******

In response to various replies:

I realize full well that designing how a program is to work given  
various inputs always involves design choices and compromises between 
various objectives, including the goal of "consistency" (which itself 
may call for different choices depending on the level where the 
consistency is sought) and so on.

Nonetheless, I still think the choice that leads to the behavior 
described above is a _bad_ design choice, in several ways:

1)  First, displaying the plot in the 2nd input line above at full size 
can be a very useful, as well as simple, technique.  I wanted, in fact, 
to put multiple instances of 3 plots plus some explanatory text into a 
single cell, using

      Print["Some text\n",  plot1, "\n", plot2, "\n", plot3];

and do this repeatedly multiple times in a Do loop, so that I could then 
examine how three linked aspects of a given problem changed with changed 
parameters, either by stepping sequentially through these multi-plot 
cells or by making them page sized and printing them to PDF slides.  

The first line above confirmed that the plot came out about the size I 
wanted it; adding text and doing three plots using the approach in the 
2nd and 3rd lines above seemed a simple and natural extension.

2)  What comparable useful purpose is served by throwing consistency out 
the window and shrinking the plot when the multi-plot Print[] form is 
used?  What arguments lead to choosing the default amount by which it's 

3)  and, hey, if I do instead Print[text, some_TableFormed_Table], does 
the Table get similarly shrunk?  Why?  Or, why not?  Any consistency 

4)  OK, the damn plot evidently gets shrunk in the second approach.  
Now, it was created (and displayed in the first Print statement) using 
some default value of ImageSize, which turned out to be just about what 
I wanted, without my having to bother inserting an ImageSize value in 
the plot.

So, if I now _explicitly_ insert that default image size into the Plot 
command, will the plot again be shrunk in the second case?  Or will that 
default image size now "stick"?  Or do I have to blow up the plot, using 
a larger ImageSize, in order to get it shrunk back down to what I want?  
Who wants to guess on this????

5)  In any case, instead of going with the default image size, as I did 
in the first case (with totally satisfactory results), I'm now going to 
have to dig one level deeper in the (large) set of options for Plot, or 
Print[], or maybe both.  This is useful?

6)  And did anyone notice that the majority of the alternative 
approaches suggested in most replies (Column[], etc) were things that 
are new in 6.0?  Must everyone take a week off from their real life to 
trudge (tediously) thru "What's New in 6.0", on screen?  

7)  And also, that the widely used older approach that I might have used 
to get my desired 3-plots-in-one=cell result, namely GraphicsArray[ 
{{plot1}, {plot2}, {plot3}}] is now gone?

Bottom line:  I doubt very much that coding Print[text,plot1] to shrink 
the plot compared to Print[plot1] was a _necessary_ behavior, imposed by 
some inherent characteristics of Print or Plot.  I suspect it was 
instead a _design choice_, and one that required some coding to 
implement -- and it was a poor design choice IMHO.

  • Prev by Date: Re: Re: Re: Re: Timing
  • Next by Date: Re: Re: Re: Re: Timing
  • Previous by thread: Re: Print[Plot] vs Print[text,Plot]?
  • Next by thread: Re: Print[Plot] vs Print[text,Plot]?