Consider the following arbitrary figure generated in MATLAB as an example. The basic idea is that I have a contour plot and I want to showcase selected slices from it in subplots on the right. Is there an equivalent of subplot in mma?

The work around that I have right now is to have just the contour plot with the slices and the arrows and the two slice-plots separately and then put them together in latex. However, I'd like to be able to do this within mma. How do I go about doing this?

An idea that I had is to generate a the contour plot with a full vertical & half horizontal aspect ratio, the two plots with half vertical & half horizontal aspect ratio, and then use `GraphicsGrid`

to align them up. But this still gave me the plots as a list, not a composite figure. Is this the only way or is there a nicer, more elegant way of doing it?

I know that `Multipanel`

in LevelScheme can probably let you do what you want - but I don't have much experience with it and the examples in the docs are fairly sparse. I've already pasted one of the examples into this SO answer, so have a look there and see what you think!

Here's my attempt with `GraphicsGrid`

. The thing that `Multipanel`

lets you do but `GraphicsGrid`

doesn't is to let you use varying Column/Row sizes. This means that I struggled to get the arrows drawn in programmatically, and resorted to hand drawing them using the "Drawing Tools" panel ( :D )

```
With[{yslice1 = .5, yslice2 = -.8},
GraphicsGrid[
{{DensityPlot[Sin[15 x y], {x, -1, 1}, {y, -1, 1},
ColorFunction -> "PlumColors", AspectRatio -> 2,
Epilog -> {Dashed, White, Line[{{-1, yslice1}, {1, yslice1}}],
Line[{{-1, yslice2}, {1, yslice2}}]}],
Plot[Sin[15 x yslice1], {x, -1, 1}, Axes -> False, Frame -> True]},
{SpanFromAbove,
Plot[Sin[15 x yslice2], {x, -1, 1}, Axes -> False,
Frame -> True]}},
Spacings -> {Scaled[0.2], Scaled[0.0]}]]
```

Here's the same thing using `LevelScheme`

, note that the frames line up. It should be possible to add arrows - since `LevelScheme`

has lots of new arrow directives - but I'll leave that as a homework problem!

```
<< "LevelScheme`"
{yslice1 = .5, yslice2 = -.8};
Figure[{
SetOptions[Multipanel,
ShowTickLabels -> {True, False, False, True}, Background -> Wheat,
PanelLetterFontSize -> 10, Margin -> {{40, 40}, {40, 0}}],
Multipanel[{{0, 1}, {0, 1}}, {2, 2},
XPlotRanges -> {-1, 1}, YPlotRanges -> {-1, 1},
XFrameLabels -> textit["x"], YFrameLabels -> textit["y"],
TickFontSize -> 10, XFrameTicks -> LinTicks[-1, 1, .5, 4],
YFrameTicks -> LinTicks[-1, 1, .5, 4],
BufferL -> 1.5, BufferB -> 3, Order -> Vertical,
XPanelSizes -> {1, 1}, XGapSizes -> 0.25, YGapSizes -> 0.2],
FigurePanel[{1, 2}],
RawGraphics[
Plot[Sin[15 x yslice1], {x, -1, 1}, Axes -> False, Frame -> True]],
FigurePanel[{2, 2}],
RawGraphics[
Plot[Sin[15 x yslice2], {x, -1, 1}, Axes -> False, Frame -> True]],
FigurePanel[{2, 1}, PanelAdjustments -> {{0, 0}, {0, +1.2}}],
RawGraphics[
DensityPlot[Sin[15 x y], {x, -1, 1}, {y, -1, 1},
ColorFunction -> "PlumColors", AspectRatio -> 2],
Graphics[{Dashed, Thick, White,
Line[{{-1, yslice1}, {1, yslice1}}],
Line[{{-1, yslice2}, {1, yslice2}}]}]]},
PlotRange -> {{0, 1}, {0, 1}}, ImageSize -> 2*72*{5, 3}
]
```

Here is a first pass at making Simon's solution dynamic. The arrows are hard coded for this particular image. Later I shall try to implement them more generally.

```
dp1 = DensityPlot[Sin[15 x y], {x, -1, 1}, {y, -1, 1},
ColorFunction -> "PlumColors", AspectRatio -> 2, PlotPoints -> 30];
Manipulate[
Show[
GraphicsGrid[{{dp1 ~Append~
(Epilog -> {Dashed, White,
Line[{{-1, yslice1}, {1, yslice1}}],
Line[{{-1, yslice2}, {1, yslice2}}]}),
Plot[Sin[15 x yslice1], {x, -1, 1}, Axes -> False,
Frame -> True]}, {SpanFromAbove,
Plot[Sin[15 x yslice2], {x, -1, 1}, Axes -> False,
Frame -> True]}}, Spacings -> {Scaled[0.2], Scaled[0.0]}],
Graphics[{Red, {Arrowheads[Large],
Arrow[{{380, Rescale[yslice1, {-1, 1}, {-646, -46}]}, {440, -170}}],
Arrow[{{380, Rescale[yslice2, {-1, 1}, {-646, -46}]}, {440, -530}}]
}}],
ImageSize -> 600
],
{{yslice1, 0.5, "Slice 1"}, -1, 1},
{{yslice2, -0.8, "Slice 2"}, -1, 1}
]
```

Here is a slightly different method that puts the arrows inside `Epilog`

, which links their position to the left plot, perhaps easier to use.

```
dp1 = DensityPlot[Sin[15 x y], {x, -1, 1}, {y, -1, 1},
ColorFunction -> "PlumColors", AspectRatio -> 2, PlotPoints -> 30,
PlotRangeClipping -> False,
ImagePadding -> {{Automatic, 100}, {Automatic, Automatic}}];
Manipulate[
Show[
GraphicsGrid[{{dp1~
Append~(Epilog -> {{Dashed, White,
Line[{{-1, yslice1}, {1, yslice1}}],
Line[{{-1, yslice2}, {1, yslice2}}]}, {Red,
Arrowheads[Large],
Arrow[{{1, yslice1}, {1.7, 0.88}}],
Arrow[{{1, yslice2}, {1.7, -0.9}}]
}}),
Plot[Sin[15 x yslice1], {x, -1, 1}, Axes -> False,
Frame -> True]}, {SpanFromAbove,
Plot[Sin[15 x yslice2], {x, -1, 1}, Axes -> False,
Frame -> True]}}, Spacings -> {Scaled[-0.2], Scaled[0.0]}],
ImageSize -> 600
],
{{yslice1, 0.5, "Slice 1"}, -1, 1},
{{yslice2, -0.8, "Slice 2"}, -1, 1}
]
```

Re the OPs comment about GraphicsGrid, you can use FullGraphics@GraphicsGrid@{...} to get a single graphics object out. This is necessary to get copy as PDF to work also.

Similar Questions

I would like to create a login page using ASP.NET. I don't want to use the ASP.NET login control. How do I do this?

How can I get Mathematica to export/save/write a text file with proper Fortan77 formatting, that is, 72 columns and a continuation marker on the sixth column? I am using Mathematica to generate large

how do i create donate buttons using paypal premier account?. i couldn't find donation button creation link, how can i do that?. Is there any special procedure to get donation button?

I would like to write a nested class into an existing class of my own. But I can't find how because I have no idea how this is really called. What do I mean by nested class? With a table dt from the D

I have 3 subplots (3 rows and 1 column). We can use fig.subplots_adjust(hspace=0.2) to adjust the distance between the subplots. this will change the distance between subplots for all case. How can I

I know that Framed is used to show a frame around a symbol, how can I show a circle around a symbol?

In fact, the question says it all. I have a lot of images (JPGs) and I want to create a movie from them programmatically. Is there any such library for .NET(preferrably free) through which I can do th

I'm using matplotlib to create a figure with many small subplots (something like 4 rows, 8 columns). I've tried a few different ways, and the fastest that I can get matplotlib to make the axes is ~2 s

How do I use Mathematica's Gather/Collect/Transpose functions to convert: { { {1, foo1}, {2, foo2}, {3, foo3} }, { {1, bar1}, {2, bar2}, {3, bar3} } } to { {1, foo1, bar1}, {2, foo2, bar2}, {3, foo

I want to know how I can create a new folder at some directory. How can I do it? I use NSFileManager.

How do I make a Mathematica graph from edges with named vertices? EG: http://pastebin.com/Se1Nhe3M I've tried the above and several variations, but Combinatorica never quite accepts it right. Appare

Could anyone please tell me how to do this? I am new to Matlab as well as Mathematica. I have my mathematica coding. But, it gives different results when I run it different time. So, I want to run it

I'm using jQuery UI's dialog feature found here: http://jqueryui.com/dialog (API Here) I'd like to launch a bunch of these boxes in a cascading fashion. Unfortunately I don't think that the Position o

As above, how do I create buttons or labels programmatically instead of using the drag and drop function?

I am plotting two subplots (2x1) in one figure. I would like to remove all the spacing between two subplots and remove the xlable and xlabel ticks for the top subplot too. Also, I am trying to remove

How could I create a BigQuery view via UI command or BQ command line? I wanted to create a view like: create view mydataset.myview as select field1, field2 from mydataset.mytable

I'm trying to solve a rather large linear programming problem in Mathematica, but for some reason the bottleneck is setting up the array of linear constraints. My code for initializing the matrix look

How do I create a log4j Logger using Spring XML configuration? I would like to do something like this so I can inject the logger into other instances: <bean id=logger class=org.apache.log4j.Logg

I have attached a diagram I got it from here only...My question is: How do I convert that to a table form and how do I add relationships between tables according to the diagram? Any samples will be a

This question follows on from the answer given by Michael Pilat in Preventing “Plus” from rearranging things. There he defined a custom + notation using Format[myPlus[expr__]] := Row[Riffle[{expr}, +

I am trying to create a file in sass and link it notepad ++ i have tried looking at videos on how to install it and use sass but they all are on mac.

I want to write a function to force Mathematica to show a rational number in a denominator I specified. For example, the rational 2/3 with the specified denominator 6 should become 4/6. I tried using

What I'm looking to do is have a pair of 3D figures side by side. In matplotlib, I was able to create these subplots like so: ax1 = fig.add_subplot(121, projection='3d') I'm trying to use Mayavi for

I am trying to build a Generic testbuilder for generating objects, that i want to use in tests. One of the things I want to create is Mock implementations of interfaces. I want these Mocks to have Str

How does Mathematica create an InterpolatingFunction object? Example: test1 = FunctionInterpolation[Sin[x],{x,0,2*Pi}] The FullForm of test1 is long, but is primarily x values with the corresponding

I have a .dat file consisting of a string of numbers 1 to 9 that looks like this: 1 2 3 4 5 6 7 8 9 How do I import the data into mathematica so that it has the form {{1,2,3},{4,5,6},{7,8,9}} and I c

I want to teach mathematica that Subscript[w, i] differentiated by Subscript[w, j] is KroneckerDelta[i, j]. I tried Unprotect[D]; D[Subscript[x_, i_], Subscript[x_, j_]] := KroneckerDelta[i, j]; Prot

I see documentation here http://flatironjs.org/ to create a app skeleton. The command specified is, flatiron create <type> <app-name> But I do not see any values for the type. I tried h

Following posts like How do I programatically create an exchange 2010 mailbox using C# and http://blog.pedroliska.com/2011/07/28/creating-an-exchange-2010-mailbox-from-a-remote-c-program/#comment-250

I have problem to set the position of subplots. I'm using subplot inside a loop. But when I try to make special position to the subplots it doesn't work. This is my code: h=subplot(2,2,3); set(h,'posi

I have a blog in Drupal 7, and I'd like to create a RSS feed. How do I create it?

I would like to create a RAM disk programmatically using Node.js, no matter what the underlying OS is (OS X, Linux and Windows should be supported). What is the best way to achieve this? Of course I c

I have a function f(x,t) and I'd like to plot the function of the solution x(t) of f(x(t),t)=0 using Mathematica. How can I do it? Mathematica is often quite different to other programming languages I

If you have multiple subplots containing a secondary y-axis (created using twinx), how can you share these secondary y-axis between the subplots? I want them to scale equally in an automatic way (so n

I'm developing a small Ruby application that I'd like to work with both PostgreSQL and MySQL. It seems like Ruby/DBI is the most straightforward way to do this; I don't want to install a heavyweight

How do I programmatically create a list control? ie: CListCtrl *lstCtrl = new CListCtrl; lstCtrl->Create(WS_CHILD | WS_VISIBLE, CRect(10, 10, 320, 280), this, 0x285); But how do you set this up wi

Has anyone already thought about how to do a clickable calendar in Mathematica? There seems to be something here http://library.wolfram.com/infocenter/Demos/108/, but I quickly tested it and it doesn'

I'm new to Ruby on Rails, and I'm trying to create a bass guitar tutor in order to teach myself RoR (and bass guitar). The walkthroughs use Scaffold to create ActiveRecord classes, but they seem to co

I cannot figure out how to plot a vector field with only 1 variable. Maybe Mathematica doesn't support this. For example: r(t) = cost j + sint i same as <cost, sint> This doesn't work: Vecto

I'm trying to create an application that includes two shells: Login shell Public shell I success to create two shells at the same time using PRISM and MEF, but how I can first to make the login shel

I am trying to create a program which uses classes to create a linked list data structure. Is it necessary to create one linked list class which contains the list in it's entirety: nodes with info and

I try producing a 14 x 5 subplot in Matlab, however the subplots have square axes so when displayed the subplots are not legible. Similarly, when I plot the results to pdf, the subplots are too small

I'm trying to create unique file names by renaming them using their hashed value in iOS. How can I do that?

I want to export my data in two figures with four subplots each. But when I try to do this inside a loop it keeps printing only the second figure with four plots. And when I use figure, it prints eigh

I followed this Stack Overflow post regarding how to create a project for VS2010, hoping that it would point me in the correct direction, but it doesn't cover creating a VS2012 project or solution. I

I'm trying to deploy an ASP.NET application using InnoSetup. I need to perform the following tasks: Create an IIS application. Create a new IIS application pool and set it's .NET version to 4. Set t

I am using usual for-loop for computation in Mathematica: For[i=1,i<n+1,i++, ...calculation... ] For each i I need to define a function F_i[x_,y_]:=.... Here i is suuposed to be a label of the fu

I'm just learning Google's Calendar API and can't figure out how to create a Quick Add Event using javascript. Is this possible? Are there any examples or documentation? Here's what's not working - R

How could I create the following using Rectangle[] in Graphics[]?

Using Entity Framework Code First CTP5, how do I create a primary key column that are INTs and are not identity columns Preferably not using attributes.