Re: Overlaying List...Plots with other Plots?
- To: mathgroup at smc.vnet.net
- Subject: [mg103455] Re: Overlaying List...Plots with other Plots?
- From: Erik Max Francis <max at alcyone.com>
- Date: Tue, 22 Sep 2009 07:09:42 -0400 (EDT)
- References: <h97i9i$4i2$1@smc.vnet.net>
Bill Rowe wrote: > I don't know that there is a standard way. And as for proper > way, I would say anything that yields the desired result can be > considered proper. In any case, here is one way > > data = RandomReal[1, {10, 2}]; > f = FindFit[data, m x + b , {m, b}, x]; > > Plot[m x + b /. f, {x, 0, 1}, Frame -> True, Axes -> None, > Epilog -> {Point[data]}, > PlotRange -> {.95 Min@data[[All, 2]], 1.05 Max@data[[All, 2]]}] Thanks to everyone who responded with your suggestions. A variant of this one looks like the best for my purposes, since I want to smoothly be able to support multiple plot types (Plot, LogPlot, etc.) without needing a carefully and completely constructed layout for each variant. Plotting the curve fit _first_ and then using the Epilog option seems like the easiest approach. -- Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis Can I be your friend / 'Till the end -- India Arie