Message Boards Message Boards

0
|
5916 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Difference between Show and Inset

Posted 11 years ago
Update, fixed typos. Sorry about that (learning to type with a splint on my hand for emoticon ). Thx to selahittin for the fix.

Hi I have a question about stacking multiple graphics into a given object.

I have typically been using 
Show[{
Plot[x^2,{x,-1,1}],
ListPlot[Table[{x,2x},{x,0,1,.1}]],
Graphics[{Circle[]}]
}]
to achieve the result of having multiple graphical objects overlayed.

Is there a difference (functionality or efficiency) wise between that and using Inset, e.g.
Plot[x^2,{x,-1,1},Epilog->{Inset[ListPlot[Table[{x,2x},{x,0,1.1}]]],Inset[Graphics[{Circle[]}]]}]

or is Show effectively a wrapper function for Inset? In other words, is there an example you can think of where you can do something with Show that cannot be done with Inset and vice versa.

Thanks
POSTED BY: T Saab
2 Replies
Show[{Plot[x^2, {x, -1, 1}], ListPlot[Table[{x, 2 x}, {x, 0, 1, .1}]],
   Graphics[{Circle[]}]
  }]
I gues this is the right one..
Plot[x^2, {x, -1, 1},
Epilog -> {Inset[ListPlot[Table[{x, 2 x}, {x, 0, 1.1}]]],
   Inset[Graphics[{Circle[]}]]}]
and this is the second part..
POSTED BY: selahittin cinar
Do you realize that copying the code from your post and pasting it into Mathematica notebook does not work? You code has typos or errors - could you please correct it and make sure copying from the post and pasting to Mathematica gives working examples.
POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract