Re: Different behaviour 5.2 and 6



mcmcclur@xxxxxxxx wrote:
On Oct 17, 11:06 am, Dave <nowh...@xxxxxxxxxxx> wrote:
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-}
Yes, you have correctly identified the problem.

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.



.



Relevant Pages

  • Re: Using Pictures to return numeric totals
    ... I have a list of employee names in ColA and each employee row has 10 icon ... size pictures to the right of the employee name placed on top of 10 ... respective cells. ... "Peter T" wrote: ...
    (microsoft.public.excel.programming)
  • Re: How to identify an inserted picture within a formula
    ... can point you in the direction of a font symbol as you mentioned. ... > various cells, then write formulae in other cells that take different ... > actions based on what is in the pictures. ...
    (microsoft.public.excel.misc)
  • Re: How to identify an inserted picture within a formula
    ... you're nearly a whole day out with your clock. ... >>> various cells, then write formulae in other cells that take different ... >>> actions based on what is in the pictures. ... A worksheet function ...
    (microsoft.public.excel.misc)
  • Re: How to identify an inserted picture within a formula
    ... > various cells, then write formulae in other cells that take different ... > actions based on what is in the pictures. ... > Using a custom font to represent the symbols instead of inserting pictures ...
    (microsoft.public.excel.misc)
  • Re: How to identify an inserted picture within a formula
    ... >> various cells, then write formulae in other cells that take different ... >> actions based on what is in the pictures. ... A worksheet function ... >> Using a custom font to represent the symbols instead of inserting ...
    (microsoft.public.excel.misc)