MathGroup Archive 2001

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

Search the Archive

Re: same plot for continous and discrete function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29639] Re: [mg29605] same plot for continous and discrete function
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Fri, 29 Jun 2001 01:36:13 -0400 (EDT)
  • References: <200106280927.FAA06685@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Actually, the two functions do not necessarily have to share the same domain
of definition. Use Show on the two separate plots. I give you an example.

In[1]:=
a = Plot[Sin[x], {x, -Pi, Pi}];

In[2]:=
b = ListPlot[Table[{x, Cos[x]^2}, {x, -2 Pi, 2 Pi, Pi/16}]];

In[3]:=
Show[a, b];

If you are interested only in the last plot, use the option
DisplayFunction -> Identity in each of the first two (this will prevent the
plots from displaying), and DisplayFunction -> $DisplayFunction in Show.

Tomas Garza
Mexico City

----- Original Message -----
From: "Martin Harborth" <martin.harborth at ts.siemens.de>
To: mathgroup at smc.vnet.net
Subject: [mg29639] [mg29605] same plot for continous and discrete function


> -----Ursprüngliche Nachricht-----
> Von: Yackov_Shermann [SMTP:yackov at mangocrafts.com]
> Gesendet am: Donnerstag, 21. Juni 2001 22:02
> An: Harborth Martin
> Betreff: Multiple Plots
>
>
> Hello.
>
> This is my very first exposure to Mathematica and I can't quite figure out
> how to get on the same plot, both a continuous function y=F(x) and a
> discrete one yi=G(xi) (actually, a list of {xi, yi}), provided both share
> the same definition domain.
> Is there a built-in primitive for a such task?
>
> Yackov
>
>
>   ------------------------------
>   http://MangoCrafts.com
>   ------------------------------
>   Experience... Everything!!
>
>
>
>
>



  • Prev by Date: Re: convert an expression to an infinite series
  • Next by Date: Charting question
  • Previous by thread: same plot for continous and discrete function
  • Next by thread: Re: same plot for continous and discrete function