Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Probably unnecessary detail: So here's what I'm envisioning. I have several outputs from different calculations (perhaps several ListAnimated tables of GraphicsGrids of plots). In one, I did all the calculations with x=0.13 and everything is a function of y. In a second output, I set y=0.36 and everything is a function of x. Now I want to produce a single box with perhaps tabs at the top that lets me switch between the different outputs.

In the limited case above, I could accomplish the whole thing with another nesting of ListAnimate, but what I'm really going for here is something more general. What I would like to be able to do is something like

"OutputTabbedPane[{%487, %488, %496}]"

and have it produce a single box or whatever that combined the (already computed, possibly long-time computations) outputs and let me click and cycle through them.

Pipe dream? Anyone know how to move in this direction?

share|improve this question

closed as off-topic by Mike Honeychurch, bobthechemist, m_goldberg, rm -rf Feb 22 at 1:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Mike Honeychurch, bobthechemist, m_goldberg, rm -rf
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 2 down vote accepted

This problem is solved by TabView.

In[1]:= 5+4
Out[1]=9

In[2]:= AbsoluteTiming[Pause[3]; Plot[Sin[x],{x,-1,1}]
Out[2]= {3.013000, <plot of sin[x]>}

In[3]:= AbsoluteTiming[TabView[{%1,%2[[2]]}]]
Out[3]={0.,Tabbed pane with 9 and <plot of sin[x]>}  

The timing bits are there to indicate that % calls the output without re-computing the possibly costly production of the output. The Tabbed output is nice and what I wanted here.

Edit: Manually labeling the tabs is done a bit unintuitively as rules.

TabView[{"label 1" -> %1, "label 2" -> %2[[2]]}] 

changes the tab labels from the default {1,2} to {"label 1", "label 2"}

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.