Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: Help with GraphicsArray

  • To: mathgroup at
  • Subject: [mg9256] Re: [mg9109] Help with GraphicsArray
  • From: Allan Hayes <hay at>
  • Date: Fri, 24 Oct 1997 01:01:09 -0400
  • Sender: owner-wri-mathgroup at

Dr. Sergio Terrazas" <sterraza at> [mg9109] Help with

> I am having a problem with GraphicsArray.
> I want to display together a graphics object obtained with Plot
> and a DensityGraphics object obtained with DensityPlot. When I  
Mathematica > shows them together they are of diferent sizes, Even though
> they have the same dimensions in x and y and the ImageSize is the 
> same.

The problems with Graphics array seem to arise from the equal size   of
the display areas and the way in which graphics inside rectangles   are
squeezed in (retaining their own aspect ratio). There are also   some
problems with how ticks are included. I'll try to post a note   on this
stuff later.
Meanwhile, here is another approach, still using one rectangle,   that
you might like to experiment with:

Allan Hayes
hay at voice:+44 (0)116 2714198
fax: +44 (0)116 2718642
Leicester,  UK


                    Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 3.0,
MathReader 3.0, or any compatible application. The data for the
notebook  starts with the line of stars above.

To get the notebook into a Mathematica-compatible application, do one of
the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be sent
directly in email or through ftp in text mode.  Newlines can be CR, LF
or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the 
word CacheID, otherwise Mathematica-compatible applications may try to 
use invalid cache data.

For more information on notebooks and Mathematica-compatible
applications, contact Wolfram Research:
  email: info at
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from Wolfram

(*CacheID: 232*)

(*NotebookOptionsPosition[      2822,         83]*)
(*NotebookOutlinePosition[      3461,        106]*) (* 
CellTagsIndexPosition[      3417,        102]*) (*WindowFrame->Normal*)

    \(pot =
      \(\[Omega]\/\(2  \[Pi]\)\)
              \%\(\(2  \[Pi]\)\/\[Omega]\)\(Sin[k\ x - \[Omega]\ t]\^2\)

              \[DifferentialD]t\) // Simplify\)], "Input"],

    \(\[Omega] = 2  \[Pi]; k = 1; pmax = 2; \[Lambda] = \(2   
\[Pi]\)\/k; \n
    P[x_, y_, t_] := pmax\ \ \((Sin[k\ x - \[Omega]\ t] + 1)\)\)],  

Cell["I have reduced PlotPints to speed up the computation.", "Text"],

    \(\(dens =
      DensityPlot[P[x, y, 0], {x, 0.1, 2  \[Lambda]}, {y, 4.1, 5},
        ColorFunction -> Hue\ , PlotPoints -> 15, Mesh -> False, \n\t\t\

        Frame -> False\ ]; \)\)], "Input"],

    \(graf =
      Plot[P[x, 0, 0], {x, 0, 2  \[Lambda]},
        PlotRange -> {{0, 2  \[Lambda]}, {0, 5}}]\)], "Input"],

    \(\(Show[Graphics[dens], graf, \ Frame\  -> True, \
      FrameTicks\  -> \ \n\t{Automatic, \ {0, 1, 2, 3, 4}, None, None}, 
      AspectRatio -> Automatic]; \)\)], "Input"],

You can set AspectRatio to whatever you want -- or just leave it \ out.\
\>", "Text"]
FrontEndVersion->"NeXT 3.0",
ScreenRectangle->{{0, 1053}, {0, 832}}, WindowSize->{520, 600},
WindowMargins->{{Automatic, 118}, {Automatic, 82}} ]

Cached data follows.  If you edit this Notebook file directly, not
using Mathematica, you must remove the line containing CacheID at the
top of  the file.  The cache data will then be recreated when you save
this file  from within Mathematica.



Cell[1709, 49, 220, 5, 47, "Input"], Cell[1932, 56, 165, 2, 58,
"Input"], Cell[2100, 60, 69, 0, 30, "Text"],
Cell[2172, 62, 214, 4, 51, "Input"], Cell[2389, 68, 136, 3, 39,
"Input"], Cell[2528, 73, 192, 3, 52, "Input"], Cell[2723, 78, 95, 3,
30, "Text"]

End of Mathematica Notebook file.

  • Prev by Date: Computer Algebra in Physics Research
  • Next by Date: Re: mathematica question
  • Previous by thread: Help with GraphicsArray
  • Next by thread: Re: Font Problem with Mathematica v3.0