Re: Overlaying List...Plots with other Plots?
- To: mathgroup at smc.vnet.net
- Subject: [mg103435] Re: Overlaying List...Plots with other Plots?
- From: Helen Read <hpr at together.net>
- Date: Mon, 21 Sep 2009 05:53:19 -0400 (EDT)
- References: <h94vmc$nie$1@smc.vnet.net>
- Reply-to: HPR <read at math.uvm.edu>
Erik Max Francis wrote: > What's the smoothest way to draw a ListPlot (or its friends, > ListLogPlot, ListLogLogPlot, etc.) with another plot of just a normal > function (which is actually a curve fit to the data) on top of the ListPlot? > > I know that I can just do two plots (which are just Graphics objects > anyway) and then show them simultaneously with show, but since it's a > ListPlot, but since I'm dealing with an arbitrary set of data I don't > know what the bounds of the plot will be, so I don't see how to easily > choose the proper limits for the second Plot to Show together. > > I presume there must be a standard way of doing this since it's a pretty > common operation; what's the "proper" way to do it? Show[{plot1,plot2},PlotRange->Automatic] usually does a good job combining the ranges of the original plots to produce a good view. Unfortunately (IMO), the default for Show (since v. 6) is to use the range from the first plot listed, which is virtually *never* what I (or my students) want. The students still get burned on this sometimes, no matter how many times I tell them to always set PlotRange->Automatic when they use Show. We would all be a lot happier if PlotRange->Automatic was the default behavior for Show, and if we really needed something else we would set an explicit PlotRange. -- Helen Read University of Vermont