Re: Simple but puzzling plotting question
- To: mathgroup at smc.vnet.net
- Subject: [mg78605] Re: Simple but puzzling plotting question
- From: Bill Rowe <readnewsciv at sbcglobal.net>
- Date: Thu, 5 Jul 2007 04:04:31 -0400 (EDT)
On 7/4/07 at 5:43 AM, desmier.pe at forces.gc.ca (ouadad) wrote:
>I simply want to plot three currency daily exchange rates, USD, GBP
>and EURO, from April 1, 1990 to March 31, 2006. The problem is the
>EURO. Since it only came into existence on 01 January 1999, I don't
>have data going as far back as 1990. Therefore, for the Euro
>column, all entries for the period April 1, 1990 to December 31,
>1998 are blank. Unfortunately, this causes a partw error in
>Mathematica. Does anyone know how to plot different sized datasets
>on the same graph?
Using version 6, this can be done easily as follows:
First generate two data sets of differing length:
set1 = Sort@Table[RandomReal[], {5}];
set2 = Sort@Table[RandomReal[], {10}];
then plot them:
ListPlot[{set1, set2}, Joined -> True]
Or if you are using version 5.x, you can get a similar result with:
set1 = Sort@Table[Random[], {5}];
set2 = Sort@Table[Random[], {10}];
Show[
Block[{$DisplayFunction=Identity},
{ListPlot[set1, PlotJoined->True, PlotStyle->Blue],
ListPlot[set2, PlotJoined->True, PlotStyle->Red]}],
PlotRange->All];
--
To reply via email subtract one hundred and four