Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2200
| From | "Christopher O. Young" <cy56@comcast.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Dynamic plot + real data set |
| Date | 2011-05-08 11:35 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <iq5v6a$pht$1@smc.vnet.net> (permalink) |
| References | <hk6cv2$m2d$1@smc.vnet.net> |
On 2/1/10 7:12 AM, in article hk6cv2$m2d$1@smc.vnet.net, "Matthew"
<m.a.broome@googlemail.com> wrote:
> I have a data set {x,y}. I want to plot it on the same graph along
> with a function that I can change with the Dynamic tool.
>
> I can't seem to use the Show[] command as,
>
> Show[Dynamic[ Plot[vis1[x]/0.8, {x, 0, 120}, PlotRange -> {0, 1},
> AxesLabel -> {power, Relative Visibility1}]],
> ListPlot[{{20.5, 0.8035}, {40, 0.7986}, {59.5, 0.7885}, {80.5,
> 0.7842}, {100, 0.7778}, {119, 0.7738}, {140, 0.7695}, {160, 0.7 |
> 605}}, PlotRange -> {0, 1}]]
I'm still struggling with Dynamic myself, but I notice that wrapping the
whole "Show" expression with Dynamic will let you combine your plots:
{Slider[Dynamic[f]], Dynamic[f]}
Dynamic[
Show[{
Plot[
vis1[f, x], {x, 0, 120},
PlotRange -> {0, 1},
AxesLabel -> {"Power", "Relative Visibility 1"}
],
ListPlot[
{
{20.5, 0.8035},
{40, 0.7986},
{59.5, 0.7885},
{80.5, 0.7842},
{100, 0.7778},
{119, 0.7738},
{140, 0.7695},
{160, 0.7}
},
PlotRange -> {0, 1}
]
}]
]
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Dynamic plot + real data set "Christopher O. Young" <cy56@comcast.net> - 2011-05-08 11:35 +0000
csiph-web