MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to make large graphics object fit within a plot?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105478] Re: How to make large graphics object fit within a plot?
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Fri, 4 Dec 2009 04:33:17 -0500 (EST)

On 12/3/09 at 6:13 AM, nma at 12000.org (Nasser M. Abbasi) wrote:

>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]]]

The problem with this last is Show sets values for common
options according to how they are set for the first graphic. In
this case, the plot range is being set by the Plot command and
is insufficient to show the subsequent graphic. You can fix this
either by:

Show[Plot[Sin[x], {x, 0, 10}, AspectRatio -> Automatic],
   Graphics[Disk[{5, 0}, 2]], PlotRange -> All]

that is by specifically over riding the implicit plot range or by:

Show[Graphics[Disk[{5, 0}, 2]], Plot[Sin[x], {x, 0, 10}],
  Axes -> True]

Here, the plot range is set appropriately but the first item
doesn't have axes shown. So, there is a need to add the Axes ->
True to show the axes.



  • Prev by Date: Evaluating Global Variables Named Strings as Variables
  • Next by Date: Re: How to make large graphics object fit within a
  • Previous by thread: Re: How to make large graphics object fit within a plot?
  • Next by thread: Re: How to make large graphics object fit within a plot?