Re: How to make large graphics object fit within a plot?
- To: mathgroup at smc.vnet.net
- Subject: [mg105268] Re: [mg105250] How to make large graphics object fit within a plot?
- From: Tomas Garza <tgarza10 at msn.com>
- Date: Wed, 25 Nov 2009 23:00:41 -0500 (EST)
- References: <200911251113.GAA13331@smc.vnet.net>
A quick shot in the dark: try Show[Graphics[Disk[{5, 0}, 2]], Plot[Sin[x], {x, 0, 10}]] Tomas > Date: Wed, 25 Nov 2009 06:13:11 -0500 > From: nma at 12000.org > Subject: [mg105250] How to make large graphics object fit within a plot? > To: mathgroup at smc.vnet.net > > I am trying to add a disk at some location on top of an existing plot. So I > use Epilog to add the disk. > > But it seems if the disk is larger than the plot image size, it gets chopped > off. I wanted the whole disk to show. > > I tried increasing ImagePadding for the plot, and also ImageMargins, but > this did not help. > > Here is what I tried > > Plot[Sin[x], {x, 0, 10}, AspectRatio -> Automatic, > Epilog -> {Disk[{5, 0}, 2]}] > > Show[Plot[Sin[x], {x, 0, 10}, AspectRatio -> Automatic], > Graphics[Disk[{5, 0}, 2]]] > > Show[Plot[Sin[x], {x, 0, 10}, AspectRatio -> Automatic, PlotRange -> > Automatic], > Graphics[Disk[{5, 0}, 2]]] > > None of the above works. But the below WORKS: > > Show[Plot[Sin[x], {x, 0, 10}, AspectRatio -> Automatic, PlotRange -> > {Automatic,{-3,3}}], > Graphics[Disk[{5, 0}, 2]]] > > So, I had to explicitly make the plot y-axis large enough to accommodate the > disk to make it 'fit' > > I wanted to do this automatically. I am sure there is a way. I just thought > of something, may be I need to look at > Inset[] may be there is something there? which I'll do that next. > > --Nasser > >
- References:
- How to make large graphics object fit within a plot?
- From: "Nasser M. Abbasi" <nma@12000.org>
- How to make large graphics object fit within a plot?