Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation / Mathematica / The Mathematica Book / Principles of Mathematica / The Structure of Graphics and Sound /

2.10.6 Making Plots within Plots

Section 1.9.3 described how you can make regular arrays of plots using GraphicsArray. Using the Rectangle graphics primitive, however, you can combine and superimpose plots in any way.

Creating a subplot.

Here is a three-dimensional plot.

In[1]:= p3 = Plot3D[Sin[x] Exp[y], {x, -5, 5}, {y, -2, 2}]

Out[1]=

This creates a two-dimensional graphics object which contains two copies of the three-dimensional plot.

In[2]:= Show[Graphics[ {Rectangle[{0, 0}, {1, 1}, p3],
Rectangle[{0.8, 0.8}, {1.2, 1.4}, p3]} ]]

Out[2]=

Mathematica can render any graphics object within a Rectangle. In all cases, what it puts in the rectangle is a scaled down version of what would be obtained if you displayed the graphics object on its own. Notice that in general the display area for the graphics object will be sized so as to touch at least one pair of edges of the rectangle.



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja] |
Sign up for our newsletter: