MathGroup Archive 1999

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

Search the Archive

Re: combining two plots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16762] Re: [mg16708] combining two plots
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Wed, 24 Mar 1999 02:24:04 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Any number of Graphics objects can easily be combined in Mathematica.
There are, in fact, several ways to do it, but probably the easiest is to
use the Show command. Try this:


In[1]:=
gr1=Plot[x^2,{x,-1,1},DisplayFunction->Identity];
gr2=ListPlot[Table[{x,x^3},{x,-1,1,0.1}],DisplayFunction->Identity];

In[2]:=
Show[{gr1,gr2},DisplayFunction->$DisplayFunction]

(Here comes the graph!)

On Mon, Mar 22, 1999, Joaquim Leitao <quim at ideiafix.fis.ua.pt> wrote:

>Hello:
>
>I'd like to draw in the same plot a function and some discrete 
>points. How can I combine the ListPlot and Plot comands in the same 
>figure? 
>
>Any help will be appreciated
>Joaquim Pratas Leitao
>Departamento de Fisica
>Universidade de Aveiro
>3810 Aveiro, Portugal
>tel: +351 34 370286
>e-mail: quim at fis.ua.pt


Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp/
http://eri2.tuins.ac.jp/



  • Prev by Date: Re: combining two plots
  • Next by Date: curve fiting
  • Previous by thread: Re: combining two plots
  • Next by thread: Re: combining two plots