MathGroup Archive 1997

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

Search the Archive

Re: Combining ListPlots

  • To: mathgroup at
  • Subject: [mg8090] Re: Combining ListPlots
  • From: tburton at (Tom Burton)
  • Date: Tue, 5 Aug 1997 03:23:01 -0400
  • Organization: Brahea Consulting
  • Sender: owner-wri-mathgroup at

On 4 Aug 1997 02:19:46 -0400, "Greg Keogh" <greg at> wrote:

>Hello from Melbourne Australia,
>I want to display two or more joined ListPlots on top of each
>other. My problem is that each of the individual ListPlots is
>being displayed before the combined one. I can't figure out how
>to suppress display of the individual plots.
>The real tables I'm plotting are actually from a complicated
>optical system, but for the purposes of illustration the
>following tiny sample using PrimePi and LogIntegral is almost
>identical to what the real program is doing:
>plot1 = Table[{x,PrimePi[x]},{x,2,50}];
>plot2 = Table[{x,LogIntegral[x]},{x,2,50}];
>This produces three ListPlots, the individual ones for plot1 and
>plot2, then the combined one appears.
>What is the neatest way of producing a single combined ListPlot?
>Greg Keogh
><greg at>
>Ps. Please cc replies to my email address, we check the mail frequently.

The neatest way is probably

In[4]:= Needs["Graphics`Graphics`"]
In[5]:= DisplayTogether[ListPlot[plot1,PlotJoined->True],

This a short cut masking what is really going on:  temporarily opting
DisplayFunction->Identity to suppress the display as the two individual plots are restored, and then restoring the option to the default DisplayFunction->$DisplayFunction. Thus, the explicit way to do this is to add the first option to both ListPlots and the latter option to Show.

Tom Burton

  • Prev by Date: Re: How to draw a shaded shpere?
  • Next by Date: Re: Putting argument for function
  • Previous by thread: Combining ListPlots
  • Next by thread: Re: Combining ListPlots