Thanks to all
- To: mathgroup at smc.vnet.net
- Subject: [mg41080] Thanks to all
- From: "1.156" <rob at piovere.com>
- Date: Thu, 1 May 2003 04:59:53 -0400 (EDT)
- References: <b8lh7e$9cd$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Well, I learned a bit more about Show[] and you guys straightened me out as usual. Thanks to all that tried to help. Rob "1.156" wrote: > First I start with a few measured data points: > > data = {{0,260.}, {.25,218.},{.5,200.}, {.75,212.}, {1.,240.}}; > > (* I do some curve fitting/regression and I come up with a polynomial and I'd like to see how the curve compares with the data *) > > a0 = 260.; a1 = -188.; a2 = -2.667; a3 = 384.; a4 = -213.333.; > > f[x_]= a0+ a1 x+ a2 x^2+ a3 x^3 +a4 x^4; > > (* So I plot each of them, both look good to me. a plots the best fit curve and b plots the data points with nice big red dots. I got the b code from some kind soul on this ng I think. Both plots are over a domain from 0 to 1 *) > > a = Plot[f[x], {x, 0, 1}]; > b=ListPlot[data,Epilog\[Rule]{RGBColor[1,0,0],PointSize[0.025],Point/@data}] > > (* now that I see that both plots work, I do my usual and Show them together *) > > Show[{a,b}] > > But woe is me: I can see some of the b points as small black dots (not RED!), and several I can't see at all next to the plain black plot of a. This seems to work fine if both a and b are standard Plot[] functions but here I'm mixing Plot[] and ListPlot[] > -- I'm definitely teasing the devil. > > Can someone give me a hint how to make Mathematica Show[] reveal the nice big red dots > from a ListPlot in b while also displaying the Plot[] curve? > > Rob