Re: Re: Non numerical x-axis in (Date)ListPlot?
- To: mathgroup at smc.vnet.net
- Subject: [mg79030] Re: [mg78997] Re: [mg78986] Non numerical x-axis in (Date)ListPlot?
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 16 Jul 2007 02:17:15 -0400 (EDT)
- Reply-to: hanlonr at cox.net
The current option is Joined. Apparently the old option (PlotJoined) also works but is color coded as improper. When PlotJoined worked I didn't pay attention to the color coding.
Bob Hanlon
---- DrMajorBob <drmajorbob at bigfoot.com> wrote:
> That works fine, but I'm wondering why "PlotJoined" is color-coded red --
> indicating it's not a recognized option? (version 6.0.1)
>
> Bobby
>
> On Sun, 15 Jul 2007 00:08:08 -0500, Bob Hanlon <hanlonr at cox.net> wrote:
>
> > The Sort included below is to cover the case when the data is not
> > pre-sorted by labels
> >
> > dat1 = {{"A1", 2}, {"A4", 1}, {"A2", 3}};
> > dat2 = {{"A1", 2.2}, {"A3", 0.5}, {"A2", 2.9}, {"A4", 1.1}};
> >
> > xcoord = Union[Join @@ (#[[All, 1]] & /@ {dat1, dat2})];
> >
> > dat = Sort /@ ({dat1, dat2} /.
> > {x_, y_?NumericQ} :>
> > {Position[xcoord, x][[1, 1]], y});
> >
> > ListPlot[dat,
> > PlotJoined -> True,
> > Frame -> True,
> > FrameTicks -> {Thread[{Range[Length[xcoord]], xcoord}],
> > Automatic, None, None},
> > Epilog -> {AbsolutePointSize[4],
> > Thread[{{Blue, Red}, Map[Point, dat, {2}]}]}]
> >
> >
> > Bob Hanlon
> >
> > ---- Maarten van der Burgt <maarten.vanderburgt at icos.be> wrote:
> >> Dear all,
> >>
> >> I have two sets of data:
> >>
> >> dat1 = {{"A1",2},{"A2",3},{"A4",1}}
> >> dat2 = {{"A1",2.2},{"A2",2.9},{"A3",0.5},{"A4",1.1}}
> >>
> >> Is there a simple way I can plot these with the {"A1", "A2", "A3",
> >> "A4"} as
> >> equidistant tick marks/labels along the horizontal axis and a standard
> >> numerical vertical axis?
> >> Note the missing "A3" in dat1.
> >>
> >> I could not find anything in the options of ListPlot, or in the new
> >> (6.0)
> >> DateListPlot.
> >>
> >> Thanks for your help,
> >>
> >> Maarten van der Burgt
> >> Leuven, Belgium
> >>
> >>
> >
> >
> >
>
>
>
> --
> DrMajorBob at bigfoot.com