MathGroup Archive 2004

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

Search the Archive

Re: listplot and plot of the same function display in different scale...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51623] Re: listplot and plot of the same function display in different scale...
  • From: "Francesco Siano" <fsiano at thphy.uni-duesseldorf.de>
  • Date: Wed, 27 Oct 2004 23:42:08 -0400 (EDT)
  • References: <clneqo$ocd$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi, I would do something like this :


solution = NDSolve[{y'[t] == -y[t], y[0] == 1}, {y}, {t, 0, 7}][[1, 1, 2]]

g0 = Plot[solution[t], {t, 0, 7}, DisplayFunction -> Identity];
g1 = ListPlot[Table[{t, solution[t]}, {t, 0, 7, 0.05}],
     PlotStyle -> PointSize[0.015], DisplayFunction -> Identity];

Show[g0, g1, DisplayFunction -> $DisplayFunction]


The important point is that you want to ListPlot {t,y[t]} and not  
{n,y[t_n]}
-Francesco


  • Prev by Date: Re: Nonlinear diff equation help
  • Next by Date: Re: Memory Problems
  • Previous by thread: Re: listplot and plot of the same function display in different scale...
  • Next by thread: Re: listplot and plot of the same function display in different scale...