MathGroup Archive 1997

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

Search the Archive

Help with GraphicsArray

  • To: mathgroup at
  • Subject: [mg9109] Help with GraphicsArray
  • From: "Dr. Sergio Terrazas" <sterraza at>
  • Date: Mon, 13 Oct 1997 23:33:22 -0400
  • Sender: owner-wri-mathgroup at


Hello everyone!
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 Mma 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.
Any help will be greatly appreciated.
Might this be one of the "useful dumb questions?
Please execute the attached notebook.

Thank you very much.
Sergio Terrazas
Juarez, Mexico



                    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 Research.

(*CacheID: 232*)

(*NotebookOptionsPosition[      2629,         78]*)
(*NotebookOutlinePosition[      3277,        101]*)
(*  CellTagsIndexPosition[      3233,         97]*)

    \(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)\)\)], "Input"],

    \(P[x, y, t]\)], "Input"],

    \(dens = 
      DensityPlot[P[x, y, 0], {x, 0, 2  \[Lambda]}, {y, 0, 2}, 
        ColorFunction -> Hue\ , PlotPoints -> 150, AspectRatio -> Automatic, 
        ImageSize -> {400, 200}, Mesh -> False]\)], "Input"],

    \(graf = 
      Plot[P[x, 0, 0], {x, 0, 2  \[Lambda]}, AspectRatio -> Automatic, 
        ImageSize -> {400, 200}]\)], "Input"],

    \(Show[GraphicsArray[{{dens}, {graf}}], ImageSize -> {400, 200}]\)], 
FrontEndVersion->"Microsoft Windows 3.0",
ScreenRectangle->{{0, 640}, {0, 424}},
WindowSize->{596, 342},
WindowMargins->{{2, Automatic}, {Automatic, 5}}

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, 46, "Input"],
Cell[1932, 56, 165, 2, 63, "Input"],
Cell[2100, 60, 43, 1, 30, "Input"],
Cell[2146, 63, 230, 4, 70, "Input"],
Cell[2379, 69, 145, 3, 50, "Input"],
Cell[2527, 74, 98, 2, 30, "Input"]

End of Mathematica Notebook file.


  • Prev by Date: Re: wierd Log[0] *0 result
  • Next by Date: Re: Font Problem with Mathematica v3.0
  • Previous by thread: Communications libraries
  • Next by thread: Re: Help with GraphicsArray