Re: Different behaviour 5.2 and 6
- From: Dave <nowhere@xxxxxxxxxxx>
- Date: Fri, 19 Oct 2007 10:48:08 +0100
mcmcclur@xxxxxxxx wrote:
On Oct 17, 11:06 am, Dave <nowh...@xxxxxxxxxxx> wrote:Yes, you have correctly identified the problem.Following some suggestions ideas some time back, I have some code which
is semi-working under 5.2, but not under 6.
...
In 5.2, each plot is placed one above the other. In 6, there are about 4
per row, with them overlapping and basically a mess.
It's hard to be sure from your description, but my guess is
that you're struggling with the *major* change that a
picture generated by Graphics is the output, rather than a
side effect. Here's a simple command that generates the
type of behaviour that I think you're describing.
graphs = Table[
Plot[x^n - x^(n - 2), {x, -2, 2},
AspectRatio -> n^(1/2)],
{n, 1, 5}]
In prior to V6, this generates a sequence of pictures in
separate cells and a list:
{-Graphics-, -Graphics-, -Graphics-, -Graphics-, -Graphics-}
In 5.2 the code:
Plot[x^n - x^(n - 2), {x, -2, 2},
AspectRatio -> n^(1/2)],
{n, 1, 5}]
produces 6 cells - 5 cells each have one graph, and another cell which has {-Graphics-, -Graphics-, -Graphics-, -Graphics-, -Graphics-} in it.
In version 6, all 5 graphs go in one list in a single cell.
Totally screws my code up!
That list is the output and the pictures are side effects.
Slapping a semi-colon on the end supresses the output (the
list) but not the pictures, which is why you need to set
the DisplayFunction prior to V6.
In V6 the output is
{picture_1, picture_2, picture_3, picture_4, picture_5}
Each picture_i is an actual picture which is the output
of that particular Plot command. Note that now a simple
semi-colon at the end supresses the pictures.
There are many ways to format the output; perhaps the
simplest is
GraphicsColumn[graphs]
Using
GraphicsColumn[graphs]
looks OK on screen, but try saving it to a pdf and gets a 10 page PDF with the graphs on the first 4 pages and 6 blank pages. I've not tried printing it, but I have had similar issues before with multiple graphics in one cell and there becomes a huge amount of wasted paper. I don't think that is a bug in the PDF writing (I know there are various reports of bugs in PDF generation), as I have seen the same on printouts.
Is there any way to split the list elements and put them in different cells, so it more closely resembles the 5.2 behaviour.
As you say, this is a MAJOR change. I guess WRI must think there are advantages to the new method.
.
- Follow-Ups:
- Re: Different behaviour 5.2 and 6
- From: mcmcclur
- Re: Different behaviour 5.2 and 6
- From: Nasser Abbasi
- Re: Different behaviour 5.2 and 6
- References:
- [Mathematica] Different behaviour 5.2 and 6
- From: Dave
- Re: Different behaviour 5.2 and 6
- From: mcmcclur
- [Mathematica] Different behaviour 5.2 and 6
- Prev by Date: Re: Different behaviour 5.2 and 6
- Next by Date: Re: Different behaviour 5.2 and 6
- Previous by thread: Re: Different behaviour 5.2 and 6
- Next by thread: Re: Different behaviour 5.2 and 6
- Index(es):
Relevant Pages
|
|